Creating a database through the command line can help you better understand the database creation process. Today, I tried to manually create the Oracle11gR2 database. It seems that the 10G manual database creation process is still different, for manual creation of 10 Gb databases, refer to "http://space.itpub.net/519536/viewspace-667563" in secooler"
The process for creating a database is as follows:
Test environment:
OS: OEL5.6 x64
DB: Oracle database 11g R2 (11.2.0.1.0)
Database creation name: prod
1. Configure environment variables (reference)
1) set Environment Variables
[Oracle @ ocm ~] $ Vi. bash_profile
#. Bash_profile
# Get the aliases and functions
If [-f ~ /. Bashrc]; then
.~ /. Bashrc
Fi
# User specific environment and startup programs
ORACLE_BASE =/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME = $ ORACLE_BASE/product/11.2.0.1/db_1; export ORACLE_HOME
LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib; export CLASSPATH
PATH = $ ORACLE_HOME/bin:/usr/sbin: $ PATH; export PATH
2) effective environment variables
[Oracle @ ocm ~] $ Source ~ /. Bash_profile
2. Create related directories
1) compared with 10 Gb, the dump directory only needs to be created here.
[Oracle @ ocm ~] $ Mkdir-p/u01/app/oracle/admin/prod/adump
2) storage directory of data files and Control Files
[Oracle @ ocm ~] $ Mkdir-p/u01/app/oracle/oradata/prod
3. Create a password file
[Oracle @ ocm ~] $ Cd $ ORACLE_HOME/dbs
[Oracle @ ocm dbs] $ orapwd file = orapwprod password = oracle entries = 30
4. Create a parameter file
1) obtain the sample parameters from the init. ora file. Refer to the cat method of dahou:
[Oracle @ ocm ~] $ Cd $ ORACLE_HOME/dbs
[Oracle @ ocm dbs] $ cat init. ora | grep-v ^ # | grep-v ^ $> initprod. ora
2) modify the information in the parameter file
Modify the following parameters
1: db_name
2: memory size of memory_target
3: replace the tag with the content in the current $ ORACLE_BASE.
4: fast recovery area path setting (I did not set it here, So I commented it out)
5. Modify diagnostic_dest.
6. Change the SERVICE in dispatchers to PRODXDB.
7. Add the name of the Control File
====================================
Db_name = 'prod'
Memory_target = 600 M
Processes = 150
Audit_file_dest = '/u01/app/oracle/admin/prod/adump'
Audit_trail = 'db'
DB _ block_size = 8192
Db_domain =''
# Db_recovery_file_dest = '/flash_recovery_area'
# Db_recovery_file_dest_size = 2G
Diagnostic_dest = '/u01/app/oracle'
Dispatchers = '(PROTOCOL = TCP) (SERVICE = PRODXDB )'
Open_cursors = 300
Remote_login_passwordfile = 'clusive'
Undo_tablespace = 'undotbs1'
Control_files = (/u01/app/oracle/oradata/prod/control01.ctl,/u01/app/oracle/oradata/prod/control02.ctl)
Compatible = '11. 2.0'
====================================
5. Start the database to nomount using the previously created parameter file
[Oracle @ ocm ~] $ Export ORACLE_SID = prod
[Oracle @ ocm ~] $ Sqlplus/as sysdba
SQL * Plus: Release 11.2.0.1.0 Production on Tue Jul 24 18:26:51 2012
Copyright (c) 1982,200 9, Oracle. All rights reserved.
Connected to an idle instance.
SYS @ prod> create spfile from pfile;
File created.
SYS @ prod> startup nomount;
ORACLE instance started.
Total System Global Area 626327552 bytes
Fixed Size 2215944 bytes
Variable Size 373297144 bytes
Database Buffers 247463936 bytes
Redo Buffers 3350528 bytes
6. In 10gR2, The undo_management, job_queue_processes, and other parameters need to be manually modified. However, after show parameter, it is found that the values of these parameters in 11gR2 have already met the requirements and do not need to be modified.
SYS @ prod> show parameter undo_management
NAME TYPE VALUE
-----------------------------------------------------------------------------
Undo_management string AUTO
SYS @ prod> show parameter job_queue_processes
NAME TYPE VALUE
-----------------------------------------------------------------------------
Job_queue_processes integer 1000
SYS @ prod> show parameter _ dump _
NAME TYPE VALUE
-----------------------------------------------------------------------------
Background_dump_dest string/u01/app/oracle/diag/rdbms/pro
D/prod/trace
Core_dump_dest string/u01/app/oracle/diag/rdbms/pro
D/prod/cdump
Max_dump_file_size string unlimited
User_dump_dest string/u01/app/oracle/diag/rdbms/pro
D/prod/trace