十年網(wǎng)站開發(fā)經(jīng)驗(yàn) + 多家企業(yè)客戶 + 靠譜的建站團(tuán)隊(duì)
量身定制 + 運(yùn)營(yíng)維護(hù)+專業(yè)推廣+無(wú)憂售后,網(wǎng)站問(wèn)題一站解決
1.沒有設(shè)置log_archive_dest_1參數(shù),歸檔文件沒有同步
創(chuàng)新互聯(lián)是一家集網(wǎng)站建設(shè),安鄉(xiāng)企業(yè)網(wǎng)站建設(shè),安鄉(xiāng)品牌網(wǎng)站建設(shè),網(wǎng)站定制,安鄉(xiāng)網(wǎng)站建設(shè)報(bào)價(jià),網(wǎng)絡(luò)營(yíng)銷,網(wǎng)絡(luò)優(yōu)化,安鄉(xiāng)網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強(qiáng)企業(yè)競(jìng)爭(zhēng)力??沙浞譂M足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時(shí)我們時(shí)刻保持專業(yè)、時(shí)尚、前沿,時(shí)刻以成就客戶成長(zhǎng)自我,堅(jiān)持不斷學(xué)習(xí)、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實(shí)用型網(wǎng)站。
Mon Nov 07 17:39:12 2016
Using STANDBY_ARCHIVE_DEST parameter default value as USE_DB_RECOVERY_FILE_DEST
Mon Nov 07 17:40:12 2016
Using STANDBY_ARCHIVE_DEST parameter default value as USE_DB_RECOVERY_FILE_DEST
Mon Nov 07 17:41:12 2016
Using STANDBY_ARCHIVE_DEST parameter default value as USE_DB_RECOVERY_FILE_DEST
Mon Nov 07 17:42:12 2016
Using STANDBY_ARCHIVE_DEST parameter default value as USE_DB_RECOVERY_FILE_DEST
Mon Nov 07 17:43:12 2016
Using STANDBY_ARCHIVE_DEST parameter default value as USE_DB_RECOVERY_FILE_DEST
Mon Nov 07 17:44:12 2016
Using STANDBY_ARCHIVE_DEST parameter default value as USE_DB_RECOVERY_FILE_DEST
Mon Nov 07 17:45:12 2016
Using STANDBY_ARCHIVE_DEST parameter default value as USE_DB_RECOVERY_FILE_DEST
Mon Nov 07 17:46:12 2016
Using STANDBY_ARCHIVE_DEST parameter default value as USE_DB_RECOVERY_FILE_DEST
解決方法:
[oracle@dg2 dbs]$ vim initcheng.ora --添加歸檔文件的存放路徑(primary和standby節(jié)點(diǎn))
*.log_archive_dest_1='LOCATION=/u01/oradata/tong/archive valid_for=(all_logfiles,all_roles) db_unique_name=cheng'
[oracle@dg2 dbs]$
2.主庫(kù)節(jié)點(diǎn)(primary)沒有權(quán)限往log_archive_dest_1寫入
ARCH: Archival stopped, error occurred. Will continue retrying
ORACLE Instance cheng - Archival Error
ORA-16014: log 4 sequence# 26 not archived, no available destinations
ORA-00312: online log 4 thread 1: '/u01/oradata/tong/sredo04.log'
Errors in file /u01/diag/rdbms/cheng/cheng/trace/cheng_arc1_6272.trc:
ORA-16014: log 4 sequence# 26 not archived, no available destinations
ORA-00312: online log 4 thread 1: '/u01/oradata/tong/sredo04.log'
解決方法:
[oracle@dg2 dbs]$ vim initcheng.ora --primary和standby都修改
*.log_archive_dest_1='LOCATION=/u01/oradata/tong/archive valid_for=(all_logfiles,all_roles) db_unique_name=cheng'
*.log_archive_dest_2='service=cheng LGWR SYNC AFFIRM valid_for=(online_logfiles,all_roles) db_unique_name=cheng'
[oracle@dg2 dbs]$
3.standby庫(kù)沒有開啟閃回
db_recovery_file_dest_size of 2000 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Wed Nov 09 22:38:19 2016
Starting ORACLE instance (normal)
解決方法:
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
NO
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> shutdown abort
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 830930944 bytes
Fixed Size 2217912 bytes
Variable Size 490735688 bytes
Database Buffers 335544320 bytes
Redo Buffers 2433024 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database flashback on;
Database altered.
SQL> alter database open;
Database altered.
SQL> select flashback_on from V$database;
FLASHBACK_ON
------------------
YES
SQL>
4.standby控制文件損壞
SQL> alter database recover managed standby database disconnect;
alter database recover managed standby database disconnect
*
ERROR at line 1:
ORA-01665: control file is not a standby control file
SQL>
解決方法:
如果standby節(jié)點(diǎn)的控制文件損壞,備份primary的控制文件傳過(guò)去
(1).primary節(jié)點(diǎn)備份控制文件
SQL> alter database create standby controlfile as '/tmp/1.ctl';
Database altered.
SQL>
[oracle@dg1 ~]$ scp /tmp/1.ctl oracle@dg2:/tmp/
(2).standby節(jié)點(diǎn)還原控制文件
[oracle@dg2~]$ cp -a /tmp/1.ctl /u01/oradata/tong/control01.ctl
[oracle@dg2~]$ cp -a /u01/oradata/tong/control01.ctl /u01/flash_recovery_area/tong/control02.ctl
5.primary和standby節(jié)點(diǎn)的歸檔日志不一至
dg1節(jié)點(diǎn):
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/oradata/tong/archive --歸檔路徑與standby節(jié)點(diǎn)不一至
Oldest online log sequence 37
Next log sequence to archive 39
Current log sequence 39 --當(dāng)前日志序列號(hào)與syandby不一至
SQL>
dg2節(jié)點(diǎn):
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination ?/dbs/arch --路徑兩個(gè)節(jié)點(diǎn)必須一至
Oldest online log sequence 26
Next log sequence to archive 0
Current log sequence 37
SQL>
解決方法:
[oracle@dg1 ~]$ vim /u01/product/11.2.0.1/db_1/dbs/inittong.ora --修改pfile文件(兩個(gè)節(jié)點(diǎn))
*.log_file_name_convert='/u01/oradata/tong','/u01/oradata/tong'
*.db_file_name_convert='/u01/oradata/tong','/u01/oradata/tong'
[oracle@dg1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Nov 17 13:50:58 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> create spfile from pfile; --用pfile文件創(chuàng)建spfile文件
File created.
SQL>
[oracle@dg1 ~]$ ll /u01/oradata/tong/archive/ | head -5 --兩個(gè)節(jié)點(diǎn)必須要有文件
total 37556
-rw-r----- 1 oracle oinstall 910336 Nov 16 15:56 1_10_928062493.dbf
-rw-r----- 1 oracle oinstall 128512 Nov 16 15:58 1_11_928062493.dbf
-rw-r----- 1 oracle oinstall 8505344 Nov 16 17:29 1_12_928062493.dbf
-rw-r----- 1 oracle oinstall 2804224 Nov 16 18:14 1_13_928062493.dbf
[oracle@dg1 ~]$