Wednesday, September 23, 2009

DIM-04503: Message 4503 not found

problem Description


While starting an oracle instance using oradim command or whenever you invoke oradim it fails with DIM-04503 message like below.
E:\xampp\mysql\bin>oradim -start -sid orcl
DIM-04503: Message 4503 not found; product=RDBMS; facility=ORADIM

Cause of the Problem
The problem happened due to incorrect setting of ORACLE_HOME environmental variable. This can also happen if you don't set ORACLE_HOME environmental variable on your windows environment.

Solution of the Problem
Set ORACLE_HOME environmental variable to the location where you have installed oracle software. For example,

E:\xampp\mysql\bin>set ORACLE_HOME=E:\oracle\product\10.2.0\db_2
And now startup database using oradim.
E:\xampp\mysql\bin>oradim -start -sid orcl

Note that, if you have correct ORACLE_HOME setting then invoking oradim will show following output.
C:\Documents and Settings\User>oradim
ORADIM:  [options].  Refer to manual.
Enter one of the following command:
Create an instance by specifying the following options:
     -NEW -SID sid | -SRVC srvc | -ASMSID sid | -ASMSRVC srvc [-SYSPWD pass]
 [-STARTMODE auto|manual] [-SRVCSTART system|demand] [-PFILE file | -SPFILE]
 [-SHUTMODE normal|immediate|abort] [-TIMEOUT secs] [-RUNAS osusr/ospass]
Edit an instance by specifying the following options:
     -EDIT -SID sid | -ASMSID sid [-SYSPWD pass]
 [-STARTMODE auto|manual] [-SRVCSTART system|demand] [-PFILE file | -SPFILE]
 [-SHUTMODE normal|immediate|abort] [-SHUTTYPE srvc|inst] [-RUNAS osusr/ospass]
Delete instances by specifying the following options:
     -DELETE -SID sid | -ASMSID sid | -SRVC srvc | -ASMSRVC srvc
Startup services and instance by specifying the following options:
     -STARTUP -SID sid | -ASMSID sid [-SYSPWD pass]
 [-STARTTYPE srvc|inst|srvc,inst] [-PFILE filename | -SPFILE]
Shutdown service and instance by specifying the following options:
     -SHUTDOWN -SID sid | -ASMSID sid [-SYSPWD pass]
 [-SHUTTYPE srvc|inst|srvc,inst] [-SHUTMODE normal|immediate|abort]
 Query for help by specifying the following parameters: -? | -h | -help

Note that if you set environmental variable using set command from command prompt then it will be set only for that session. If you want to set as permanent basis then,
- Right click on My Computer icon.
- Click on Properties.
- Go to Advanced tab.
- Click on Environmental Variable.
- Now you can set environmental variable permanently for a user or for system.
- Click on New either for a particular user or for system. If you set for system it will affect all users of the machine.
- Two textbox will appear. In the Variable Name field type ORACLE_HOME and in the Variable Value type the path of your oracle home.
- Click ok and you are done.

Monday, May 26, 2008

Benefits of using views

•With views you can restrict database access in both column level and row level. Selective portion of tables can be hidden with view.


•Creating complex view and query on them allow you to make complex query easy. They allow you to make simple queries to retrieve the results from complicated queries.

•Views can be used to allow data independence for ad hoc users and application programs.

•You can present different views of the same data according to their particular criteria.

•For experiment you can just create view and query on them instead of creating temporary tables and dropping them while significantly reduce database fragmentation.

Sunday, May 20, 2007

Turn off Fn key - weird behavior of keyboard

You might be astonished by typing keys in the keyboards. You are typing "u" and it becomes "4", typing "i" becomes "5". Same is true for keys o,l,;,k,j,m,7,9,0,/,p. Pressing one key becomes another one. But if you hold down Fn key and type these keys then it appears correctly. If you look carefully at the keyboard you'll see that several keys include blue lettering themselves. In fact, if you look at the keys 7, 8, 9, 0 on the top row, U, I, O, P on the next, J, K, L, : on the next and M, > and ? on the bottom, you'll see that each has a blue character on it. These blue characters work whenever you press the key while hold down the Fn key.

Note that the Fn key (also known as the Function key) is a feature found on most laptop computers. The Fn key allows several other keys on a laptop's keyboard to serve more than one function. Within limited space it increases the functionality of typing more keys. Dell, Asus laptops make good use of the Fn key. So, if you have the keyboards with Fn key you should be familiar about how to use them.

Now the point is without holding your Fn keys you are getting keys as if you are pressing Fn key. And so you are searching remedy of this problem. Based on your keyboard you can get original settings of your keyboard in following ways.

1)Try Fn+F11 key combination.
2)Shift + Num Lock.
3)Fn+ Num Lock.
4)Fn+F11+Scroll lock
5)Fn + F8 (on HP laptop)

Now you might wonder where you will get Num Lock or Scroll Lock key. This is simple really. You can easily try the key combination by your On-Screen Keyboard. You can find it through
Start -> Programs -> Accessories -> Accessibility
Enjoy!

Saturday, May 5, 2007

Huge number of oracle processes and oracle is not releasing process

Problem Symptoms 

In the database there is huge number of Oracle database processes and within several hours the processes reached the max limit of PROCESSES parameter. No one then can connect to database and therefore it is needed to restart the Server or need to kill the oracle process from operating system.

Recent changes are the,
1)Enable DCD.
2)SQLNET.EXPIRE_TIME is set to 1 or more.

Cause of the Problem
This problem is specific with Oracle Database release 10.2.0.3 and on Windows Platform. It is due to the the DCD (dead connection detection) mechanism. The orphaned processes are not being cleaned up even though DCD is enabled and SQLNET.EXPIRE_TIME is set to 1 or more.

Also the number of processes exceeds too much than the number of sessions.
SQL> select count(*) from v$session;

COUNT(*)
----------
55

SQL> select count(*) from v$process;

COUNT(*)
----------
600
In this case, the orphaned resources are not released if only the client application is terminated. After only the client computer has been rebooted, the DCD releases those resources. For example, a Windows application is killed but Windows machine remains running, the probe packet may be received and discarded as if the connection is still active. As it currently stands, it appears that DCD detects dead client machines, but not dead client processes.

Solution of the Problem
1. Comment the SQLNET.EXPIRE_TIME parameter in your sqlnet.ora file.
2. Reboot the server. Server reboot is funny thing to solve the problem.
3. Set KeepAlive mechanism in Windows 2000/NT.
To do so,
- Start > Run > Regedit.exe
- In the Registry, navigate to:
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters

- Edit - Add value: KeepAliveTime (REG_DWORD)
Decimal -> 180000 (for example = 3 minutes)

- The parameter will not be present the first time you modify the parameter, so you will need to add it. The default value is 2 hours.
4. Watch to see if there are any check if orphaned SHAD processes that exist.