Manual Database Creation in Oracle9i (Single Instance and RAC)-137288.1

Manual Database Creation in Oracle9i (Single Instance and RAC) [ID 137288.1]
 
PURPOSE ------- The purpose of this bulletin is to give an example of a manual database creation in 9i. SCOPE & APPLICATION ------------------- Oracle recommends using the Database Configuration Assistant (DBCA) to create your database. These steps are available for DBAs who want to manually create a 9i database either in single instance or Real Application Clusters mode. Tips to create a database in 9i Single Instance or Real Application Clusters. ----------------------------------------------------------------------------- Manual Database Creation steps for Single-Instance. ===================================================== Before starting, it is best to have the relevant env variables set (ORACLE_SID, ORACLE_HOME, PATH, etc...). Best to have this setup in a .login or .profile. Here are the steps to be followed: 1. Make a init.ora in your $ORACLE_HOME/dbs directory. On Windows this file is in $ORACLE_HOME\database. To simplify, you can copy init.ora to init.ora and modify the file. *** Path names, file names, and sizes will need to be modified Example parameter settings : db_block_size=8192 db_cache_size=52428800 background_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log core_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log user_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log timed_statistics=TRUE control_files=("/u01/rbdb1/control_01.ctl", "/u01/rbdb1/control_02.ctl") db_name=rbdb1 shared_pool_size=52428800 sort_area_size=524288 undo_management=AUTO undo_tablespace=UNDOTBS ** You can also use an spfile as described in Note 162491.1. 2. Run the following sqlplus command to connect to the database: sqlplus '/ as sysdba' 3. Startup up the database in NOMOUNT mode: SQL> startup nomount 4. Create the Database : *** Path names, file names, and sizes will need to be modified CREATE DATABASE MAXLOGFILES 255 MAXINSTANCES 1 MAXDATAFILES 256 MAXLOGHISTORY 256 DATAFILE '/u01/oracle/rbdb1/system_01.dbf' SIZE 400M REUSE UNDO TABLESPACE "UNDOTBS" DATAFILE '/u01/oracle/rbdb1/undotbs_01.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED CHARACTER SET US7ASCII LOGFILE GROUP 1 ('/u01/oracle/rbdb1/redo1_01.dbf') SIZE 100M REUSE, GROUP 2 ('/u01/oracle/rbdb1/redo1_02.dbf') SIZE 100M REUSE; 5. Create a Users Tablespace : *** Path names, file names, and sizes will need to be modified CREATE TABLESPACE "USERS" DATAFILE '/u01/oracle/rbdb1/users01.dbf' SIZE 300M REUSE AUTOEXTEND ON NEXT 5M MAXSIZE 1500M; 6. Create a Temporary Tablespace : *** Path names, file names, and sizes will need to be modified CREATE TEMPORARY TABLESPACE "TEMP" TEMPFILE '/u01/oracle/rbdb1/temp_01.dbf' SIZE 40M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL; ALTER DATABASE DEFAULT TEMPORARY TABLESPACE "TEMP"; 7. Run the scripts necessary to build views, synonyms, etc. : The primary scripts that you must run are: i> CATALOG.SQL-- creates the views of data dictionary tables and the dynamic performance views. ii> CATPROC.SQL-- establishes the usage of PL/SQL functionality and creates many of the PL/SQL Oracle supplied packages. ============================================================== Manual Database Creation steps for Real Application Clusters ============================================================== Here are the steps to be followed to create a Real Application Clusters database: Before starting, it is best to have the relevant env variables set (ORACLE_SID, ORACLE_HOME, PATH, etc...). Best to have this setup in a .login or .profile. 1. Make a init.ora in your $ORACLE_HOME/dbs directory. On Windows this file is in $ORACLE_HOME\database. To simplify, you can copy init.ora to init.ora and modify the file. Remember that your control file must be pointing to a pre-existing raw device or cluster file system location. *** Path names, file names, and sizes will need to be modified 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/32bit/app/oracle/product/9.0.1/rdbms/log core_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log user_dump_dest=/u01/32bit/app/oracle/product/9.0.1/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 "RAC1": instance_name=RAC1 instance_number=1 local_listener=LISTENER_RAC1 thread=1 undo_tablespace=UNDOTBS * The local_listener parameter requires that you first add the listener address to the TNSNAMES.ORA - remember to do so on both Node 1 and Node 2. ** You can also use an spfile as described in Note 136327.1. 2. Run the following sqlplus command to connect to the database: sqlplus '/ as sysdba' 3. Startup up the database in NOMOUNT mode: SQL> startup nomount 4. Create the Database (All raw devices must be pre-created) : *** Path names, file names, and sizes will need to be modified CREATE DATABASE CONTROLFILE REUSE MAXDATAFILES 254 MAXINSTANCES 32 MAXLOGHISTORY 100 MAXLOGMEMBERS 5 MAXLOGFILES 64 DATAFILE '/dev/RAC/system_01_400.dbf' SIZE 400M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED UNDO TABLESPACE "UNDOTBS" DATAFILE '/dev/RAC/undotbs_01_210.dbf' SIZE 200M REUSE NEXT 5120K MAXSIZE UNLIMITED CHARACTER SET US7ASCII LOGFILE GROUP 1 ('/dev/RAC/redo1_01_100.dbf') SIZE 100M REUSE, GROUP 2 ('/dev/RAC/redo1_02_100.dbf') SIZE 100M REUSE; 5. Create a Users Tablespace: *** Path names, file names, and sizes will need to be modified CREATE TABLESPACE "USERS" LOGGING DATAFILE '/dev/RAC/users_01_125.dbf' SIZE 120M REUSE NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL; 6. Create a Temporary Tablespace: *** Path names, file names, and sizes will need to be modified CREATE TEMPORARY TABLESPACE "TEMP" TEMPFILE '/dev/RAC/temp_01_50.dbf' SIZE 40M REUSE 7. Create a 2nd Undo Tablespace: *** Path names, file names, and sizes will need to be modified 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 you must run are: i> CATALOG.SQL--creates the views of data dictionary tables and the dynamic performance views ii> CATPROC.SQL--establishes the usage of PL/SQL functionality and creates many of the PL/SQL Oracle supplied packages iii> CATPARR.SQL--creates RAC specific views 9. Edit init.ora and set appropriate values for the 2nd instance on the 2nd Node: *** Names may need to be modified instance_name=RAC2 instance_number=2 local_listener=LISTENER_RAC2 thread=2 undo_tablespace=UNDOTBS2 10. From the first instance, run the following command: *** Path names, file names, and sizes will need to be modified alter database add logfile thread 2 group 3 ('/dev/RAC/redo2_01_100.dbf') size 100M, group 4 ('/dev/RAC/redo2_02_100.dbf') size 100M; alter database enable public thread 2; 12. Start the second Instance. (Assuming that your cluster configuration is up and running). Note : Database can only be created if CLUSTER_DATABASE=false See Bug 3280502 RELATED DOCUMENTS ----------------- Oracle9i Database Administrator's Guide Release 1 (9.0.1) Part Number A90117-01

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/17252115/viewspace-753267/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/17252115/viewspace-753267/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值