时间:2021-07-01 10:21:17 帮助过:24人阅读
1、导出ORACLE_SID
export ORACLE_SID=n1
2、建立文件夹
mkdir /u01/app/oracle/product/admin/adump -p
mkdir /u01/app/oracle/product/admin/bdump -p
mkdir /u01/app/oracle/product/admin/cdump -p
mkdir /u01/app/oracle/product/admin/udump -p
mkdir /u01/app/oracle/product/admin/pfile -p
mkdir /u01/app/oracle/product/admin/create -p
mkdir /u01/app/oracle/oradata/n1
3、建立参数文件
在其中填写
db_name=n1
control_files=(/u01/app/oracle/oradata/control01.ctl)
4、建立服务
oradism -new -sid n1
5、建立口令文件
orapwd file=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/pwdn1.ora password=oracle
6、启动实例到NOMOUT
startup nomount pfile=‘xxxx‘;
7、建立库文件
CREATE DATABASE N1
DATAFILE ‘/u01/app/oracle/oradata/n1/system01.dbf‘ SIZE
300M AUTOEXTEND ON NEXT 10M EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE
‘/u01/app/oracle/oradata/n1/sysaux01.dbf‘ SIZE 150M
UNDO TABLESPACE UNDOTBS1
DATAFILE ‘/u01/app/oracle/oradata/n1/undotbs01.dbf‘ SIZE 100M
DEFAULT
TEMPORARY TABLESPACE TEMPTABLS1 TEMPFILE ‘/u01/app/oracle/oradata/n1/temp01.dbf‘
SIZE 100M
LOGFILE
GROUP 1 (‘/u01/app/oracle/oradata/n1/redo01.log‘) SIZE
100M,
GROUP 2 (‘/u01/app/oracle/oradata/n1/redo02.log‘) SIZE 100M,
GROUP 3
(‘/u01/app/oracle/oradata/n1/redo03.log‘) SIZE 100M;
8、建立数据字典
start /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/catalog
start /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/catproc
9、执行pupbld.sql脚本
conn system/manager
start /u01/app/oracle/product/11.2.0/dbhome_1/sqlplus/admin/pupbld
建立完毕。
Oracle 11g 手工建库
标签:oracle 11g 手动建库