Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Create Oracle instance in UNIX

Re: Create Oracle instance in UNIX

From: Howard J. Rogers <howardjr2000_at_yahoo.com.au>
Date: Tue, 14 Jan 2003 12:13:55 +1100
Message-ID: <IlJU9.23555$jM5.62631@newsfeeds.bigpond.com>

"Siva" <sri00siva_at_yahoo.com> wrote in message news:2bbebcbe.0301131613.288d176d_at_posting.google.com...
> Hi,
> I am in the process of exploring Oracle on UNIX and I would like to
> know if anyone has a working script that will create an Oracle
> 8.1.6/8.1.7 instance on a UNIX Solaris machine?
> Thanks,
> Siva

Er, to create an *instance*, the command is simply 'startup'. Oh, OK... you'll have to set ORACLE_SID first, and potentially create a password file, but otherwise "startup" builds instances.

I guess you actually want to create a database, huh?

To do that, it's easy:

  1. Get yourself an init.ora (copy someone else's or copy the default init.ora provided by Oracle in ORACLE_HOME/dbs). Once copied, edit as follows: -set db_name to something meaningful -set control_files to where you eventually want your controlfiles to be created -set db_block_size to 8192 (given this is Solaris). -set remote_login_passwordfile to SOMETHING (see below) -remark out any references the original init.ora may contain to rollback_segments or undo_management=AUTO or undo_tablespace=XXXX

Nothing else *needs* to be edited, so I usually leave it all unchanged at this point. You can always tweak the sizes of shared pools, buffer caches and so on (it's called Performance Tuning); and the location of background_dump_dest etc, at a later date.

2. Decide on an authentication mechanism. You either use password file authentication, in which case you use orapwd to create a password called orapw<SID> in the ORACLE_HOME/dbs directory (and note there's no "d" in the name of the file). Or you edit /etc/groups and add your Unix login to the dba group. If the former, you go back and set remote_login_passwordfile to EXCLUSIVE. If the latter, set it to NONE.

3. Set ORACLE_SID to be the same as what you earlier chose as your db_name (remembering that on Unix "FRED" is not the same as 'fred').

4. Launch SQL Plus ($ sqlplus /nolog)

5. Connect as a privileged user (connect / as sysdba if using OS authentication. Connect sys/<password> if you decided to use a password file).

6. startup nomount

7. create database XXXX

    datafile '/somewhere/system01.dbf' size 180M autoextend on next 50m     logfile group 1 '/somewhere/log1a.rdo' size 10M,

              group 2 '/somewhere/log2a.rdo' size 10M;

The 'XXXX' there MUST be the same as db_name.

8. In sqlplus:

    @?/rdbms/admin/catalog.sql
    @?/rdbms/admin/catproc.sql

And then you have a fully working database, managed by an instance. And it's down to tuning.

Regards
HJR Received on Mon Jan 13 2003 - 19:13:55 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US