Database Creation
Considerations before a database is created :
Be careful to choose a unique database name. DB_NAME + DB_DOMAIN
Check available file space
Select database block size and character set (see notes on)
Go through parameter file settings
To create a database :
1. Choose a SID and Oracle version (is it installed).
2. Check the user you are logged onto the operating system with has sufficient privileges, you will need to connect to the database as sys as sysdba.
3. For UNIX - Update the environment /etc/oratab and use . oraenv to update environment variables.
For NT - run ORADIM from md-dos oradim -NEW -SID prod -INTPWD password -STARTMODE manual
-PFILE "C:\oracle\admin\prod\pfile\init.ora" and set the environment variable set ORACLE_SID=prod to check this >net START will list all services started and >net START OracleServicePROD will startup the service for PROD.
4. Create the directories for administraion such as
$ORACLE_BASE/admin/sid, $ORACLE_BASE/admin/sid, create, bdump, udump, pfile etc.
5. Create directories for the database file such as /u01/oradata/SID.
6. Create database creation scripts. These should include 'create database ...', create additional tablespaces, run scripts to build data dictionary views,run scripts to install additional options and for 9i create a server parameter file. (see example scripts)
7. Create an init.ora parameter file in $ORACLE_BASE/admin/SID/pfile. (comment out resource_mamager_plan and remote_login_passwordfile)
8. Create a link for the parameter file 'ln -s /oracle/admin/SID/pfile/initsid.ora' while sitting in the directory $ORACLE_HOME/dbs
9. svrmgrl (connect internal) - prior 9i
or sqlplus /nolog >connect sys/password as sysdba - 9i
>startup nomount
>Run creation Scripts that you previously prepared.
10. Create password file ORAPW file=/oracle/product/9.0.1/SID/orapwsid password=change_on_install entries=10
Take comments out of pfile for resource_manager_plan and remote_login_passwordfile), bounce database.
11. Backup the database
12. If this is NT and you want to make this database the default database
Start the registry editor at the MS-DOS command prompt:C:\> regedt32
The registry editor window appears.
Choose the \HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0 subkey for the first Oracle home on your computer. For subsequent installations to different Oracle homes on the same computer, the path is \HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEID where ID is the unique number identifying the Oracle home.
Locate the ORACLE_SID parameter on the right side of the registry editor window.
Double-click the parameter name and change the data to the new SID, which is prod in this example.