Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 

 

 

Manual create database tips

Oracle RAC Cluster Tips by Burleson Consulting


When the database is created manually, there is complete control over the process. Tablespaces can be added or reduced and the flow of the creation process can be managed. Here are the steps to be followed to create a Real Application Clusters database manually:

1. Make init.ora in the $ORACLE_HOME/dbs directory. On Windows, this file is in $ORACLE_HOME\database. To simplify, init.ora can be copied to init.ora and the file modified. Remember that the control file must be pointing to a pre-existing raw device or cluster file system location or ASM storage pool. Path names, file names, and sizes will need to be modified.

Here are some example parameter settings for the first instance:

Cluster-Wide Parameters for Database "RAC":

db_block_size=8192
db_cache_size=52428800
background_dump_dest=/u01/app/oracle/product/10.0.2/rdbms/log
core_dump_dest=/u01/app/oracle/product/10.0.2/rdbms/log
user_dump_dest=/u01/app/oracle/product/10.0.2/rdbms/log
timed_statistics=TRUE
control_files=("/dev/RAC/control_01.ctl", "/dev/RAC/control_02.ctl")
db_name=RAC
shared_pool_size=52428800
sort_area_size=524288
undo_management=AUTO
cluster_database=true
cluster_database_instances=2
remote_listener=LISTENERS_RAC

Instance Specific Parameters for Instance "RACDB1":

instance_name=RACDB1
instance_number=1
local_listener=LISTENER_RACDB1
thread=1
undo_tablespace=UNDOTBS1

2. Run the following sqlplus command to connect to the database:

sqlplus /nolog
connect / as sysdba

3. Startup the database in NOMOUNT mode:

4. Create the database. If the raw devices are in use, they must be pre-created. Path names, file names, and sizes will need to be modified as needed.

Use the following script to create the database.

SQL> startup nomount

Then execute this code:

CREATE DATABASE racdb
MAXINSTANCES  8
MAXLOGHISTORY 100
MAXLOGFILES   64
MAXLOGMEMBERS 6
MAXDATAFILES 100
DATAFILE
'/data/oradata/aultdb1/test/system01.dbf' SIZE 300M REUSE
AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE '/data/oradata/aultdb1/test/sysaux01.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE
'/data/oradata/aultdb1/test/temp01.dbf' SIZE 20M
REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL
UNDO TABLESPACE "UNDOTBS1" DATAFILE
'/data/oradata/aultdb1/test/undotbs01.dbf' SIZE 200M REUSE
AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
CHARACTER SET WE8ISO8859P1
NATIONAL CHARACTER SET AL16UTF16
LOGFILE GROUP 1
('/data/oradata/aultdb1/test/redo01.log') SIZE 10240K,
GROUP 2 ('/data/oradata/aultdb1/test/redo02.log') SIZE 10240K,
GROUP 3 ('/data/oradata/aultdb1/test/redo03.log') SIZE 10240K
USER SYS IDENTIFIED BY "password"
USER SYSTEM IDENTIFIED BY "password";

5. Now, Create the USERS tablespace:

CREATE TABLESPACE "USERS" LOGGING DATAFILE
'/dev/RAC/users_01_125.dbf' SIZE 120M REUSE
NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL;

6. Then create a temporary tablespace:

CREATE TEMPORARY TABLESPACE "TEMP" TEMPFILE
'/dev/RAC/temp_01_50.dbf' SIZE 40M REUSE

7. Now Create a 2nd UNDO tablespace for the use of second instance:

CREATE UNDO TABLESPACE "UNDOTBS2"
DATAFILE '/dev/RAC/undotbs_02_210.dbf' SIZE 200M
REUSE NEXT 5120K MAXSIZE UNLIMITED;

8. Run the necessary scripts to build views, synonyms, etc.

The primary scripts that must be run are:

* CATALOG.SQL--creates the views of data dictionary tables and the dynamic performance views.

* CATPROC.SQL--establishes the usage of PL/SQL functionality and creates many of the PL/SQL Oracle-supplied packages.

* CATCLUST.SQL--creates RAC specific views. (The CATPARR.SQL script is still provided but will not be maintained.)

9. Edit init.ora and set appropriate values for the 2nd instance on the 2nd Node. Names may need to be modified:

instance_name=RACDB2

instance_number=2

local_listener=LISTENER_RAC2

thread=2

10. undo_tablespace=UNDOTBS2From the first instance, run the following command:

alter database
add logfile thread 2
group 4 ('/dev/RAC/redo2_01_100.dbf') size 100M ,
group 5 ('/dev/RAC/redo2_02_100.dbf') size 100M ,
group 6 ('/dev/RAC/redo2_03_100.dbf') size 100M ;

11. Then make thread available by:

alter database enable public thread 2;

12. Start the second instance if the cluster configuration is up and running. At this point, the Oracle database is installed, patched, and running on all members of the cluster.

Notice that the SYSAUX tablespace is specified with the CREATE DATABASE command. This is demonstrated in the example database creation script.

The SYSAUX tablespace is required in all new 10g databases. Only the SYSAUX tablespace data file location is specified. Oracle specifies the remainder of the tablespace properties including:

* online

* permanent

* read write

* extent management local

* segment space management auto

If a datafile is specified for the SYSTEM tablespace, then one must be specified for the SYSAUX tablespace as well. If one is not specified, then the CREATE DATABASE command will fail. The only exception is for an Oracle Managed File system. During any update of a database to Oracle Database 10g, a SYSAUX tablespace must be created or the upgrade will fail. The SYSAUX tablespace has the same security profile as the SYSTEM tablespace. However, loss of the SYSAUX tablespace will not result in a database crash, only the functional loss of the schemas it contains.

 


This is an excerpt from the bestselling book Oracle Grid & Real Application Clusters, Rampant TechPress, by Mike Ault and Madhu Tumma.

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts.

http://www.rampant-books.com/book_2004_1_10g_grid.htm


 

 
��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational