oracle 之 手動建庫
1、-- 檢視伺服器 ORA 環境變數情況
[oracle@orastb ~]$ env|grep ORA
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
2、-- 建立引數檔案
[oracle@orastb ~]$ cd /u01/app/oracle/product/11.2.0/dbhome_1/dbs
[oracle@orastb dbs]$ ls
afiedt.buf hc_testdb.dat lkTESTDB2 spfiletestdb1.ora
hc_boncstb.dat inittestdb1.ora orapwboncstb spfiletestdb2.ora
hc_OMS.dat inittestdb2.ora orapwtestdb1
hc_testdb1.dat lkBONCSTB orapwtestdb2
hc_testdb2.dat lkTESTDB1 spfileboncstb.ora
[oracle@orastb dbs]$ touch initqixindb.ora
[oracle@orastb dbs]$ cat initqixindb.ora
memory_target=17179870000
*.db_name='QIXINDB'
*.processes = 300
*.audit_file_dest='/u01/app/oracle/admin/qixindb/adump'
*.audit_trail ='db'
*.db_block_size=8192
*.db_domain=''
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=10G
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
*.open_cursors=300
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='undotbs01'
# You may want to ensure that control files are created on separate physical
# devices
*.control_files='/oradata/qixindb/control01.ctl','/oradata/flash_recovery_area_qixindb/qixindb/control02.ctl'
*.compatible ='11.2.0'
3、-- 建立引數檔案及建庫所需目錄
[oracle@orastb dbs]$ mkdir -p /u01/app/oracle/admin/qixindb/adump
[oracle@orastb dbs]$ mkdir -p /u01/app/oracle/flash_recovery_area
[oracle@orastb dbs]$ mkdir -p /oradata/qixindb/
[oracle@orastb dbs]$ mkdir -p /oradata/flash_recovery_area_qixindb/qixindb/
[oracle@orastb dbs]$ mkdir -p /oradata/qixindb/redolog/
4、 -- 登入,啟動資料庫到nomount , 執行手工建庫指令碼
[oracle@orastb ~]$ sqlplus / as sysdba
Connected to an idle instance.
(11G)SYS@qixindb> startup nomount;
ORACLE instance started.
Total System Global Area 1.7170E+10 bytes
Fixed Size 2260128 bytes
Variable Size 9261024096 bytes
Database Buffers 7851737088 bytes
Redo Buffers 54951936 bytes
(11G)SYS@qixindb> show parameter memory_
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address integer 0
memory_max_target big integer 16448M
memory_target big integer 16448M
shared_memory_address integer 0
(11G)SYS@qixindb>
CREATE DATABASE qixindb
USER SYS IDENTIFIED BY BOnc#oracle123
USER SYSTEM IDENTIFIED BY BOnc#oracle123
LOGFILE GROUP 1 ('/oradata/qixindb/redolog/redo01a.log','/oradata/qixindb/redolog/redo01b.log') SIZE 1G BLOCKSIZE 512,
GROUP 2 ('/oradata/qixindb/redolog/redo02a.log','/oradata/qixindb/redolog/redo02b.log') SIZE 1G BLOCKSIZE 512,
GROUP 3 ('/oradata/qixindb/redolog/redo03a.log','/oradata/qixindb/redolog/redo03b.log') SIZE 1G BLOCKSIZE 512,
GROUP 4 ('/oradata/qixindb/redolog/redo04a.log','/oradata/qixindb/redolog/redo04b.log') SIZE 1G BLOCKSIZE 512,
GROUP 5 ('/oradata/qixindb/redolog/redo05a.log','/oradata/qixindb/redolog/redo05b.log') SIZE 1G BLOCKSIZE 512,
GROUP 6 ('/oradata/qixindb/redolog/redo06a.log','/oradata/qixindb/redolog/redo06b.log') SIZE 1G BLOCKSIZE 512
MAXLOGFILES 15
MAXLOGMEMBERS 3
MAXLOGHISTORY 1
MAXDATAFILES 300
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DATAFILE '/oradata/qixindb/system01.dbf' SIZE 8G REUSE
SYSAUX DATAFILE '/oradata/qixindb/sysaux01.dbf' SIZE 8G REUSE
DEFAULT TABLESPACE users
DATAFILE '/oradata/qixindb/users01.dbf'
SIZE 500M REUSE AUTOEXTEND OFF
DEFAULT TEMPORARY TABLESPACE tempts01
TEMPFILE '/oradata/qixindb/temp01.dbf'
SIZE 30G REUSE
UNDO TABLESPACE undotbs01
DATAFILE '/oradata/qixindb/undotbs01.dbf'
SIZE 30G REUSE AUTOEXTEND OFF;
Database created.
(11G)SYS@qixindb> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
(11G)SYS@qixindb> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
(11G)SYS@qixindb> startup;
ORACLE instance started.
Total System Global Area 1.7170E+10 bytes
Fixed Size 2260128 bytes
Variable Size 9261024096 bytes
Database Buffers 7851737088 bytes
Redo Buffers 54951936 bytes
Database mounted.
Database opened.
[oracle@orastb dbs]$ orapwd file=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwqixindb password=BOnc#oracle123
[oracle@orastb dbs]$ ll orapwqixindb
-rw-r-----. 1 oracle oinstall 1536 Aug 30 16:09 orapwqixindb
(11G)SYS@qixindb> show parameter pfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string
(11G)SYS@qixindb> create spfile from pfile;
File created.
(11G)SYS@qixindb> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
(11G)SYS@qixindb> startup;
ORACLE instance started.
Total System Global Area 1.7170E+10 bytes
Fixed Size 2260128 bytes
Variable Size 9261024096 bytes
Database Buffers 7851737088 bytes
Redo Buffers 54951936 bytes
Database mounted.
Database opened.
-- 建庫完成後,跑三個指令碼
-- sys使用者登入
In SQL*Plus, connect to your Oracle Database instance with the SYSDBA administrative privilege:
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
-- system使用者登入
In SQL*Plus, connect to your Oracle Database instance as SYSTEM user:
@?/sqlplus/admin/pupbld.sql
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31383567/viewspace-2144485/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 靜默安裝and手動建庫
- oracle建庫指令碼Oracle指令碼
- 拋開dbca,手動建庫步驟
- oracle之 手動建立 emp 表 與 dept 表Oracle
- Oracle OCP(36):DBCA建庫Oracle
- Oracle DG備庫手動管理新增資料檔案Oracle
- oracle手動配置互信Oracle
- ORACLE DG之備庫角色Oracle
- LightDB/postgresql內建特性之訪問oracle之oracle_fdw介紹SQLOracle
- oracle RAC手動配置互信Oracle
- Oracle11g 自動化建庫及調整相關引數Oracle
- ORACLE建庫過程中自動生成的跟鎖相關的VIEWOracleView
- ordebug 手動修改Oracle sga scnOracle
- Oracle RAC DG手動切換Oracle
- Oracle資料庫恢復之resetlogsOracle資料庫
- 【配置上線】Oracle靜默建庫 for 11gOracle
- 4 配置Oracle資料庫自動啟動Oracle資料庫
- Oracle資料庫啟動步驟Oracle資料庫
- pycharm手動匯入庫PyCharm
- [Oracle]Oracle良性SQL建議OracleSQL
- Oracle建表Oracle
- Oracle 11g RAC手動新增serviceOracle
- 每天自動備份Oracle資料庫Oracle資料庫
- oracle手工建庫後rman無法啟用(RMAN-04015)Oracle
- ORACLE 資料庫伺服器業務高峰期高危動作之IOSCAN(HPUNIX)Oracle資料庫伺服器iOS
- redis5.* 手動構建叢集Redis
- oracle資料庫備份之exp增量備份Oracle資料庫
- Oracle備庫當機啟動解決方案Oracle
- 靜默安裝Oracle建庫時報Template General Purpose does not existOracle
- 【配置安裝】Oracle靜默建庫for 12c&19c CDBOracle
- 手動破解之010Editor
- Oracle 12c 手動建立CDB和非CDBOracle
- Oracle如何手動重新整理執行計劃Oracle
- 用Android SDK Build Tools手動構建APKAndroidUIAPK
- Oracle 12.2 Heavy swapping 資料庫自動關閉OracleAPP資料庫
- 11G oracle資料庫重新啟動crsOracle資料庫
- Oracle資料庫啟動問題彙總(一)Oracle資料庫
- 構建api gateway之 動態外掛APIGateway
- 淺談自動化構建之grunt