Mandalika's scratchpad [ Work blog @Oracle | My Music Compositions ]

Old Posts: 09.04  10.04  11.04  12.04  01.05  02.05  03.05  04.05  05.05  06.05  07.05  08.05  09.05  10.05  11.05  12.05  01.06  02.06  03.06  04.06  05.06  06.06  07.06  08.06  09.06  10.06  11.06  12.06  01.07  02.07  03.07  04.07  05.07  06.07  08.07  09.07  10.07  11.07  12.07  01.08  02.08  03.08  04.08  05.08  06.08  07.08  08.08  09.08  10.08  11.08  12.08  01.09  02.09  03.09  04.09  05.09  06.09  07.09  08.09  09.09  10.09  11.09  12.09  01.10  02.10  03.10  04.10  05.10  06.10  07.10  08.10  09.10  10.10  11.10  12.10  01.11  02.11  03.11  04.11  05.11  07.11  08.11  09.11  10.11  11.11  12.11  01.12  02.12  03.12  04.12  05.12  06.12  07.12  08.12  09.12  10.12  11.12  12.12  01.13  02.13  03.13  04.13  05.13  06.13  07.13  08.13  09.13  10.13  11.13  12.13  01.14  02.14  03.14  04.14  05.14  06.14  07.14  09.14  10.14  11.14  12.14  01.15  02.15  03.15  04.15  06.15  09.15  12.15  01.16  03.16  04.16  05.16  06.16  07.16  08.16  09.16  12.16  01.17  02.17  03.17  04.17  06.17  07.17  08.17  09.17  10.17  12.17  01.18  02.18  03.18  04.18  05.18  06.18  07.18  08.18  09.18  11.18  12.18  01.19  02.19  05.19  06.19  08.19  10.19  11.19  05.20  10.20  11.20  12.20  09.21  11.21  12.22 


Thursday, February 28, 2008
 
2Q08 Market Development Excellence Award

Just for the records ..

Couple weeks ago my department within Sun Microsystems, Market Development, handed me over an award {title says it is for exceptional pace} for my recent work in the world record Siebel 8.0 10,000 user benchmark on Sun SPARC Enterprise T5x20 systems.

The award itself isn't much of a deal; but the visibility and the 15 second fame it brought along excited me a bit. I didn't get a chance to respond back to all those folks who congratulated me through the e-mail medium. So, here it is: Thank you folks.
--

Incidentally I received a similar award back in 2004 (I was a contractor then) for similar effort, Siebel 7.5.2 PSPP benchmark on Sun.


Monday, February 18, 2008
 
Oracle 10g: Setting up The Oracle Enterprise Manager Console

(This blog post assumes that the reader is already familiar with the idea behind the Oracle Enterprise Manager (OEM). Hence there won't be any introductory paragraphs around the OEM. And although I haven't tested it on other operating systems, I believe the steps mentioned in this blog post are applicable on all platforms.).

  1. Create the repository for the Oracle Enterprise Manager Console.
    % emca -repos create

    STARTED EMCA at Feb 14, 2008 1:52:03 AM
    EM Configuration Assistant, Version 10.2.0.1.0 Production
    Copyright (c) 2003, 2005, Oracle. All rights reserved.

    Enter the following information:
    Database SID: TEST <- you may have to input your database's SID
    Listener port number: 1521
    Password for SYS user: change_on_install <- choose any string you like
    Password for SYSMAN user: manager <- choose any string you like

    Do you wish to continue? [yes(Y)/no(N)]: y
    Feb 14, 2008 1:52:39 AM oracle.sysman.emcp.EMConfig perform
    INFO: This operation is being logged at /export/home/oracle/cfgtoollogs/emca/TEST/emca_2008-02-14_01-52-03-AM.log.
    Feb 14, 2008 1:52:39 AM oracle.sysman.emcp.EMReposConfig createRepository
    INFO: Creating the EM repository (this may take a while) ...
    Feb 14, 2008 1:54:33 AM oracle.sysman.emcp.EMReposConfig invoke
    INFO: Repository successfully created
    Enterprise Manager configuration completed successfully
    FINISHED EMCA at Feb 14, 2008 1:54:33 AM

    emca is the Enterprise Manager Configuration Assistant. And the repository that we just created will hold a set of tables containing the internal state information of Enterprise Manager for the managed environment.

  2. Dynamically increase the maximum number of processes that can be created for the execution of jobs, JOB_QUEUE_PROCESSES.
    % sqlplus / as sysdba

    SQL*Plus: Release 10.2.0.3.0 - Production on Thu Feb 14 01:54:57 2008
    Copyright (c) 1982, 2006, Oracle. All Rights Reserved.

    SQL> alter system set job_queue_processes = 2;

    System altered.

  3. Unlock the accounts of OEM super admin user, SYSMAN; and the database monitoring agent, DBSNMP.
    % sqlplus / as sysdba

    SQL> alter user dbsnmp identified by dbsnmp account unlock;

    User altered.

    SQL> alter user sysman identified by manager account unlock;

    User altered.

  4. Configure the database control for the database that we just created (step #1)
    % emca -config dbcontrol db

    STARTED EMCA at Feb 14, 2008 1:55:35 AM
    EM Configuration Assistant, Version 10.2.0.1.0 Production
    Copyright (c) 2003, 2005, Oracle. All rights reserved.

    Enter the following information:
    Database SID: TEST
    Listener port number: 1521
    Password for SYS user: change_on_install
    Password for DBSNMP user: dbsnmp
    Password for SYSMAN user: manager
    Email address for notifications (optional):
    Outgoing Mail (SMTP) server for notifications (optional):
    -----------------------------------------------------------------

    You have specified the following settings

    Database ORACLE_HOME ................ /export/home/oracle

    Database hostname ................ ben05
    Listener port number ................ 1521
    Database SID ................ TEST
    Email address for notifications ...............
    Outgoing Mail (SMTP) server for notifications ...............

    -----------------------------------------------------------------
    Do you wish to continue? [yes(Y)/no(N)]: y
    Feb 14, 2008 1:56:17 AM oracle.sysman.emcp.EMConfig perform
    INFO: This operation is being logged at /export/home/oracle/cfgtoollogs/emca/TEST/emca_2008-02-14_01-55-35-AM.log.
    Feb 14, 2008 1:56:20 AM oracle.sysman.emcp.util.DBControlUtil startOMS
    INFO: Starting Database Control (this may take a while) ...
    Feb 14, 2008 1:57:57 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
    INFO: Database Control started successfully
    Feb 14, 2008 1:57:57 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
    INFO: >>>>>>>>>>> The Database Control URL is http://ben05:1158/em <<<<<<<<<<<
    Enterprise Manager configuration completed successfully
    FINISHED EMCA at Feb 14, 2008 1:57:57 AM

    % netstat -a | grep 1158
    *.1158 *.* 0 0 799744 0 LISTEN

  5. Grant sysdba privileges to the sys user.
     % sqlplus / as sysdba

    SQL> grant sysdba to sys;

    Grant succeeded.

    Note:
    If the grant sysdba .. command fails with an ORA-01994: GRANT failed: password file missing or disabled, make sure the parameter REMOTE_LOGIN_PASSWORDFILE is set to EXCLUSIVE, not to NONE. Also create the orapw<ORACLE_SID> file as shown in the following steps.

    SQL> grant sysdba to sys;
    grant sysdba to sys
    *
    ERROR at line 1:
    ORA-01994: GRANT failed: password file missing or disabled

    SQL> show parameter password

    NAME
    ------------------------------------
    TYPE
    --------------------------------------------------------------------------------
    VALUE
    ------------------------------
    remote_login_passwordfile
    string
    NONE

    Set REMOTE_LOGIN_PASSWORDFILE to EXCLUSIVE in the init<ORACLE_SID> file, shutdown the database instance.

    Login as the same OS user that owns the file $ORACLE_HOME/bin/oracle and (re)create the passwordfile as shown below.
    % orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=newsyspassword entries=16 force=y
    % chown oracle:dba $ORACLE_HOME/dbs/orapw$ORACLE_SID <- replace the user id and the group with yours
    % chmod 4640 $ORACLE_HOME/dbs/orapw$ORACLE_SID

    eg.,
    % ls -l $ORACLE_HOME/dbs/orapw$ORACLE_SID
    -rw-r----- 1 oracle dba 39424 Feb 14 02:12 /export/home/oracle/dbs/orapwTEST


    Start up the database and run the grant sysdba .. command again.

  6. At this point, you should be able to access the Oracle Enterprise Manager Console through a web browser using the URL emitted in the emca -config dbcontrol db step (http://ben05:1158/em in this case).

  7. Commands to start, stop and check the status of the console

    • To start the console:
      emctl start dbconsole

      eg.,% emctl start dbconsole
      Oracle Enterprise Manager 10g Database Control Release 10.2.0.3.0
      Copyright (c) 1996, 2006 Oracle Corporation. All rights reserved.
      http://ben05:1158/em/console/aboutApplication
      Starting Oracle Enterprise Manager 10g Database Control ............................ started.
      ------------------------------------------------------------------
      Logs are generated in directory /export/home/oracle/ben05_TEST/sysman/log

    • To stop the console:
      emctl stop dbconsole

      eg., % emctl stop dbconsole
      Oracle Enterprise Manager 10g Database Control Release 10.2.0.3.0
      Copyright (c) 1996, 2006 Oracle Corporation. All rights reserved.
      http://ben05:1158/em/console/aboutApplication
      Stopping Oracle Enterprise Manager 10g Database Control ...
      ... Stopped.

    • To check the status of the console
      emctl status dbconsole

      eg., % emctl status dbconsole
      Oracle Enterprise Manager 10g Database Control Release 10.2.0.3.0
      Copyright (c) 1996, 2006 Oracle Corporation. All rights reserved.
      http://ben05:1158/em/console/aboutApplication
      Oracle Enterprise Manager 10g is not running.

  8. Finally if you want to drop the database console, use this command:
    % emca -deconfig dbcontrol db

________________________
Technorati Tags:
| |


Friday, February 15, 2008
 
Testing Siebel Server Database Connectivity

(There are multiple ways of testing it -- this blog entry touches only one of them)

Assuming the RDBMS is up and running, first make sure the database client connects to the Siebel database instance from the command line interface. For example, if Oracle is the RDBMS, then:


Usually the above steps are good enough to test the database connectivity. However it is recommended to test the database connectivity using Siebel's odbcsql utility as well, just to make sure that there won't be any trouble for the Siebel servers in communicating with the database server.
  1. Set the required environment variables
    eg.,
    % source $SIEBEL_HOME/siebenv.sh (csh)
    % . $SIEBEL_HOME/siebenv.sh (ksh)

  2. Bring up the odbcsql command line interface (CLI), connect to the Oracle database instance using the table owner login/password

    eg.,
    % odbcsql
    ODBCSQL - ODBC SQL Interface program
    Copyright (c) 2001 Siebel Systems, Inc. All rights reserved.

    Type help for usage information.

    ODBC> set source=siebsrvr_siebel

    ODBC> login oraperf/oraperf
    SQL DBMS: Oracle version 10.02.0000 Oracle 10.2.0.1.0
    ODBC driver: SEor821.so version 05.10.0017 (B0011, U0004)
    (login time: 0.73s)

    ODBC> quit
    Outstanding transaction committed.

    Alternatively it can be tested in a single line as shown below:
    % odbcsql /s siebsrvr_siebel /u oraperf /p oraperf
    ODBCSQL - ODBC SQL Interface program
    Copyright (c) 2001 Siebel Systems, Inc. All rights reserved.

    Type help for usage information.

    Logging into "siebsrvr_siebel" as "oraperf" ...
    SQL DBMS: Oracle version 10.02.0000 Oracle 10.2.0.1.0
    ODBC driver: SEor821.so version 05.10.0017 (B0011, U0004)
    (login time: 0.67s)

    ODBC> quit
    Outstanding transaction committed.

If it fails to connect, double check the connect string specified during the installation of Siebel server.
____________________________
Technorati Tags:
| | |


Sunday, February 03, 2008
 
Win32 : Life Cycle of a WDM Driver

There are three types of WDM Drivers.
  1. Bus Drivers, responsible for enumerating the devices on the bus. Device object associated with this kind of driver is Physical Device Object (PDO).

  2. Function Drivers, responsible for handling read , write, and device power policies for the devices. These drivers provide operational interface for its devices. Device object associated with this kind of driver is Functional device Object (FDO).

  3. Filter Drivers, to add additional value for the devices. Device object associated with this kind of driver is Filter Device Object (Filter DO). These are optional drivers.

Typical Windows device driver code will have DriverEntry(), AddDevice(), I/O Request Packet routines like IRP_MJ_CREATE, IRP_MJ_CLOSE, IRP_MJ_READ, IRP_MJ_WRITE and DriverUnload().

DriverEntry:

A driver's entry point is through the DriverEntry routine.The IO Manager calls the DriverEntry as soon as the driver is loaded.
Syntax:


NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
{
DriverObject->MajorFunction[IRP_MJ_CREATE] = XXXXDispatchCreate;
DriverObject->MajorFunction[IRP_MJ_CLOSE] = XXXXDispatchClose;
DriverObject->MajorFunction[IRP_MJ_PNP] = XXXXDispatchPnp;
DriverObject->MajorFunction[IRP_MJ_POWER] = XXXXDispatchPower;
DriverObject->MajorFunction[IRP_MJ_READ] = XXXXDispatchRead;
DriverObject->MajorFunction[IRP_MJ_WRITE] = XXXXDispatchWrite;
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = XXXXDispatchDeviceControl;
DriverObject->DriverUnload = XXXXUnload;
DriverObject->DeviceExtension->AddDevice = XXXXAddDevice;
}

where XXXX is a user specified name eg. GdpDispatchCreate.

The DriverEntry gets pointer to its own driver object (DriverObject).DriverEntry initializes entry points for other routines of the driver and stores their pointers in the DriverObject. DriverEntry also initializes DriverUnload routine and AddDevice routine.

AddDevice:

Syntax:


NTSTATUS XXXXAddDevice(PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT DeviceObject)
{
//.....
}

AddDevice routine is called after the devices get enumerated. AddDevice routine is like a DriverEntry for Plug and Play (PNP). AddDevice routine is responsible for creating Device Objects for the devices enumerated by the PNP Manager This routine calls IoCreateDevice and IoCreateSymbolicLink and IoAttachDeviceToDeviceStack functions mainly. IoCreateDevice function creates Device Object.It returns pointer to the Device Object. After creating the Device Object IoCreateSymbolicLink function is used to create link between the device object name and the user visible name of the device so that the device is visible to Win32. IoAttachDeviceToDeviceStack function is used to attach the device object created by IoCreateDevice to the stack.

DriverUnload :

Syntax:


NTSTATUS XXXXUnload(PDRIVER_OBJECT DriverObject)
{
//…………..
}

Unload routine checks if the device object is deleted or not.It frees up any memory allocated in the driver entry time.Unload routine gets called when the driver is Unloaded or reloaded or replaced with another driver or by the PNP Manager when there are no more device objects after IRP_MN_REMOVE_DEVICE is called .

Apart from DriverUnload and AddDevice rest all routines initialised in DriverEntry share same signature.


NTSTATUS XXXX(PDEVICE_OBJECT DeviceObject, PIRP Irp);

IRP_MJ_CREATE :

Syntax:


NTSTATUS XXXXDispatchCreate(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
//…………
}

This IRP is called when CreateFile function is called to open a handle to file object or a device object.Win32 makes a call to CreateFile function.Most of the drivers set STATUS_SUCCESS in the IO block and complete the request but this irp can be used to reserve any subsequent IO requests for that handle. The functionality implimented is based on the driver.

All dispatch routines must make a call to the function IoGetCurrentIrpStackLocation to get driver’s associate stack location. Also all dispatch routines must to fill out the PIRP and complete the routine through IoCompleteRequest.

PIRP can be filled as below:


Irp->IoStatus.Status = STATUS_SUCCESS;
Irp->IoStatus.Information = 0;
IoCompleteRequest( Irp,IO_NO_INCREMENT);

IRP_MJ_CLOSE :

Syntax:


NTSTATUS XXXXDispatchClose(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
//…………
}

This IRP is called when CloseHandle function is called to close the handle created by CreateFile function.Win32 makes a call to CloseHandle function.Most of the drivers set STATUS_SUCCESS in the IO block and complete the request .Additional functionality implimented will be dependent on the driver.Mostly it undos what ever is done by IRP_MJ_CREATE with CreateFile function.

IRP_MJ_PNP:

Syntax


NTSTATUS XXXXDispatchPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
//…………
}

This IRP is called by the PnP manager during enumeration or device rebalancing or any other tine plug and play activity occurs.

Plug-n-Play (PNP) is acombination of hardware and softawre support that enables a computer to recognize and adapt to new hardware configuration change with little or no user intervension (i.e) user can add or remove devices at run time.

PNP's main responsibilities:

When a device is added to the system at run time some of the steps to be taken care of can be describe briefly as:

PnP has minor functions to support each PnP request accordingly. Few of the required function codes are:

IRP_MN_START_DEVICE
IRP_MN_QUERY_REMOVE_DEVICE
IRP_MN_REMOVE_DEVICE
IRP_MN_CANCEL_REMOVE_DEVICE
IRP_MN_QUERY_STOP_DEVICE
IRP_MN_ STOP_DEVICE
IRP_MN_CANCEL_STOP_DEVICE
IRP_MN_SURPRISE_REMOVAL

IRP_MN_START_DEVICE:

PNP Manager sends this IRP after it has assigned hardware resources to the device.The device may have been recently enumerated and is being started for the very first time or is restarting after being stopped. It an also be sent when driver currently in use requires new set of resources.

IRP_MN_QUERY_REMOVE_DEVICE:

This IRP is sent to query if the device if the device can be removed with out disturbing the system. In response to this IRP drivers inform whether the device can be removed or not.

IRP_MN_REMOVE_DEVICE:

This IRP is used to remove to device’s software representations like device object from the system. This IRP is called when the device is removed in orderly fashion or plugged out with out prior notification or when the driver needs an update.

IRP_MN_CANCEL_REMOVE_DEVICE:

This IRP is sent to inform the driver that the device will not be removed from the system. The status prior to the IRP_MN_QUERY_REMOVE_DEVICE will be restored in this case.

IRP_MN_QUERY_STOP_DEVICE:

This IRP is sent to query whether a device can be stopped to rebalance the resources. In response to this IRP the device informs if it is safe to stop the device or not.

IRP_MN_ STOP_DEVICE:

This IRP is sent to stop the device to reconfigure the hardware resources. In response to this IRP driver stops the device and releases the hardware resources being used by the device.

IRP_MN_CANCEL_STOP_DEVICE:

This IRP is sent to inform the driver that the device will not be stopped for rebalancing of the resources. In response to this IRP the driver must return the device to the started state.

IRP_MN_SURPRISE_REMOVAL:

This IRP is sent to the drivers for a device to inform that the device is no longer available for I/O operations. This may happen for reasons like:-

In response to this IRP, Some of the steps to be taken care of are:

IRP_MJ_POWER :

Syntax


NTSTATUS XXXXDispatchPower(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
//…………
}

Power manager can send this IRP any time the operating system is running. System power ranges from S0 to s5 and Device power state ranges from D0 to D3. Higher the number lowers the power consumption in either of the cases.
The minor IRPs supported by this IRP are:
IRP_MN_POWER_SEQUENCE
IRP_MN_SET_POWER
IRP_MN_WAIT_WAKE
IRP_MN_QUERY_POWER

IRP_MN_POWER_SEQUENCE:

This IRP is for optimization and is sent to determine whether its device actually entered a specific power state or not. IRP returns the power sequence values for the device.

IRP_MN_SET_POWER:

This IRP is sent to notify the drivers of the change to the system power state or to change the power state of a device for which the power manager is performing idle detection. PoRequestPowerIrp must be called to send this IRP.

IRP_MN_WAIT_WAKE:

This IRP is used to awaken a system/device from sleep state.

IRP_MN_QUERY_POWER:

This IRP is sent to query whether the system power state or the device power state can be changed.PoRequestPowerIrp must be called to send this IRP.

IRP_MJ_DEVICE_CONTROL :

Syntax


NTSTATUS XXXXDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
//…………
}

Every driver whose device objects belong to a particular device type and has a set of system-defined I/O control codes (IOCTLs) support this IRP. A driver receives this I/O control code because user-mode thread has called the Microsoft Win32 DeviceIoControl function, or a higher-level kernel-mode driver has set up the request. On receipt of a device I/O control request for most I/O control codes, device drivers transfer a small amount of data to or from the buffer.

IRP_MJ_READ :

Syntax


NTSTATUS XXXXDispatchRead(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
//…………
}

If the driver needs to transfers data from its device to the system it must handle read requests through this IRP. It can also be invoked when a user application or Win32 requested data transfer from the device.

IRP_MJ_WRITE :

Syntax


NTSTATUS XXXXDispatchWrite(PDEVICE_OBJECT DeviceObject, PIRP Irp)

{
//…………
}

This IRP is sent by IO manager and is invoked when Win32 calls functions such as WriteFile.

References:

Windows® 2000 Device Driver Book: A Guide for Programmers, Second Edition
MSDN
___________________
Technorati tags:

| | | |





2004-2019 

This page is powered by Blogger. Isn't yours?