Create Database Manually


Creating Manual Database on Linux
 
Linux command to check the line number :se nu

1. Step

Copy an init.ora file and edit as per the requirement and rename the filr to the desire name “InitTEST.ora”



Sample Initialization Parameter File


The following is an example of an initialization parameter file used to create a database on a UNIX system.


control_files              = (/u0d/lcg03/control.001.dbf,

                              /u0d/lcg03/control.002.dbf,

                              /u0d/lcg03/control.003.dbf)

db_name                    = lcg03

 

db_domain                  = us.oracle.com

log_archive_dest_1         =

"LOCATION=/net/fstlcg03/private/yaliu/testlog/log.lcg03.fstlcg03/lcg03/arch"

log_archive_dest_state_1   = enable





db_block_size              = 8192

pga_aggregate_target       = 2500M





processes                  = 1000

sessions                   = 1200

open_cursors               = 1024





undo_management            = AUTO





shared_servers             = 3

remote_listener            = tnsfstlcg03





undo_tablespace            = smu_nd1

compatible                 = 10.2.0





sga_target                 = 1500M





nls_language               = AMERICAN

nls_territory              = AMERICA

db_recovery_file_dest      =

/net/fstlcg03/private/yaliu/testlog/log.lcg03.fstlcg03/lcg03/arch

db_recovery_file_dest_size = 100G



Step -2
Created this script under /database/create_database.sql
To create the new database, use the CREATE DATABASE statement. The following statement creates database mynewdb:
CREATE DATABASE mynewdb
   #USER SYS IDENTIFIED BY sreejith
   #USER SYSTEM IDENTIFIED BY sreejith
   LOGFILE GROUP 1 ('/u01/oracle/oradata/mynewdb/redo01.log') SIZE 100M,
           GROUP 2 ('/u01/oracle/oradata/mynewdb/redo02.log') SIZE 100M,
           GROUP 3 ('/u01/oracle/oradata/mynewdb/redo03.log') SIZE 100M
   MAXLOGFILES 5
   MAXLOGMEMBERS 5
   MAXLOGHISTORY 1
   MAXDATAFILES 100
   MAXINSTANCES 1
   CHARACTER SET US7ASCII
   NATIONAL CHARACTER SET AL16UTF16
   DATAFILE '/u01/oracle/oradata/mynewdb/system01.dbf' SIZE 325M REUSE
   EXTENT MANAGEMENT LOCAL
   SYSAUX DATAFILE '/u01/oracle/oradata/mynewdb/sysaux01.dbf' SIZE 325M REUSE
   DEFAULT TABLESPACE tbs_1
   DEFAULT TEMPORARY TABLESPACE tempts1
      TEMPFILE '/u01/oracle/oradata/mynewdb/temp01.dbf' 
      SIZE 20M REUSE
   UNDO TABLESPACE UNDOTBS01 
      DATAFILE '/u01/oracle/oradata/mynewdb/undotbs01.dbf'
      SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
My create_database.sql below 


Create Server parameter file (SPFILE) using this parameter file and STARTUP the instance in NOMOUNT mode.
CREATE SPFILE FROM PFILE=’/home/oracle/oracle/product/10.2.0/init.ora’;

Note* : I encountered an error while creating the SPFILE while running the command

Create SPFILE from PFILE=$ORACLE_HOME/dbs/init***
ORA-00911 : INVALID CHARACTERS

Solution: I removed the occurrence of '*'from the initFILE.ora and re ran the command
and it was successful.

Run the scripts necessary to build views, synonyms, and PL/SQL packages



CONNECT / AS SYSDBA

SQL>@$ORACLE_HOME/rdbms/admin/catalog.sql
SQL>@$ORACLE_HOME/rdbms/admin/catproc.sql

Your Database is ready for use now.


For 11G Database run three scripts


Run the scripts necessary to build data dictionary views, synonyms, and PL/SQL packages, and to support proper functioning of SQL*Plus:

@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
@?/sqlplus/admin/pupbld.sql
EXIT

Error Logs:

The Installation logs are generated on Linux under -- /u01/app/oracle/oraInventory/logs 
or 
ORACLE_BASE/oraInventory/logs
=================

While Installing Oracle Server Software you get this screen.

 


--orainstRoot.sh    --/oracle_base/oraInventory
--root.sh                  --/oracle_home/