Thursday, January 25, 2007

Dev : Installing Oracle 9i on Solaris 8

Whew... It's really a mess to install oracle in Unix machine. Lucky for me, I've found some steps online where it has reduce many white hair growing on my head.

It make me sweat when asking me to change the Solaris Kernel Parameters. After some troublesome findings, I finally manage to change the kernel parameters at /etc/system and manage to get the oracle 9i installed and database created. If not, you will always get oracle error complaining "Out Of Memory". Remember, it is the kernel parameters' fault. Not your RAM, not your SWAP (because I have increase my RAM from 512Mb to 1Gb and SWAP from 500Mb to 1.5 Gb :D ).

After installing and created a database, you need to create at least a user.
To create a user :
  1. Login SQL*Plus with sqlplus "/ as sysdba".
  2. In SQL*Plus, type sql > create user user_name identified by user_password;.
  3. Grant some access for the user.
    sql > grant connect to user_name;
    sql > grant resource to user_name;
    sql > grant create any snapshot to user_name;

After that, to access oracle from other workstation, you should start the oracle process first.

  1. In console, type cd /oracle/home/bin/.
  2. To start the oracle process, in console, type ./lsnrctl start.
  3. To start the database, in console, type ./dbstart.

And there you go! The very basic of oracle. :)

4 comments:

Steven said...

should we start db first or start listener first?

martina said...

I don't understand what are you talking about:)

Gary Chee said...

From the notes I have read, the order is to start listener, then only db. The funny thing that makes me puzzled is that to stop, we stop the listener first, then the db.

But from a view of a SuperSifu Mr. BB, Enterprise and Commercial usage of Oracle never shuts down.

Gary Chee said...

In other attemp of restarting the oracle if it is down after restarting the server, you might need to start the database in sql*plus. The steps are:
1. type sqlplus "/ as sysdba"
2. SQL> startup open

it will show you that
Database mounted.
Database opened.


Or if you need to stop the database by:
1. type sqlplus "/ as sysdba"
2. SQL> shutdown immediate

it will show that
Database closed.
Database dismounted.
ORACLE instance shut down.