Jetzt ist alles so weit vorbereitet, dass wir die Basisdatenbank erstellen
können. Dazu wechseln wir nach /oracle/admin/DB01/create.
Starten die Instance mit SQL*Plus und erzeugen die Basisdatenbank mit
dem DDL-Befehl CREATE DATABASE
.
oracle@tux01:~$ cd admin/DB01/create oracle@tux01:~/admin/DB01/create$ sqlplus /nolog <<EOF set echo on whenever OSERROR exit 2 whenever SQLERROR exit 1 spool create1.log set termout on connect SYS/change_on_install as SYSDBA startup nomount set verify on CREATE DATABASE DB01 CONTROLFILE REUSE MAXINSTANCES 1 MAXLOGHISTORY 0 MAXLOGFILES 32 MAXLOGMEMBERS 4 MAXDATAFILES 1022 DATAFILE '/oracle/oradata/DB01/system01.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 50M MAXSIZE 2047M EXTENT MANAGEMENT LOCAL DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/oracle/oradata/DB01/temp01.dbf' SIZE 200M REUSE AUTOEXTEND ON next 50M maxsize 2047M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 2M UNDO TABLESPACE "UNDO" DATAFILE '/oracle/oradata/DB01/undo01' SIZE 200M REUSE AUTOEXTEND ON NEXT 50M MAXSIZE 2047M CHARACTER SET WE8ISO8859P1 NATIONAL CHARACTER SET AL16UTF16 LOGFILE GROUP 1 ('/oracle/oradata/DB01/redolog1a.rdo', '/oracle/oradata/DB01/redolog1b.rdo') SIZE 50M REUSE, GROUP 2 ('/oracle/oradata/DB01/redolog2a.rdo', '/oracle/oradata/DB01/redolog2b.rdo') SIZE 50M REUSE, GROUP 3 ('/oracle/oradata/DB01/redolog3a.rdo', '/oracle/oradata/DB01/redolog3b.rdo') SIZE 50M REUSE, GROUP 4 ('/oracle/oradata/DB01/redolog4a.rdo', '/oracle/oradata/DB01/redolog4b.rdo') SIZE 50M REUSE; spool off spool create2.log connect SYS/change_on_install as SYSDBA whenever SQLERROR continue @/oracle/product/920/rdbms/admin/catalog.sql; @/oracle/product/920/rdbms/admin/catexp7.sql; @/oracle/product/920/rdbms/admin/catblock.sql; @/oracle/product/920/rdbms/admin/catproc.sql; @/oracle/product/920/rdbms/admin/catoctk.sql; @/oracle/product/920/rdbms/admin/catobtk.sql; @/oracle/product/920/rdbms/admin/caths.sql; @/oracle/product/920/rdbms/admin/owminst.plb; connect SYSTEM/manager @/oracle/product/920/sqlplus/admin/pupbld.sql; @/oracle/product/920/sqlplus/admin/help/hlpbld.sql helpus.sql; spool off set echo on whenever SQLERROR exit 1 spool create3.log connect SYS/change_on_install as SYSDBA shutdown immediate; EOF