【rac】實驗一:啟動關閉歸檔
1. 啟動歸檔
1.1. 確認歸檔狀態
[oracle@node2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 27 09:55:42 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SYS@PROD1>archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 68
Current log sequence 69
1.2. 關閉資料庫
[oracle@node2 ~]$ srvctl stop database -d prod -o immediate;
[oracle@node2 ~]$
[oracle@node2 ~]$ su - grid
Password:
[grid@node2 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.FRA.dg
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.LISTENER.lsnr
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.OCR.dg
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.asm
ONLINE ONLINE node1 Started
ONLINE ONLINE node2 Started
ora.eons
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.gsd
OFFLINE OFFLINE node1
OFFLINE OFFLINE node2
ora.net1.network
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.ons
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.registry.acfs
ONLINE ONLINE node1
ONLINE ONLINE node2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE node2
ora.node1.vip
1 ONLINE ONLINE node1
ora.node2.vip
1 ONLINE ONLINE node2
ora.oc4j
1 OFFLINE OFFLINE
ora.prod.db
1 OFFLINE OFFLINE Instance Shutdown
2 OFFLINE OFFLINE Instance Shutdown
ora.prod2.db
1 OFFLINE OFFLINE
2 OFFLINE OFFLINE
ora.scan1.vip
1 ONLINE ONLINE node2
[grid@node2 ~]$
1.3. 將其中一個節點啟動到 mount
[oracle@node2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 27 09:59:25 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SYS@PROD1>startup mount;
ORACLE instance started.
Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 562040400 bytes
Database Buffers 281018368 bytes
Redo Buffers 5132288 bytes
Database mounted.
1.4. 啟動歸檔
SYS@PROD1>archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 68
Current log sequence 69
SYS@PROD1>
SYS@PROD1>alter database archivelog;
Database altered.
SYS@PROD1>archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 68
Next log sequence to archive 69
Current log sequence 69
1.5. 開啟資料庫
兩個節點分別開啟
一節點:
SYS@PROD1>alter database open;
Database altered.
SYS@PROD1>
二節點:
[oracle@node1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 27 10:02:19 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SYS@PROD2>startup
ORACLE instance started.
Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 595594832 bytes
Database Buffers 247463936 bytes
Redo Buffers 5132288 bytes
Database mounted.
Database opened.
SYS@PROD2>
SYS@PROD2>archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 7
Next log sequence to archive 8
Current log sequence 8
SYS@PROD2>
2. 關閉歸檔
2.1. 確認歸檔狀態
SYS@PROD1>archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 69
Next log sequence to archive 70
Current log sequence 70
2.2. 關閉資料庫
前面已經關閉了資料庫,檢視叢集狀態:(注意手動開啟的庫,還得手動關閉,因為rac叢集不認手動關啟庫的命令)
[grid@node2 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.FRA.dg
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.LISTENER.lsnr
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.OCR.dg
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.asm
ONLINE ONLINE node1 Started
ONLINE ONLINE node2 Started
ora.eons
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.gsd
OFFLINE OFFLINE node1
OFFLINE OFFLINE node2
ora.net1.network
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.ons
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.registry.acfs
ONLINE ONLINE node1
ONLINE ONLINE node2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE node2
ora.node1.vip
1 ONLINE ONLINE node1
ora.node2.vip
1 ONLINE ONLINE node2
ora.oc4j
1 OFFLINE OFFLINE
ora.prod.db
1 OFFLINE OFFLINE Instance Shutdown
2 OFFLINE OFFLINE Instance Shutdown
ora.prod2.db
1 OFFLINE OFFLINE
2 OFFLINE OFFLINE
ora.scan1.vip
1 ONLINE ONLINE node2
2.3. 將其中一個節點啟動到 mount
[oracle@node2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 27 10:20:16 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SYS@PROD1>startup mount;
ORACLE instance started.
Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 562040400 bytes
Database Buffers 281018368 bytes
Redo Buffers 5132288 bytes
Database mounted.
2.4. 關閉歸檔
SYS@PROD1>archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 69
Next log sequence to archive 70
Current log sequence 70
SYS@PROD1>
SYS@PROD1>alter database noarchivelog;
Database altered.
SYS@PROD1>archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 69
Current log sequence 70
SYS@PROD1>
2.5. 開啟資料庫
兩個節點分別開啟
一節點:
SYS@PROD1>alter database open;
Database altered.
二節點:
[oracle@node1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 27 10:23:36 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SYS@PROD2>startup
ORACLE instance started.
Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 595594832 bytes
Database Buffers 247463936 bytes
Redo Buffers 5132288 bytes
Database mounted.
Database opened.
SYS@PROD2>
SYS@PROD2>archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 8
Current log sequence 9
SYS@PROD2>
注意:手動開啟的庫,還得手動關閉,因為rac叢集不認手動關啟庫的命令。
節點一:
SYS@PROD1>shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@PROD1>
節點二:
SYS@PROD2>shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
——叢集命令啟動資料庫:
[grid@node2 ~]$ srvctl start database -d prod
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31397003/viewspace-2128191/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- rac下啟動關閉與更改歸檔模式模式
- rac下啟動關閉與更改歸檔模式(zt)模式
- oracle 10g rac下啟動關閉與更改歸檔模式Oracle 10g模式
- archive log 歸檔模式 啟動關閉Hive模式
- rac下啟動關閉與更改歸檔模式 時CLUSTER_DATABASE 作用模式Database
- Oracle 11g RAC的啟動、關閉及修改歸檔總結Oracle
- oracle入門之1 rac下啟動關閉與更改歸檔模式Oracle模式
- oracle入門之1 rac下啟動關閉與更改歸檔模式 (zt)Oracle模式
- oracle 開啟、關閉歸檔Oracle
- Oracle RAC 啟動與關閉Oracle
- Oracle11g RAC在例項關閉後自動在啟動例項上歸檔Oracle
- oracle 歸檔日誌開啟,關閉Oracle
- 關閉和開啟歸檔日誌
- 開啟與關閉oracle的歸檔Oracle
- 11g rac ASM下最簡單歸檔開啟/關閉方法ASM
- 如何啟動或關閉oracle的歸檔(ARCHIVELOG)模式OracleHive模式
- RAC下啟動日誌歸檔模式模式
- ORACLE 歸檔日誌開啟關閉方法Oracle
- rac 管理 啟動關閉資料庫資料庫
- oracle11g RAC 啟動歸檔模式Oracle模式
- ORACLE RAC 啟用歸檔Oracle
- 10g關閉歸檔/啟用閃回恢復區歸檔
- RAC 資料庫的啟動與關閉資料庫
- Oracle 10g RAC 啟動與關閉Oracle 10g
- ORACLE RAC 的啟動和關閉順序Oracle
- Oracle10g RAC 關閉及啟動Oracle
- 有關歸檔模式的啟動模式
- oracle RAC開啟歸檔模式Oracle模式
- RAC 開啟歸檔日誌
- 11gr2 x64 rhel5.3 rac 關閉歸檔
- RMAN在歸檔/非歸檔,庫關閉/mounted/開啟狀態下的備份
- RAC開啟資料庫歸檔資料庫
- Oracle 11gR2 RAC的關閉和啟動Oracle
- Oracle10g RAC 關閉及啟動步驟Oracle
- 【RAC】啟動/關閉CRS, OHAS, ASM & RDBMS 的步驟ASM
- Oracle 10g RAC正常關閉及啟動順序Oracle 10g
- Oracle9i / 10g RAC 啟動與關閉Oracle
- oracle 11g RAC 啟動和關閉和一些維護命令Oracle