Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: create an instance
"Johannes Vogel" <email_at_jvogel.ch> wrote in message
news:3A2EC6C8.7921D19C_at_jvogel.ch...
> Hi
>
> I've installed Oracle 8.1.5 on linux. But there is now instance on this
> server. How can I create an instance? I want only use sqlplus/svrmgrl
> and unix commands.
>
> I know much about oracle and how it works, but for creating an new
> instance, I had a script in my last company. Now, without this script, I
> have no idea where to start...
>
> Thanks a lot, Johannes
For an instance all you need to do is set the environment variable ORACLE_SID. I think this is not what you want. Here is how to do it.
Create an osgroup dba and a user (oracle) belonging to that group.
su - oracle
mkdir $ORACLE_BASE/admin/$NEW_SID mkdir $ORACLE_BASE/admin/$NEW_SID/pfile mkdir $ORACLE_BASE/admin/$NEW_SID/bdump mkdir $ORACLE_BASE/admin/$NEW_SID/cdump mkdir $ORACLE_BASE/admin/$NEW_SID/udump mkdir $ORACLE_BASE/admin/$NEW_SID/create mkdir $MOUNTP01/$NEW_SID
> The number depends on the number of mountpoints you plan to use for your
database.
Create a parameter file (init${NEW_SID_0}.ora) in the $ORACLE_BASE/admin/$NEW_SID/pfile directory. Create a parameter file (init$NEW_SID.ora) in the $ORACLE_BASE/admin/$NEW_SID/pfile directory.
> The first is almost identical to the second but has no rollback_segments
defined. How to create a parameter file is not part of this message. But I
use a copy stored in the $ORACLE_HOME/dbs/init.ora and edit that to reflect
what I need.
ln -s $ORACLE_BASE/admin/$NEW_SID/pfile/init${NEW_SID}_0.ora
$ORACLE_HOME/dbs/init${NEW_SID}_0.ora
ln -s $ORACLE_BASE/admin/$NEW_SID/pfile/init$NEW_SID.ora
$ORACLE_HOME/dbs/init$NEW_SID.ora
ORACLE_SID=$NEW_SID; export ORACLE_SID
> or, depending on the shell you use
setenv ORACLE_SID $NEW_SID
svrmgrl
connect internal
startup nomount pfile='$ORACLE_HOME/dbs/init${NEW_SID}_0.ora'
create database $NEW_SID
logfile group 1 ('$MOUNTP01/$NEW_SID/redo0101.log',
'$MOUNTP02/$NEW_SID/redo0102.log') size $SIZE, group 2 ('$MOUNTP02/$NEW_SID/redo0201.log', '$MOUNTP03/$NEW_SID/redo0202.log') size $SIZE, group 3 ('$MOUNTP03/$NEW_SID/redo0301.log', '$MOUNTP01/$NEW_SID/redo0302.log') size $SIZE datafile '$MOUNTP01/$NEW_SID/${NEW_SID}sys01.dbf' size 80M autoextend off;
> $SIZE depends on the number of updates you have for your database. When
data is updated frequently use a higher value of size to decrease the
performance penalty due to logswitches.
> The size of 80 Meg for the system tablespace is enough to hold the catalog
information of your 815 instance.
@$ORACLE_HOME/rdbms/admin/catalog.sql
@$ORACLE_HOME/rdbms/admin/catprog.sql
exit
Now you have an instance and a (basic) database
Next you need to create a temporary tablespace to store temporary objects
(needed for sorting), a tablespace for your rollback segments and the
rollback segments in this tablespace. (The names of these rollback segments
are the same as those in the
$ORACLE_BASE/admin/$NEW_SID/pfile/init$NEW_SID.ora parameter file). The
number and size of these rollback segments depend on the number of
transactions you have and the size of these tranactions. You also need to
create a tablespace containing data and a user that is allowed to store
objects in this tablespace. Spread the datafiles for this tablespace to
minimize I/O overhead (multiple disks, SCSI adapters). Do not forget to edit
your tnsnames.ora and listener.ora.
Johannes
As you have the same name I couldn't hesitate to reply. Normaly I only answer only to questions that require a shorter answer.
I do no not much about Oracle but could still answer your question, in fact I didn't even put it on my resume. Received on Wed Dec 06 2000 - 18:31:45 CST
![]() |
![]() |