| < Day Day Up > |
|
This appendix contains the scripts referred to throughout the book.
REM * crdbPRODDB_RAC1.SQL REM * REM * this script will create the PRODDB database and the data REM * dictionary for RAC implementation REM * Author: Murali Vallath REM * Date: 10-JULY-2002 REM * set echo on spool /apps/admin/PRODDB/create/crdbPRODDB_RAC1.lst REM * REM * Start the RAC1 instance REM * (ORACLE_SID here must be set to RAC1). REM * startup nomount pfile=/apps/admin/PRODDB/pfile/ initPRODDB.ora REM * REM * the command below creates the Oracle database PRODDB REM * with specific parameters such as maxinstances, maxlogfiles REM * etc. REM * Subsequently it creates the SYSTEM tablespace followed by REM * the redo log files for instance RAC1. Note there are 3 log REM * file groups and 2 members per group. REM * create database "PRODDB" maxinstances 8 maxlogfiles 48 maxdatafiles 1024 maxloghistory 1024 character set "UTF8" national character set "UTF8" controlfile reuse datafile '/dev/vx/rdsk/oraracdg/partition_1G3' size 900M logfile group 1 ('/dev/vx/rdsk/oraracdg/partition_1G31', '/dev/vx/rdsk/oraracdg/partition_1G21') size 800M, group 2 ('/dev/vx/rdsk/oraracdg/partition_1G23', '/dev/vx/rdsk/oraracdg/partition_1G25') size 800M, group 3 ('/dev/vx/rdsk/oraracdg/partition_1G27', '/dev/vx/rdsk/oraracdg/partition_1G29') size 800M default temporary tablespace TEMP tempfile '/dev/vx/rdsk/oraracdg/partition_1G9' size 900M undo tablespace UNDO_RAC1 datafile '/dev/vx/rdsk/oraracdg/partition_3G2' size 2800M; connect sys/change_on_install as sysdba alter tablespace system default storage (pctincrease 0); REM * REM * install data dictionary views: REM * @$ORACLE_HOME/rdbms/admin/catalog.sql @$ORACLE_HOME/rdbms/admin/catproc.sql @$ORACLE_HOME/rdbms/admin/catblock.sql @$ORACLE_HOME/rdbms/admin/catperf.sql @$ORACLE_HOME/rdbms/admin/dbmspool.sql REM * REM * UTL data dictionary views: REM * @$ORACLE_HOME/rdbms/admin/utllockt.sql @$ORACLE_HOME/rdbms/admin/utlxplan.sql @$ORACLE_HOME/rdbms/admin/utltkprf.sql @$ORACLE_HOME/rdbms/admin/utlchain.sql @$ORACLE_HOME/rdbms/admin/utlvalid.sql @$ORACLE_HOME/rdbms/admin/catio.sql REM * REM * XA compliant. Creates views needed to REM * do XA recovery scan of prepared and heuristically REM * completed transactions. REM * @$ORACLE_HOME/rdbms/admin/xaview.sql REM * REM * Execute the data dictionary scripts related to Real REM * Application Clusters REM * @$ORACLE_HOME/rdbms/admin/catparr.sql @$ORACLE_HOME/rdbms/admin/catclust.sql REM * For Advanced Queuing (install if required) REM * #@$ORACLE_HOME/rdbms/admin/catqueue.sql REM * For Replication (install if required) REM * #@$ORACLE_HOME/rdbms/admin/catrep.sql REM * Exception table for constraint violation. REM * @$ORACLE_HOME/rdbms/admin/utlexcpt.sql REM * Create a tablespace for database tools. REM * create tablespace tools datafile '/dev/vx/rdsk/oraracdg/partition_1G16' size 900M extent management local uniform size 1M segment space management auto; REM *Create a tablespace for miscellaneous database user REM *activity. REM * create tablespace users datafile '/dev/vx/rdsk/oraracdg/partition_1G13' size 900M extent management local uniform size 1M segment space management auto; REM * Alter SYS and SYSTEM users. REM * alter user sys identified by sys_orarac temporary tablespace temp; alter user system identified by system_orarac default tablespace system temporary tablespace temp; REM * Grant privileges and create synonyms on utility tables and REM * views. REM * grant all on sys.plan_table to public; create public synonym plan_table for sys.plan_table; grant all on sys.chained_rows to public; create public synonym chained_rows for sys.chained_rows; grant all on sys.invalid_rows to public; create public synonym invalid_rows for sys.invalid_rows; REM * Run the following to get rid of Profile warning message in REM * SQL Plus REM * connect system/system_orarac @$ORACLE_HOME/sqlplus/admin/pupbld.sql spool off exit
REM * crdbPRODDB_RAC2.sql REM * Author: Murali Vallath REM * Date: 10-JUL-2002 REM * spool /apps/admin/PRODDB/create/crdbPRODDB_RAC2.lst set termout on set echo on REM * Create redo log files for the second instance or thread 2 REM * alter database add logfile thread 2 group 4 ('/dev/vx/rdsk/oraracdg/partition_1G32', '/dev/vx/rdsk/oraracdg/partition_1G34') size 800M, group 5 ('/dev/vx/rdsk/oraracdg/partition_1G37', '/dev/vx/rdsk/oraracdg/partition_1G39') size 800M, group 6 ('/dev/vx/rdsk/oraracdg/partition_1G41', '/dev/vx/rdsk/oraracdg/partition_1G42') size 800M; create undo tablespace UNDO_RAC2 datafile '/dev/vx/rdsk/oraracdg/partition_3G4' size 2800M; spool off exit
| < Day Day Up > |
|