Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Create Oracle instance in UNIX
"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:
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