### CREATE DATABASE 10g ###
Create vers�o 10
1. Set the UNIX environment. ORACLE_SID ORACLE_HOME PATH
2. Create new init<sid>.ora and config<sid>.ora. % cp $ORACLE_HOME/dbs/init<sid>.ora $ORACLE_HOME/dbs/initNEW_NAME.ora % cp $ORACLE_HOME/dbs/config<sid>.ora $ORACLE_HOME/dbs/configNEW_NAME.ora
3. Change db_name parameter in the new initNEW_NAME.ora from DEFAULT to the new database name and specify the control file's name and location.
4. Link Simb�lico para init.ora (ln -s arquivo link_novo)
5. sqlplus /nolog connect / as sysdba
startup nomount
6. Create database CREATE DATABASE SVAP LOGFILE GROUP 1 ('/oracle/SVAP/data/origlogA/redo01_a.dbf','/oracle/SVAP/mirrlogA/redo 01_b.dbf') SIZE 200M reuse, GROUP 2 ('/oracle/SVAP/data/mirrlogA/redo02_a.dbf','/oracle/SVAP/mirrlogB/redo 02_b.dbf') SIZE 200M reuse, GROUP 3 ('/oracle/SVAP/index/origlogA/redo03_a.dbf','/oracle/SVAP/mirrlogA/red o03_b.dbf') SIZE 200M reuse, GROUP 4 ('/oracle/SVAP/index/mirrlogA/redo04_a.dbf','/oracle/SVAP/mirrlogB/red o04_b.dbf') SIZE 200M reuse, GROUP 5 ('/oracle/SVAP/redo/origlogA/redo05_a.dbf','/oracle/SVAP/mirrlogA/redo 05_b.dbf') SIZE 200M reuse MAXLOGFILES 6 MAXLOGMEMBERS 5 MAXLOGHISTORY 1 MAXDATAFILES 1000 MAXINSTANCES 1 CHARACTER SET WE8ISO8859P1 NATIONAL CHARACTER SET UTF8 REUSE
DATAFILE '/oracle/SVAP/oradata/system01.dbf' SIZE 256M
SYSAUX datafile '/oracle/SVAP/oradata/sysaux.dbf' SIZE 256M REUSE EXTENT MANAGEMENT LOCAL DEFAULT TEMPORARY TABLESPACE temp TEMPFILE '/oracle/SVAP/oratemp/temp01.dbf' SIZE 4096M REUSE
UNDO TABLESPACE UNDOTBS DATAFILE '/oracle/SVAP/oradata/undo01.dbf' SIZE 1024M REUSE;
7. Scripts @?/rdbms/admin/catalog.sql @?/rdbms/admin/catproc.sql @?/rdbms/admin/catrep.sql @?/rdbms/admin/dbmspool.sql
8. Logar como system e rodar
connect system/manager @?/sqlplus/admin/pupbld.sql
9. Create other tablespaces.
create tablespace "USERS" '/oracle/rmanusers_01' size 20M
datafile
extent management local autoallocate; management local uniform size 128k;)
(extent
10. Modify the /etc/oratab or /var/opt/oracle/oratab file
11. Configurar listener.ora e tnsnames.ora
12. Create the server parameter file create spfile='/oracle/oracle92/dbs/spfilerepl.ora' from pfile='/oracle/oracle92/dbs/initrepl.ora';
13.
Forcar geracao de log -> alter database force logging;
CREATE DATABASE BEAI LOGFILE GROUP 1 ('/oracle/BEAI/origlogA/redo01_a.dbf','/oracle/BEAI/mirrlogA/redo01_b.dbf') SIZE 200M reuse, GROUP 2 ('/oracle/BEAI/mirrlogA/redo02_a.dbf','/oracle/BEAI/mirrlogB/redo02_b.dbf') SIZE 200M reuse, GROUP 3 ('/oracle/BEAI/origlogA/redo03_a.dbf','/oracle/BEAI/mirrlogA/redo03_b.dbf') SIZE 200M reuse, GROUP 4 ('/oracle/BEAI/mirrlogA/redo04_a.dbf','/oracle/BEAI/mirrlogB/redo04_b.dbf') SIZE 200M reuse, GROUP 5 ('/oracle/BEAI/origlogA/redo05_a.dbf','/oracle/BEAI/mirrlogA/redo05_b.dbf') SIZE 200M reuse MAXLOGFILES 6 MAXLOGMEMBERS 5 MAXLOGHISTORY 1 MAXDATAFILES 1000
MAXINSTANCES 1 CHARACTER SET AL32UTF8 NATIONAL CHARACTER SET AL16UTF16 DATAFILE '/oracle/BEAI/orasys/system01.dbf' SIZE 256M REUSE SYSAUX datafile '/oracle/BEAI/orasys/sysaux.dbf' SIZE 256M REUSE EXTENT MANAGEMENT LOCAL DEFAULT TEMPORARY TABLESPACE temp TEMPFILE '/oracle/BEAI/oratemp/temp01.dbf' SIZE 4096M REUSE UNDO TABLESPACE TBS_UNDO DATAFILE '/oracle/BEAI/orasys/undo01.dbf' SIZE 1024M REUSE; create tablespace "EAIDEVIDX" datafile '/oracle/BEAI/oraindex/eaidevidx01.dbf' size 200M extent management local autoallocate; create tablespace "EAIQAIDX" datafile '/oracle/BEAI/oraindex/eaiqavidx01.dbf' size 200M extent management local autoallocate; create tablespace "EAIDEV" datafile '/oracle/BEAI/oradata/eaidev01.dbf' size 200M extent management local autoallocate; create tablespace "EAIQA" datafile '/oracle/BEAI/oradata/eaiqa01.dbf' size 200M extent management local autoallocate; CREATE USER "EAI_DEV" PROFILE "IBM_PROFILE_SAPUSER" IDENTIFIED BY "webmethodsdev" DEFAULT TABLESPACE "EAIDEV" ACCOUNT UNLOCK; GRANT UNLIMITED TABLESPACE TO "EAI_DEV"; GRANT "CONNECT" TO "EAI_DEV"; GRANT "RESOURCE" TO "EAI_DEV"; CREATE USER "EAI_QA" PROFILE "IBM_PROFILE_SAPUSER" IDENTIFIED BY "webmethodsqa" DEFAULT TABLESPACE "EAIQA" ACCOUNT UNLOCK; GRANT UNLIMITED TABLESPACE TO "EAI_QA"; GRANT "CONNECT" TO "EAI_QA"; GRANT "RESOURCE" TO "EAI_QA";