標籤:oracle 11g 手動建庫
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 手工建庫