oracle 11g手工建庫
1.設定環境變數
[oracle@TEST ~]$ vi .bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=TEST
export PATH=$ORACLE_HOME/bin:/sbin:/usr/sbin:$PATH
[oracle@TEST ~]$ source .bash_profile
2.建立資料庫需要的相關目錄
[oracle@TEST ~]$ cd $ORACL_BASE
[oracle@TEST oracle]$ mkdir -p admin/TEST/audmp
[oracle@TEST oracle]$ mkdir -p oradata/TEST
3.準備密碼檔案及初始化引數檔案
[oracle@TEST oracle]$ cd $ORACLE_HOME/dbs
[oracle@TEST dbs]$ ls
init.ora
[oracle@TEST dbs]$ orapwd file=orapwTEST password=oracle entries=30
[oracle@TEST dbs]$ cat init.ora|grep -v ^$|grep -v ^# >initTEST.ora
[oracle@TEST dbs]$ vi initTEST.ora
db_name='TEST'
memory_target=1G
processes = 150
audit_file_dest='/u01/app/oracle/admin/TEST/adump'
audit_trail ='db'
db_block_size=8192
db_domain=''
db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
db_recovery_file_dest_size=2G
diagnostic_dest='/u01/app/oracle'
dispatchers='(protocal=tcp) (service=TESTXDB)'
open_cursors=300
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS1'
control_files = (/u01/app/oracle/oradata/TEST/control01.ctl,/u01/app/oracle/oradata/TEST/control02.ctl)
compatible ='11.2.0'
4.開始建立資料庫
[oracle@TEST TEST]$ sqlplus / as sysdba
SQL> create spfile from pfile;
file created.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 1071333376 bytes
Fixed Size 1349732 bytes
Variable Size 620758940 bytes
Database Buffers 444596224 bytes
Redo Buffers 4628480 bytes
SQL> exit
[oracle@TEST ~]$ vi 1.sql
CREATE DATABASE TEST
USER SYS IDENTIFIED BY oracle
USER SYSTEM IDENTIFIED BY oracle
LOGFILE GROUP 1
('/u01/app/oracle/oradata/TEST/redo01a.log','/u01/app/oracle/oradata/TEST/redo01b.log') SIZE 100M
BLOCKSIZE 512,
GROUP 2
('/u01/app/oracle/oradata/TEST/redo02a.log','/u01/app/oracle/oradata/TEST/redo02b.log') SIZE 100M
BLOCKSIZE 512,
GROUP 3
('/u01/app/oracle/oradata/TEST/redo03a.log','/u01/app/oracle/oradata/TEST/redo03b.log') SIZE 100M
BLOCKSIZE 512
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DATAFILE '/u01/app/oracle/oradata/TEST/system01.dbf' SIZE 325M REUSE
SYSAUX DATAFILE '/u01/app/oracle/oradata/TEST/sysaux01.dbf' SIZE 325M REUSE
DEFAULT TABLESPACE users
DATAFILE '/u01/app/oracle/oradata/TEST/users01.dbf'
SIZE 100M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE '/u01/app/oracle/oradata/TEST/temp01.dbf'
SIZE 20M REUSE
UNDO TABLESPACE undotbs1
DATAFILE '/u01/app/oracle/oradata/TEST/undotbs01.dbf'
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
[oracle@TEST ~]$ sqlplus / as sysdba
SQL> @/home/oracle/1.sql
Database created.
SQL>@?/rdbms/admin/catalog.sql
SQL>@?/rdbms/admin/catproc.sql
注意:
1.11g中,db_recovery_file_dest設定為’/u01/app/oracle/fast_recovery_area’,有別於10g的flash_recovery_area.
2.引數檔案裡的undo_tablespace名undotbs1需要和建立資料庫指令碼里的undo tablespace 名一致,否則報表空間不存在錯誤。
3.如果引數檔案initTEST.ora中MEMORY_TARGET設定過大,則會報: “memory not support on this system” 的錯誤,解決方法可將該引數值調小。
[oracle@TEST ~]$ vi .bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=TEST
export PATH=$ORACLE_HOME/bin:/sbin:/usr/sbin:$PATH
[oracle@TEST ~]$ source .bash_profile
2.建立資料庫需要的相關目錄
[oracle@TEST ~]$ cd $ORACL_BASE
[oracle@TEST oracle]$ mkdir -p admin/TEST/audmp
[oracle@TEST oracle]$ mkdir -p oradata/TEST
3.準備密碼檔案及初始化引數檔案
[oracle@TEST oracle]$ cd $ORACLE_HOME/dbs
[oracle@TEST dbs]$ ls
init.ora
[oracle@TEST dbs]$ orapwd file=orapwTEST password=oracle entries=30
[oracle@TEST dbs]$ cat init.ora|grep -v ^$|grep -v ^# >initTEST.ora
[oracle@TEST dbs]$ vi initTEST.ora
db_name='TEST'
memory_target=1G
processes = 150
audit_file_dest='/u01/app/oracle/admin/TEST/adump'
audit_trail ='db'
db_block_size=8192
db_domain=''
db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
db_recovery_file_dest_size=2G
diagnostic_dest='/u01/app/oracle'
dispatchers='(protocal=tcp) (service=TESTXDB)'
open_cursors=300
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS1'
control_files = (/u01/app/oracle/oradata/TEST/control01.ctl,/u01/app/oracle/oradata/TEST/control02.ctl)
compatible ='11.2.0'
4.開始建立資料庫
[oracle@TEST TEST]$ sqlplus / as sysdba
SQL> create spfile from pfile;
file created.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 1071333376 bytes
Fixed Size 1349732 bytes
Variable Size 620758940 bytes
Database Buffers 444596224 bytes
Redo Buffers 4628480 bytes
SQL> exit
[oracle@TEST ~]$ vi 1.sql
CREATE DATABASE TEST
USER SYS IDENTIFIED BY oracle
USER SYSTEM IDENTIFIED BY oracle
LOGFILE GROUP 1
('/u01/app/oracle/oradata/TEST/redo01a.log','/u01/app/oracle/oradata/TEST/redo01b.log') SIZE 100M
BLOCKSIZE 512,
GROUP 2
('/u01/app/oracle/oradata/TEST/redo02a.log','/u01/app/oracle/oradata/TEST/redo02b.log') SIZE 100M
BLOCKSIZE 512,
GROUP 3
('/u01/app/oracle/oradata/TEST/redo03a.log','/u01/app/oracle/oradata/TEST/redo03b.log') SIZE 100M
BLOCKSIZE 512
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DATAFILE '/u01/app/oracle/oradata/TEST/system01.dbf' SIZE 325M REUSE
SYSAUX DATAFILE '/u01/app/oracle/oradata/TEST/sysaux01.dbf' SIZE 325M REUSE
DEFAULT TABLESPACE users
DATAFILE '/u01/app/oracle/oradata/TEST/users01.dbf'
SIZE 100M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE '/u01/app/oracle/oradata/TEST/temp01.dbf'
SIZE 20M REUSE
UNDO TABLESPACE undotbs1
DATAFILE '/u01/app/oracle/oradata/TEST/undotbs01.dbf'
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
[oracle@TEST ~]$ sqlplus / as sysdba
SQL> @/home/oracle/1.sql
Database created.
SQL>@?/rdbms/admin/catalog.sql
SQL>@?/rdbms/admin/catproc.sql
注意:
1.11g中,db_recovery_file_dest設定為’/u01/app/oracle/fast_recovery_area’,有別於10g的flash_recovery_area.
2.引數檔案裡的undo_tablespace名undotbs1需要和建立資料庫指令碼里的undo tablespace 名一致,否則報表空間不存在錯誤。
3.如果引數檔案initTEST.ora中MEMORY_TARGET設定過大,則會報: “memory not support on this system” 的錯誤,解決方法可將該引數值調小。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30167136/viewspace-1465403/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【oracle手工建庫】Oracle
- oracle手工建庫Oracle
- OEL6下ORACLE 11g手工建庫Oracle
- oracle 10 手工建庫Oracle
- Oracle 9 手工建庫Oracle
- Oracle手工建庫指南Oracle
- Oracle 9 手工建庫(轉)Oracle
- Oracle 10g手工建庫Oracle 10g
- oracle-手工建庫指令碼Oracle指令碼
- Oracle10g 手工建庫Oracle
- 【手工建庫】手工方式建立 ORACLE資料庫全程記錄Oracle資料庫
- 手工建立ORACLE 11g 資料庫Oracle資料庫
- 手工建庫
- win7 下手工建oracle庫Win7Oracle
- 水煮oracle28----oracle手工建庫步驟Oracle
- 手工建庫與dbca建庫
- oracle10g linux 手工建庫OracleLinux
- 【安裝配置】oracle 10g 手工建庫Oracle 10g
- Oracle基礎結構之手工建庫相關Oracle
- oracle 11.2.0.4 靜默安裝加手工建庫(-)Oracle
- 【DataGuard】手工冷備搭建 Oracle 11g DataGuard 物理備庫Oracle
- OCM實驗-手工建庫
- 手工建庫---控制檔案
- 手工建庫完成過程
- RHEL 6.5環境Oracle 11g R2手工建庫指令碼(create database manually)Oracle指令碼Database
- Oracle 11g 手工跑AWR報告Oracle
- Oracle 11g 手工跑ASH報告Oracle
- Oracle 11g靜默安裝軟體+手工建立資料庫Oracle資料庫
- Oracle 手工建立資料庫Oracle資料庫
- 手工建立oracle資料庫Oracle資料庫
- oracle 816 手工創庫Oracle
- Oracle 11g r2基於OMF方式手工建立資料庫Oracle資料庫
- Oracle 11g手工收集表統計資訊Oracle
- Oracle 11g 手工不完全恢復Oracle
- 【配置上線】Oracle靜默建庫 for 11gOracle
- 簡單介紹Oracle 19c RAC 手工建庫的過程Oracle
- oracle手工建庫後rman無法啟用(RMAN-04015)Oracle
- ORACLE 11g dataguard系列,手工切換測試Oracle