Database Reference
In-Depth Information
immediately change the passwords once the database is created, and we will not have to expunge
passwords from the script file later on.
Listing 11-42. Create Database Command
CREATE DATABASE apver
--USER SYS IDENTIFIED BY password
--USER SYSTEM IDENTIFIED BY password
Note This command is contained in a file named Chapter11/apver/ ApVerDBCreate.sql.
The next few aspects of the database creation command in Listing 11-43 simply define the redo log
files we will be maintaining, and their sizes. These log files will be used in case we need to restore the
database from backup, and reapply the transactions that have taken place since the backup, also those
that were not applied before a database failure. Ideally, these transaction log files would be on a different
hard drive from the database files.
Listing 11-43. Create Database Log Files
LOGFILE GROUP 1 ('D:\app\oracle\oradata\apver\REDO01a.log',
'D:\app\oracle\oradata\apver\REDO01b.log') SIZE 16M,
GROUP 2 ('D:\app\oracle\oradata\apver\REDO02a.log',
'D:\app\oracle\oradata\apver\REDO02b.log') SIZE 16M,
GROUP 3 ('D:\app\oracle\oradata\apver\REDO03a.log',
'D:\app\oracle\oradata\apver\REDO03b.log') SIZE 16M
After that, our command includes some basic parameters that may suffice, or can be adjusted later.
See Listing 11-44.
Listing 11-44. Create Database Configuration
MAXINSTANCES 3
MAXLOGFILES 6
MAXLOGMEMBERS 2
MAXLOGHISTORY 1
MAXDATAFILES 10
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
Next, in Listing 11-45, we will define the database files we will use for the apver instance. We define
our primary System database file, SYSTEM01.DBF , and an Auxiliary System file, SYSAUX01.DBF , which is
used by some database components that had historically been placed in separate tablespaces .
Additionally, we create the default tablespace files for USERS , TEMPORARY and UNDO tablespaces. Be sure to
give the UNDO tablespace the same name that you gave it in your init.ora file, described previously. And
with this, we come to the end of our CREATE DATABASE command (note the semicolon).
 
Search WWH ::




Custom Search