Oracle
Parallel Server Getting Started
Release 8.0.5 for Windows NT A64425-01 |
|
This chapter describes how to convert from a single instance
Oracle8 database to a multi-instance Oracle8 database using the parallel
server option, and how to add a third or fourth node to an existing two
or three node configuration.
Specific topics discussed are:
This section explains how to migrate from a single instance
Oracle8 database to multi-instance. In addition, it can help you extend
an existing OPS configuration to additional nodes.
The steps to migrate from a single instance to an Oracle
Parallel Server include:
Step 2: Evaluate Tablespaces
and Log Files of Single Instance
Step 4: Install Oracle8 Enterprise
Edition and Oracle Parallel Server Option
Step 6: Move Initialization Files
Step 7: Export Data from Old
Database
Step 8: Prepare CREATE DATABASE
Script
Step 9: Configure OSD Layer,
Create Services, and Configure Network
Step 10: Create an Oracle Parallel
Server Database
Step 11: Transfer Data From Old
Data to Empty Database
This section should be used as a supplement to Chapter 23,
"Migrating from Single Instance to Parallel Server," of the Oracle8
Parallel Server Concepts and Administration guide.
See your vendor documentation for information about setting
up Oracle Parallel Server hardware.
Because tablespaces must be identical on the Oracle Parallel
Server as a single instance database, it is important that you do any consolidation,
addition of, or renaming of tablespaces on the single instance at this
time.
Each additional node in the cluster requires two log files.
Typically, a single instance database only has two log files. You must
add additional log files for each node using the ALTER DATABASE ADD LOGFILE
statement.
When building a database that is to be shared and managed
by Oracle Parallel Server, it is necessary to access all disks as raw disks.
In the case of a cluster, it is not possible to share a file system between
two separate nodes. The file system is in effect a private cache resident
on just one node.
The process of creating a raw disk involves creating an extended
partition on a disk and assigning logical partitions to it.
To create raw partitions:
File Type | Number of Partitions | Space Per Partition |
---|---|---|
control files |
2 |
2 MB |
log files1 |
2 per node |
small number of transactions: 20-50K each medium number of transaction: 200-500 K each large number of transactions: 2 MB - 5 MB each |
1 Each node requires at least two log files. |
Except on the server already running, install Oracle8 Enterprise
Edition along with the Oracle Parallel Server option, as described in Chapter
4, "Installing Oracle Parallel Server". If your current single instance
database does not have the supporting hardware, you must perform a clean
install on new cluster hardware.
On the server already running Oracle8 Enterprise Edition,
install the Oracle Parallel Server Option, as described in Chapter
4, "Installing Oracle Parallel Server".
For all nodes, see your Operating System Dependent (OSD)
vendor documentation for instructions about installing OSD files.
The initialization files, INIT_COM.ORA and INITSID.ORA
are installed in the ORACLE_HOME\OPS directory. In order to avoid
having to specify the PFILE parameter when starting the database (STARTUP
PFILE=C: ORANT\OPS\INITSID.ORA), move these file to the ORACLE_HOME\DATABASE
file where initialization files are normally located.
To change the location of the initialization files:
Export the entire database from the single instance database. Use one of the following tools:
To start Oracle Data Manager from the Enterprise Manager Console:
The Applications palette appears. Click the Data Manager icon.
Additional Information: See the Oracle Enterprise Manager Administrator's Guide. |
Enter the following at the MS-DOS command prompt followed
by your user name and password.
Note: To export an entire database, you must use the user name SYSTEM. Do not use INTERNAL or SYS. |
To use the Export utility to export all data from an existing database to the new database:
C:\MYDIR> SET ORACLE_SID=ORCL
C:\MYDIR> EXP80 SYSTEM/PASSWORD FILE=MYEXP.DMP FULL=Y LOG=MYEXP.LOG
You now have a full database export of the starter database
ORCL in the file MYEXP.DMP, with all messages from the Export utility logged
in the MYEXP.LOG file.
When running the Export utility, the default values for
the following parameters under Windows NT are:
RECORDLENGTH 2 KB
A new database must be created on the raw partitions.
To prepare the CREATE DATABASE script:
Make the following changes to the BUILD_DB.SQL script:
Enter the following command to find out the current size of data files:
SELECT * FROM DBA_DATA_FILES
A sample script follows:
create database ops controlfile reuse logfile GROUP 1 '\\.\OPS_log1t1'size 200K reuse, GROUP 1 '\\.\OPS_log2t1'size 200K reuse, GROUP 2 '\\.\OPS_log1t2'size 200K reuse, GROUP 2 '\\.\OPS_log2t2'size 200K reuse, datafile '\\.\OPS_sys01' size 50M, character set WE8ISO8859P1; create rollback segment rb_temp; create tablespace user_data datafile `\\.\OPS_usr01' size 15M; create tablespace rollback_data datafile '\\.\OPS_rbs01' size 50M; create tablespace temporary_data datafile '\\.\OPS_tmp01' size 10M; alter rollback segment rb_temp online; -- Change the SYSTEM users' password, default tablespace and -- temporary tablespace. alter user system temporary tablespace temporary_data; alter user system default tablespace user_data; -- Create 16 rollback segments. Allows 16 concurrent users with open -- transactions updating the database. This should be enough. create private rollback segment rb1 storage(initial 50K next 50K) tablespace rollback_data; create private rollback segment rb2 storage(initial 50K next 50K) tablespace rollback_data; create private rollback segment rb3 storage(initial 50K next 50K) tablespace rollback_data; create private rollback segment rb4 storage(initial 50K next 50K) tablespace rollback_data; create private rollback segment rb5 storage(initial 50K next 50K) tablespace rollback_data; create private rollback segment rb6 storage(initial 50K next 50K) tablespace rollback_data; create private rollback segment rb7 storage(initial 50K next 50K) tablespace rollback_data; create private rollback segment rb8 storage(initial 50K next 50K) tablespace rollback_data; create private rollback segment rb9 storage(initial 50K next 50K) tablespace rollback_data; create private rollback segment rb10 storage(initial 50K next 50K) tablespace rollback_data; create private rollback segment rb11 storage(initial 50K next 50K) tablespace rollback_data; create private rollback segment rb12 storage(initial 50K next 50K) tablespace rollback_data; create private rollback segment rb13 storage(initial 50K next 50K) tablespace rollback_data; create private rollback segment rb14 storage(initial 50K next 50K) tablespace rollback_data; create private rollback segment rb15 storage(initial 50K next 50K) tablespace rollback_data; create private rollback segment rb16 storage(initial 50K next 50K) tablespace rollback_data;
Follow "Step 3: Configure OSD
Layer" to "Step 6: Configure the Network"
in Chapter 5, "Configuring Oracle Parallel Server".
To create a database:
CATALOG.SQL |
Generates the data dictionary. |
CATPROC.SQL |
Installs the objects used by the Oracle7 database's PL/SQL functionality. |
CATPARR.SQL |
Creates objects for Oracle Parallel Server. |
C:\> SVRMGR30 SVRMGR> CONNECT INTERNAL/ORACLE SVRMGR> STARTUP SVRMGR> @%ORACLE_HOME%\RDBMS80\ADMIN\CREATE_DATABASE.SQL SVRMGR> @%ORACLE_HOME%\RDBMS80\ADMIN\CATALOG.SQL SVRMGR> @%ORACLE_HOME%\RDBMS80\ADMIN\CATPROC.SQL SVRMGR> @%ORACLE_HOME%\RDBMS80\ADMIN\CATPARR.SQL
SVRMGR> SHUTDOWN
Import the entire database into the empty database. Use one of the following tools:
To start Oracle Data Manager from the Enterprise Manager Console:
Additional Information: See Oracle Enterprise Manager Administrator's Guide. |
To import the full export created in the section "Step 7: Export Data from Old Database" into the new database:
C:\MYDIR> IMP80 SYSTEM/PASSWORD FILE=MYEXP.DMP FULL=Y LOG=MYIMP.LOG
When running the Import utility, the default values for the following parameters under Windows NT are:
BUFFER 4 KB RECORDLENGTH 2 KB
See "Step 8: Start the Database
in Parallel Mode" in Chapter 5, "Configuring
Oracle Parallel Server" to start the Oracle Parallel Server.
This release of Oracle Parallel Server supports up to four
nodes in a cluster. If you have already configured a two- or three-node
cluster and want to add nodes three and/or four, you must add the new configuration
information for these nodes through scripts. The database does need to
be recreated.
Use the SETLINKS utility to create symbolic links to the
new logical partitions. The SETLINKS utility uses a file named ORALINK2.TBL
for the third node in a cluster and ORALINK3.TBL for the fourth node in
a cluster. These files will create the symbolic links to the log files'
logical partitions:
To create symbolic links to a raw partition:
You can use a worksheet similar the one below to assist
with the edits.
Symbolic Link | Node 3 |
---|---|
OPS_log1t3 |
Harddiskx Partitionx |
OPS_log2t3 |
Harddiskx Partitionx |
Symbolic Link | Node 4 |
---|---|
OPS_log1t4 |
Harddiskx Partitionx |
OPS_log2t4 |
Harddiskx Partitionx |
WARNING: Do not change the symbolic link names in OPSLINK1.TBL. If you do, symbolic link names must be modified for the following files located in: |
C:\> CD ORACLE_HOME\OPS C:\ORACLE_HOME\OPS> SETLINKS /F:ORALINK2.TBL C:\ORACLE_HOME\OPS> SETLINKS /F:ORALINK3.TBL
The symbolic links are created:
Oracle Corporation. Copyright (c) 1997. All rights reserved. Created Link:OPS_log1t3 = Device:\Device\Harddisk3\Partition15 Created Link:OPS_log2t3 = Device:\Device\Harddisk3\Partition16 Dos devices updated successfully.
C:\ORACLE_HOME\OPS> SETLINKS /D
Some vendors may require you stop the services and stop the
Cluster Manager prior to configuring the OSD layer. See your vendor documentation
for further information.
Stop OracleServiceSID, OracleHOME_NAMETNSListener80, OraclePGMSService, and OracleAgent services on each node:
C:\> NET STOP SERVICE
To create rollback segment for the additional nodes:
Note: Prior to starting a OracleServiceSID service, the OraclePGMSService service must be running. If you used the CRTSRV script in "Step 4: Create Services" in Chapter 5, "Configuring Oracle Parallel Server", OraclePGMSService automatically starts when the OracleServiceSID service is started. If you chose to create your services with another method, you can still have OraclePGMSService start up automatically with a OracleServiceSID service by entering the following at the command for each node: C:\> OPSREG80 ADD SID |
C:\> NET START OracleServiceSID
C:\> SVRMGR30 SVRMGR> CONNECT INTERNAL/PASSWORD SVRMGR> STARTUP SVRMGR> @C_OPSX.SQL
The C_OPSX.SQL script creates the necessary rollback segments for the third and fourth nodes.
C:\> NET STOP OracleServiceSID