Create database manually

1. first create directories for oradata and core_dump_dest etc, set ORACLE_HOME, ORACLE_SID in .profle and create init.ora file in $ORACLE_HOME/dbs

db_name='mydatabase'
memory_target=1G
processes = 150
control_files='/ora/app/oracle/product/11.2.0/dbs/CONTROL01.CTL','/ora/data/mydatabase/CONTROL02.CTL'
audit_file_dest=/ora/app/oracle/admin/mydatabase/adump
audit_trail ='db'
core_dump_dest=/ora/app/oracle/admin/mydatabase/cdump
[@more@]

#don't specify below 2 parameters, otherwise oracle says ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
#user_dump_dest=/ora/app/oracle/admin/mydatabase/udump
#background_dump_dest=/ora/app/oracle/admin/mydatabase/bdump


db_block_size=8192
db_domain=''
#db_recovery_file_dest='/flash_recovery_area'
#db_recovery_file_dest_size=2G
#diagnostic_dest=''
dispatchers='(PROTOCOL=TCP) (SERVICE=mydatabaseXDB)'
open_cursors=900
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS1'

compatible ='11.2.0'

2. startup nomount, ready to create database manually.

SQL> startup nomount;
ORACLE instance started.

Total System Global Area 1068937216 bytes
Fixed Size 2228344 bytes
Variable Size 616566664 bytes
Database Buffers 444596224 bytes
Redo Buffers 5545984 bytes


#Notes: UNDO TABLESPACE in below create database has to be the same name as undo_tablespace in init file.

CREATE DATABASE mydatabase
USER SYS IDENTIFIED BY mydb123
USER SYSTEM IDENTIFIED BY mydb123
LOGFILE GROUP 1 ('/ora/data/mydatabase/redo01.log') size 200M,
GROUP 2 ('/ora/data/mydatabase/redo02.log') size 200M,
GROUP 3 ('/ora/data/mydatabase/redo03.log') size 200M
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
CHARACTER SET US7ASCII
NATIONAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DATAFILE '/ora/data/mydatabase/system01.dbf' SIZE 1024M REUSE
SYSAUX DATAFILE '/ora/data/mydatabase/sysaux01.dbf' SIZE 1024M REUSE
DEFAULT TABLESPACE users
DATAFILE '/ora/data/mydatabase/users01.dbf'
SIZE 512M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE '/ora/data/mydatabase/temp01.dbf'
SIZE 512M REUSE
UNDO TABLESPACE UNDOTBS1
DATAFILE '/ora/data/mydatabase/undotbs01.dbf'
SIZE 512M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

创建数据字典视图,分别执行下述脚本来完成:
1 SQL> @?/rdbms/admin/catalog.sql
2 ......
3 ......
4 SQL> @?/rdbms/admin/catproc.sql
5 ......
6 ......
7 SQL> @?/sqlplus/admin/pupbld.sql --Note: use account system to execute this script, otherwise there's issue. Connect as SYSTEM before running this script


3. for other tablespace, use below statement to create.

SQL>create tablespace index
datafile '/ora/data/mydatabase/index01.dbf' size 100M
reuse autoextend on next 1280K maxsize unlimited
extend management local;

4. after the db is created, create spfile from pfile. reboot the database.


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/14377/viewspace-1060347/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/14377/viewspace-1060347/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值