官方文档步骤
step 1:Decide on Your Instance Identifier (SID) 设置SID
step 2:Establish the Database Administartor Authentication Method
step 3:Create the Initialization Parameter File
step 4: Connect to the Instance
step 5:Create a Server Parameter File(Recommended)
step 6:Start the Instance
step 7:Issue the create database statement
step 8: Create Additional Tablespaces
step 9:Run Scripts to build data dictionary views
step 10: Run Scripts to install ADDitional Options
step 11: Back up the database
建一个test的库
1.建立相关的目录
mkdir /u01/app/oracle/admin/test/{a,b,c,u,dp}dump -p
mkdir /u01/app/oracle/oradata/test ---这个可建可不建 OMF会自动创建
cd $ORACLE_HOME/dbs
vi inittest.ora
compatible='11.2.0.1.0'
db_name='test'
db_block_size=8192
core_dump_dest='/u01/app/oracle/admin/test/cdump'
user_dump_dest='/u01/app/oracle/admin/test/udump'
background_dump_dest='/u01/app/oracle/admin/test/bdump'
sga_max_size=200m
db_create_file_dest='/u01/app/oracle/oradata/'
db_create_online_log_dest_1='/u01/app/oracle/oradata/'
undo_management=auto
undo_tablespace='SYS_UNDOTS'
orapwd file=orapwulp password=oracle
export ORACLE_SID=test
sqlplus / as sysdba
startup nomount;
create spfile from pfile
create database test;
create tablespace users;
create temporary tablespace temp;
alter database default tablespace users;
alter database default tempotary
create undo tablespace undotbs
vim test.spl
@/u01/app/oracle/product/11.1.0/db_1/rdbms/admin/catproc.sql
@/u01/app/oracle/product/11.1.0/db_1/rdbms/admin/catalog.sql
conn system/oracle
@/u01/app/oracle/product/11.1.0/db_1/sqlplus/pupbld
shutdown immediate
startup