關(guān)閉
1.先關(guān)數(shù)據(jù)庫:
復(fù)制代碼 代碼如下:
[oracle@oeltan1 ~]$ srvctl stop database -d tantest
2.再關(guān)閉crs服務(wù)
[復(fù)制代碼 代碼如下:
root@oeltan1 ~]# crsctl stop crs
啟動(dòng):
復(fù)制代碼 代碼如下:
[root@oeltan1 ~]# crsctl start crs
[oracle@oeltan1 ~]$srvctl start asm -n node_name
上述開機(jī)一般已經(jīng)啟動(dòng)
復(fù)制代碼 代碼如下:
[oracle@oeltan1 ~]$ srvctl start database -d tantest
歸檔設(shè)置:
1. 分別創(chuàng)建兩個(gè)實(shí)例的ASM目錄
任意一個(gè)實(shí)例,grid用戶下:
復(fù)制代碼 代碼如下:
# su - grid
[grid@oeltan1 ~]$ sqlplus "/as sysasm"
SQL> select name from V$asm_diskgroup;
NAME
--------------------------------------------------------------------------------
CRS
DATA1
FRI
SQL> alter diskgroup FRI add directory '+FRI/TANTEST';
SQL> alter diskgroup FRI add directory '+FRI/TANTEST/ARCH1';
還可以通過asmcmd創(chuàng)建目錄:
ASMCMD> pwd
+FRI/TANTEST
ASMCMD> mkdir ARCH2
2.修改歸檔參數(shù)
任意一個(gè)實(shí)例,oracle用戶下:
ALTER SYSTEM SET LOG_ARCHIVE_DEST_1='LOCATION=+FRI/TANTEST/ARCH1' SCOPE=both SID='tantest1';
ALTER SYSTEM SET LOG_ARCHIVE_DEST_1='LOCATION=+FRI/TANTEST/ARCH2' SCOPE=both SID='tantest2';
3.兩個(gè)節(jié)點(diǎn)上分別都執(zhí)行:
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP MOUNT;
SQL> ALTER DATABASE ARCHIVELOG;
SQL> ALTER DATABASE OPEN;
--修改一個(gè)實(shí)例時(shí),另一個(gè)實(shí)例不能在open狀態(tài),否則報(bào)ORA-01126: database must be mounted in this instance and not open in any
4.分別檢查:
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +FRI/tantest/arch1
Oldest online log sequence 14
Next log sequence to archive 15
Current log sequence 15
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +FRI/tantest/arch2
Oldest online log sequence 6
Next log sequence to archive 7
Current log sequence 7
SQL>
您可能感興趣的文章:- 深入剖析哪些服務(wù)是Oracle 11g必須開啟的
- 詳解Linux系統(tǒng)中Oracle數(shù)據(jù)庫程序的啟動(dòng)和關(guān)閉方式
- Oracle cloud control 12c的啟動(dòng)、關(guān)閉及獲取安裝信息的方法
- DBA_Oracle Startup / Shutdown啟動(dòng)和關(guān)閉過程詳解(概念)(對數(shù)據(jù)庫進(jìn)行各種維護(hù)操作)
- Oracle數(shù)據(jù)庫的啟動(dòng)與關(guān)閉方法
- oracle 如何關(guān)閉打開歸檔日志
- ORACLE11g隨RHEL5系統(tǒng)自動(dòng)啟動(dòng)與關(guān)閉的設(shè)置方法
- oracle 服務(wù)啟動(dòng),關(guān)閉腳本(windows系統(tǒng)下)
- Oracle開啟和關(guān)閉的四種模式