创建Oracle数据库通过dbca创建是最为简便的,但是偏偏有人说要在command line模式下创建的才够霸道..不才深不以为然..
手工创建Oracle步骤不下:
1. Choose a unique instance and database name
2. Choose a database character set
3. Set operating system variables
4. Create the initialization parameter file
5. Start the instance in NOMOUNT stage
6. Create and execute the CREATE DATABASE command
7. Run scripts to generate the data dictionary and accomplish post-creation steps
8. Create additional tablespaces as needed
其中尤其以3、4、6步最为紧要
Set operating system variables
ORACLE_SID=orwell
ORACLE_BASE=/u01/oracle
ORACLE_HOME=/u01/oracle/92
ORACLE_NLS33=/u01/oracle/92/ocommon/nls/admin/data
PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
别忘记在Linux下要export这些参数值哦
Create the initialization parameter file
aq_tm_processes=1
background_dump_dest='/u01/admin/orwell/bdump'
compatible='9.2.0.0.0'
control_files='/u01/oradata/orwell/control01.ctl','/u01/oradata/orwell/control02
.ctl','/u01/oradata/orwell/contr
ol03.ctl'
core_dump_dest='/u01/admin/orwell/cdump'
db_block_size=8192
db_cache_size=33554432
db_domain='domain'
db_file_multiblock_read_count=16
db_name='orwell'
dispatchers='(PROTOCOL=TCP) (SERVICE=orwellXDB)'
fast_start_mttr_target=300
hash_join_enabled=TRUE
instance_name='orwell'
java_pool_size=83886080
job_queue_processes=10
large_pool_size=16777216
open_cursors=300
pga_aggregate_target=25165824
processes=150
query_rewrite_enabled='FALSE'
remote_login_passwordfile='EXCLUSIVE'
shared_pool_size=83886080
sort_area_size=524288
star_transformation_enabled='FALSE'
timed_statistics=TRUE
undo_management='AUTO'
undo_retention=10800
undo_tablespace='UNDOTBS1'
user_dump_dest='/u01/admin/orwell/udump'
Create and execute the CREATE DATABASE command
CREATE DATABASE orwell
MAXLOGFILES 32
MAXLOGHISTORY 5
MAXDATAFILES 100
MAXINSTANCES 5
CHARACTER SET "UTF8"
NATIONAL CHARACTER SET AL16UTF16
DATAFILE '/u01/oracle/oradata/orwell/system01.dbf' SIZE 300M REUSE
EXTENT MANAGEMENT LOCAL
DEFAULT TEMPORARY TABLESPACE temp TEMPFILE '/u01/oracle/oradata/orwell/temps01.dbf' SIZE 200M REUSE
UNDO TABLESPACE "UNDOTBS1"
DATAFILE '/u01/oracle/oradata/orwell/undotbs01.dbf' SIZE 200M
LOGFILE
GROUP 1 (
'/u01/oracle/oradata/orwell/redo01a.rdo',
'/u01/oracle/oradata/orwell/redo01b.rdo'
) SIZE 100M,
GROUP 2 (
'/u01/oracle/oradata/orwell/redo02a.rdo',
'/u01/oracle/oradata/orwell/redo02b.rdo'
) SIZE 100M,
GROUP 3 (
'/u01/oracle/oradata/orwell/redo03a.rdo',
'/u01/oracle/oradata/orwell/redo03b.rdo'
) SIZE 100M
;