Creating Oracle database creation

advertisement
Creating Oracle database creation. This can be done by the using the DBCA
assistant utility.
Before attempting to create an OPS database with the DBCA, you should have already
installed and configured the cluster software from your OS vendor prior to installing the
Oracle8i software. If the cluster was setup correctly, then the Oracle8i Parallel Server
software should have been installed and copied to all nodes in the cluster. You can
check this by running the command "lsnodes" which should list all nodes in the cluster.
To start the DBCA, use the following command from the node where you installed the
Oracle8i software:
$ dbassist
You will be prompted to choose either "Oracle Parallel Server configuration" or "Single-instance
configuration". This section will discuss the "Oracle Parallel Server configuration" option.
You will next be prompted to either "Create a database" or "Delete a database". Note that the
"Delete a database" option will only be available if there is an existing OPS database to delete.
Choose "Create a database".
The next screen will display all of the nodes in the cluster. You should select those
nodes that will be used with the database you are creating. To quickly select all nodes,
click the "Select ALL" button.
The following screen allows you to choose between "Typical" and "Custom". Choose
"Typical" to create a database with minimal user input. Choose "Custom" if you are an
experienced DBA and want more control of the way the database will be created. If
choosing "Custom", remember that all OPS datafiles must be on raw devices. This
article will discuss the "Typical" option only. The "Typical" option requires that the
environment variable DBCA_RAW_CONFIG is set and points to a valid map file. An
example map file is shown near the end of this article.
Choose "Typical".
You are now prompted as to whether you would rather "Copy existing database files
from the CD" or "Create new database files". The difference between these 2 options is
in the way the datafiles are created. The "Copy existing database files from the CD"
option will copy existing database files from the CD and is the fastest way to create a
database. The "Create new database files" option will create new database files and
take longer. It will also prompt you for 3 additional screens relating to how to create the
database. The 3 additional screens are:
1) Choosing between OLTP, Data Warehousing, and Multipurpose, 2) Specifying how
many concurrently connected users to this database, and 3) Which database options,
like JServer or Advanced Replication, you would
like to configure.
The "Copy existing database files from the CD" option uses datafiles that are preconfigured for all database options.
Choose "Copy existing database files from the CD".
This screen requires you to fill in the "Global Database Name" and "SID Prefix". The
"Global Database Name" is usually composed of the database name and domain. The
"SID Prefix" will have the instance number for each node appended to it.
For example, if you were creating a 2 instance database with SIDs of V8161 on a
system named node1.cluster.com and V8162 on a system named node2.cluster.com,
then the "Global Database Name" would be "V816.cluster.com" and the "SID Prefix"
would be "V816".
A dialog screen will popup confirming that you wish to proceed.
Click "Yes".
Another dialog screen will popup with the following information:
1) The nodes used for this database
2) The database name
3) The system identifiers (SIDs)
4) The password for the SYS account
5) The password for the SYSTEM account
Click "OK".
A new dialog screen will popup that displays the current status of the database creation
and a progress percentage meter. Once the percentage meter reaches 100 percent,
another dialog screen will popup stating that database creation is complete, and also list
the global database name, SID, and passwords for the SYS and SYSTEM accounts.
Choose "OK" to end the dbassist session.
Because the instance on the primary node is left running in exclusive mode, you should
immediately shutdown the instance and bring it back up, then bring up the instances on
the other nodes.
Oracle8i Single-instance database creation using the DBCA assistant
This section will discuss the process of using the DBCA assistant to create a database
that uses at least one raw device. It will not attempt to explain the various methods of
creating a single-instance database, just the differences that are necessary when using
raw devices.
After starting the DBCA assistant, choose a "Custom" database creation. Do not specify
any raw devices, but instead specify filesystem files for all datafiles. At the prompt
"Create database now" or "Save information to a shell script", choose the option to
"Save information to a shell script".
Now edit the scripts you just saved and change all of the filesystem datafile references
that should be on raw devices to the appropriate raw device. Depending on your
platform, it may also be necessary to specify the "REUSE" parameter to avoid a
message during creation that the file already exists.
You can now run the scripts from a svrmgrl or sqlplus session to create the database.
Sample DBCA_RAW_CONFIG map file
Before you can use the "Typical" OPS database creation option, you must first set the
environment variable "DBCA_RAW_CONFIG" to point to a valid map file. For example,
if you have a map file named "dbca_raw.map" at /home/oracle, then set
"DBCA_RAW_CONFIG" as follows:
bourne shell (sh) and korn shell (ksh) example:
$ DBCA_RAW_CONFIG=/home/oracle/dbca_raw.map ; export DBCA_RAW_CONFIG
c shell (csh) example:
% setenv DBCA_RAW_CONFIG /home/oracle/dbca_raw.map
The map file tells the DBCA assistant which raw devices to use for each of the typical
database files. An example map file is shown below. The first column should remain
constant as shown. The second column should be modified to point to the correct raw
devices you have created on your system.
system1
users1
temp1
rbs1
indx1
tools1
drsys1
control1
control2
redo1_1
redo1_2
redo2_1
redo2_2
/dev/vx/rdsk/V816/system01.dbf
/dev/vx/rdsk/V816/users01.dbf
/dev/vx/rdsk/V816/temp01.dbf
/dev/vx/rdsk/V816/rbs01.dbf
/dev/vx/rdsk/V816/index01.dbf
/dev/vx/rdsk/V816/tools01.dbf
/dev/vx/rdsk/V816/drsys01.dbf
/dev/vx/rdsk/V816/control01.ctl
/dev/vx/rdsk/V816/control02.ctl
/dev/vx/rdsk/V8161/redo01.log
/dev/vx/rdsk/V8161/redo02.log
/dev/vx/rdsk/V8162/redo01.log
/dev/vx/rdsk/V8162/redo02.log
Note that all OPS datafiles are shared among all instances in the database. However,
each instance will have its own set of redo logs, though they must still be accessible by
the other instances in order to recover from an instance failure. If you want more than 2
instances, add entries to the map file for each instance. For example, if you want a 4
instance database, add the following entries for instances 3 and 4:
redo3_1
redo3_2
redo4_1
redo4_2
/dev/vx/rdsk/V8163/redo01.log
/dev/vx/rdsk/V8163/redo02.log
/dev/vx/rdsk/V8164/redo01.log
/dev/vx/rdsk/V8164/redo02.log
.
Download