1. 程式人生 > >ORA-38760: 此資料庫例項無法啟用閃回資料庫:guarantee restore point 導致

ORA-38760: 此資料庫例項無法啟用閃回資料庫:guarantee restore point 導致

        一大早起來開啟sqlplus的時候,發現數據庫啟動不了,並且出現下面的錯誤:

SQL*Plus: Release 11.2.0.1.0 Production on Sat Aug 17 09:04:48 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Enter user-name: sh
Enter password:
ERROR:
ORA-01033: ORACLE initialization or shutdown in progress
Process ID: 0
Session ID: 0 Serial number: 0

         這個錯誤的描述不太精確,需要進一步確認錯誤產生的原因。為此我通過CMD啟動sqlplus通過SYS使用者登入資料庫。
C:\Users\asus>sqlplus/nolog

SQL*Plus: Release 11.2.0.1.0 Production on 星期六 8月 17 08:55:12 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

SQL> conn sys/[email protected] as sysdba;
已連線。
SQL> shutdown immediate;
ORA-01109: 資料庫未開啟


已經解除安裝資料庫。
ORACLE 例程已經關閉。

         也就是說,資料庫果然是由於某些原因而無法開啟。為此,試著開啟資料庫,看看是什麼錯誤造成的。
SQL> startup
ORACLE 例程已經啟動。

Total System Global Area  644468736 bytes
Fixed Size                  1376520 bytes
Variable Size             268439288 bytes
Database Buffers          369098752 bytes
Redo Buffers                5554176 bytes
資料庫裝載完畢。
ORA-38760: 此資料庫例項無法啟用閃回資料庫

           那又是什麼原因讓資料庫例項無法啟動閃回資料庫呢?這是,我想到了資料庫啟動或關閉的所有錯誤都會記錄在後臺報警日誌檔案中。為此,下一步,應該去檢視後臺報警日誌檔案,檢視詳細的錯誤資訊。後臺警報日誌檔案就是background_dump_test路徑下的alert_SID.log檔案.把檔案拉到後面就可以看到最近的警報記錄。
SQL> show parameter BACKGROUND_DUMP_DEST;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
background_dump_dest                 string      d:\app\asus\diag\rdbms\test\te
                                                 st\trace

下面是後臺警報日誌檔案對於本次啟動報錯的描述:

Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options.
Using parameter settings in server-side spfile D:\APP\ASUS\PRODUCT\11.2.0\DBHOME_1\DATABASE\SPFILETEST.ORA
System parameters with non-default values:
  processes                = 150
  nls_language             = "AMERICAN"
  nls_territory            = "CHINA"
  nls_date_format          = "yyyy-mm-dd hh24:mi:ss"
  memory_target            = 1G
  control_files            = "D:\APP\ASUS\ORADATA\TEST\CONTROL01.CTL"
  control_files            = "D:\APP\ASUS\FLASH_RECOVERY_AREA\TEST\CONTROL02.CTL"
  db_block_size            = 8192
  compatible               = "11.2.0.0.0"
  log_archive_format       = "ARC%S_%R.%T"
  db_recovery_file_dest    = "D:\app\asus\flash_recovery_area"
  db_recovery_file_dest_size= 3852M
  db_flashback_retention_target= 1440
  undo_tablespace          = "UNDOTBS1"
  undo_retention           = 900
  remote_login_passwordfile= "EXCLUSIVE"
  db_domain                = ""
  dispatchers              = "(PROTOCOL=TCP) (SERVICE=TESTXDB)"
  audit_file_dest          = "D:\APP\ASUS\ADMIN\TEST\ADUMP"
  audit_trail              = "DB"
  db_name                  = "TEST"
  open_cursors             = 300
  diagnostic_dest          = "D:\APP\ASUS"
Sat Aug 17 08:56:14 2013
PMON started with pid=2, OS id=5952 
Sat Aug 17 08:56:14 2013
VKTM started with pid=3, OS id=4924 at elevated priority
Sat Aug 17 08:56:14 2013
GEN0 started with pid=4, OS id=3128 
VKTM running at (10)millisec precision with DBRM quantum (100)ms
Sat Aug 17 08:56:14 2013
DIAG started with pid=5, OS id=4304 
Sat Aug 17 08:56:14 2013
DBRM started with pid=6, OS id=4048 
Sat Aug 17 08:56:14 2013
PSP0 started with pid=7, OS id=3544 
Sat Aug 17 08:56:14 2013
DIA0 started with pid=8, OS id=5484 
Sat Aug 17 08:56:14 2013
MMAN started with pid=9, OS id=6036 
Sat Aug 17 08:56:14 2013
DBW0 started with pid=10, OS id=4192 
Sat Aug 17 08:56:14 2013
LGWR started with pid=11, OS id=5880 
Sat Aug 17 08:56:14 2013
CKPT started with pid=12, OS id=5804 
Sat Aug 17 08:56:15 2013
SMON started with pid=13, OS id=1964 
Sat Aug 17 08:56:15 2013
RECO started with pid=14, OS id=1900 
Sat Aug 17 08:56:15 2013
MMON started with pid=15, OS id=2072 
Sat Aug 17 08:56:15 2013
MMNL started with pid=16, OS id=4412 
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
starting up 1 shared server(s) ...
ORACLE_BASE from environment = D:\app\asus
Sat Aug 17 08:56:15 2013
ALTER DATABASE   MOUNT
Successful mount of redo thread 1, with mount id 2121853871
Allocated 3981204 bytes in shared pool for flashback generation buffer
Starting background process RVWR
Sat Aug 17 08:56:20 2013
RVWR started with pid=20, OS id=3680 
Can not open flashback thread because there is no more space in flash recovery area
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: ALTER DATABASE   MOUNT
Sat Aug 17 08:56:22 2013
ALTER DATABASE OPEN
Errors in file d:\app\asus\diag\rdbms\test\test\trace\test_ora_5552.trc:
ORA-38760: 此資料庫例項無法啟用閃回資料庫
ORA-38760 signalled during: ALTER DATABASE OPEN...
Sat Aug 17 09:11:18 2013
Errors in file d:\app\asus\diag\rdbms\test\test\trace\test_m000_5136.trc:
ORA-19815: WARNING: db_recovery_file_dest_size of 4039114752 bytes is 99.92% used, and has 3282432 remaining bytes available.
************************************************************************
You have following choices to free up space from recovery area:
1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard,
   then consider changing RMAN ARCHIVELOG DELETION POLICY.
2. Back up files to tertiary device such as tape using RMAN
   BACKUP RECOVERY AREA command.
3. Add disk space and increase db_recovery_file_dest_size parameter to
   reflect the new space.
4. Delete unnecessary files using RMAN DELETE command. If an operating
   system command was used to delete files, then use RMAN CROSSCHECK and
   DELETE EXPIRED commands.
************************************************************************
       從上面的語句可以看出是閃回恢復區的空間快用完了,所以資料庫啟動不了。為此,首要任務應該是擴大閃回恢復區的空間或刪除、移出部分閃回恢復區中的檔案以讓閃回恢復區有足夠的空間使用。

      檢視v$flashback_database_log果然用於閃回的空間已經用完了,另外從v$flash_recovery_area_usage來看,閃回恢復區的空間的確已經達到了警戒值。

SQL> col file_type format A20;
SQL> set linesize 120 pagesize 100;
SQL> select * from v$flash_recovery_area_usage;

FILE_TYPE            PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ---------------
CONTROL FILE                          0                         0               0
REDO LOG                              0                         0               0
ARCHIVED LOG                      48.91                         0              66
BACKUP PIECE                       30.4                         0               3
IMAGE COPY                            0                         0               0
FLASHBACK LOG                     20.61                         0             208
FOREIGN ARCHIVED LOG                  0                         0               0

已選擇7行。

SQL> select * from v$flashback_database_log ;

OLDEST_FLASHBACK_SCN OLDEST_FLASHBA RETENTION_TARGET FLASHBACK_SIZE ESTIMATED_FLASHBACK_SIZE
-------------------- -------------- ---------------- -------------- ------------------------
                   0                            1440      832438272                        0
       這時,我忽然想起幾天前似乎建立了一個guarantee restore point,可能就是它佔用了大量的空間,retention_target為1天,該guarantee restore point也就沒什麼意義了。
SQL> col time format A20;
SQL> col restore_point_time format A20;
SQL> col name format A10;
SQL> set linesize 150;
SQL> select * from v$restore_point;

       SCN DATABASE_INCARNATION# GUA STORAGE_SIZE TIME                 RESTORE_POINT_TIME   PRE NAME
---------- --------------------- --- ------------ -------------------- -------------------- --- ----------
   2808629                     2 YES    832438272 11-8月 -13 03.43.20.                      YES NOW_GUARRA
                                                  000000000 下午                                NTEE

   2809035                     2 NO             0 11-8月 -13 03.51.48.                      YES NOW_PRESER
                                                  000000000 下午                                VE

   2592127                     2 NO             0 08-8月 -13 04.56.57.                      NO  RESP
                                                  000000000 下午
     果然,存在,而且從storage_size來看,基本上佔據了所有的用於flashback log的空間。至此,癥結已經找到。是由於guarantee restore point 導致的空間不足。
SQL> alter database flashback off;

資料庫已更改。

SQL> alter database open;
alter database open
*
第 1 行出現錯誤:
ORA-38760: 此資料庫例項無法啟用閃回資料庫


SQL> drop restore point now_guarrantee;

還原點已刪除。

SQL> alter database flashback on;
alter database flashback on
*
第 1 行出現錯誤:
ORA-38706: 無法啟用 FLASHBACK DATABASE 事件記錄。
ORA-38714: 要求進行例項恢復。


SQL> alter database open;

資料庫已更改。

SQL> select * from v$restore_point;

       SCN DATABASE_INCARNATION# GUA STORAGE_SIZE TIME                 RESTORE_POINT_TIME   PRE NAME
---------- --------------------- --- ------------ -------------------- -------------------- --- ----------
   2809035                     2 NO             0 11-8月 -13 03.51.48.                      YES NOW_PRESER
                                                  000000000 下午                                VE

   2592127                     2 NO             0 08-8月 -13 04.56.57.                      NO  RESP
                                                  000000000 下午

SQL> shutdown immediate;
資料庫已經關閉。
已經解除安裝資料庫。
ORACLE 例程已經關閉。
SQL> startup mount;
ORACLE 例程已經啟動。

Total System Global Area  644468736 bytes
Fixed Size                  1376520 bytes
Variable Size             268439288 bytes
Database Buffers          369098752 bytes
Redo Buffers                5554176 bytes
資料庫裝載完畢。
SQL> alter database flashback on;

資料庫已更改。

SQL> alter database open;

資料庫已更改。

相關推薦

ORA-38760: 資料庫例項無法啟用資料庫guarantee restore point 導致

        一大早起來開啟sqlplus的時候,發現數據庫啟動不了,並且出現下面的錯誤: SQL*Plus: Release 11.2.0.1.0 Production on Sat Aug 17 09:04:48 2013 Copyright (c) 1982, 2

oracle的查詢、表、資料庫(轉)

/* 一、 要使用閃回查詢,資料庫必須開啟automatic undo management,必須有undo表空間,必須設定好回滾段的保留時間 */ -- 在sqlplus中檢視undo_management引數值是否為AUTO,如果是“MANUAL”手動,需要修改為“A

MongoDB配置及解答mongodb cmd中安裝及連線資料庫 mongodb無法安裝及連線資料庫解答

mongodb 介紹 mongodb是一個流行的nosql資料庫,not only sql,介於非關係型和關係型資料庫之間。 比sqlite重,比mysql輕。入門單獨低但教程較少,個人程式設計師和創業公司用的多點。 優點: 讀效能高。資料儲存在記憶體中,通過一定

oracle資料庫

SQL> alter system set db_recovery_file_dest_size=10g; System altered. SQL> alter system set db_recovery_file_dest='/arch';

如何利用資料庫特性恢復failover 後的dataguard 環境?

11g dataguard standby 切成主庫,測試完成後恢復為原standby 環境 ####################### 概述: 11204 單機對單機實施dg,因局方要求需要(讀寫模式)開啟standby ;而這時原生產環境不能有任何影響動,依然對外服

【DG】利用資料庫(flashback)修復Failover後的DG環境

13.2.1 Flashing Back a Failed Primary Database into a Physical Standby Database The following steps assume that a failover has been performed to a

Oracle DB執行資料庫

BEGIN_TIM END_TIME FLASHBACK_DATA DB_DATA REDO_DATA EST_FB_SZE --------- --------- -------------- ---------- ---------- ---------- 12-FEB-09 12-FEB-09 163

FlashBack總結之資料庫刪除

SQL> select * from v$flashback_database_logfile; NAME                                                                    LOG#    THREAD# SEQUENCE#      

解決 “Enterprise Manager 無法連線到資料庫例項

昨天寫完建立表約束,建立檢視,序列,今天就碰到一個問題,我在安裝好oracle以後,好久沒有登入企業管理器,發現無法連線到資料庫例項,介面顯示例項已開啟,狀態為成功。如下圖:  然後我到登入頁面重新認證主機,一直提示我必須指定連線字串,重新輸入連線字串點選登入還是一樣,

Oracle 10g (10.2.0.4.0) 新建資料庫例項85%卡住, OracleDBConsoleorcl無法啟動 EM建立問題修復

問題描述:                Oracle 10g (10.2.0.4.0) 這個版本的oracle以下都稱之為oracle,                在安裝完成後建立資料庫例項的時候,都會在85%時卡住很長的時候,                但在長時

Enterprise Manager 無法連線到資料庫例項

今天發現EM突然不能用,介面顯示如下 但是資料庫例項和監聽確實已經啟動。 查詢sysman使用者的狀態,發現鎖住了 執行alter user sysman account unlock解鎖後,再執行emctl stop dbconsole和emctl start db

oracle11g OEM無法連線到資料庫例項解決辦法

我的電腦是32位的win7家庭版系統,那麼這樣的系統能不能裝上oracle呢?能的!就是可能會出錯,在裝oracle時,每個人遇到的問題都不同,有的人裝了雙系統,有的人重做了系統,真心酸,先讓電腦斷網(不論是無線還是有線)再裝oracle(據說是因為oracle會記住當時的

解決資料庫例項啟動ORA-00205問題

問題描述:ORA-00205: error in identifying control file, check alert log for more info 翻譯:控制檔案的錯誤,請檢查警報日誌中獲得更多資訊 實驗目的:為了做聯機熱備實驗,在原有的兩個控制檔案基礎上

oracle11g建立資料庫例項時報錯ORA-00119、ORA-00132

安裝資料庫例項時報錯(例項名:cjytest): ORA-00119:invailid specification for system parameter LOCAL_LISTENER ORA-00132:syntax error or unresolved netwo

無法啟用本地yum

yum redhat.repo系統版本:[[email protected]/* */ yum.repos.d]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.2 (Maipo)先將redhat.repo備份,

[VS] - Visual Studio 智能感知無法啟用 之解決

tell resharper blog int 重置 配置 res studio 技術 背景 VS 2017 智能感知無法使用,重置 "導入和導出設置..." 後仍無法使用。 解決 我在 VS 上安裝了 Resharper 的,猜測可能跟其配置有關,重置 IntelliSe

區存儲空間報ORA-19815問題的處理方法

ORA-19815 閃回區存儲空間 查詢Oracle的alert日誌是發現ORA-19815告警日誌,具體現象如下:【現象】ORA-19815: WARNING: db_recovery_file_dest_size of 214748364800 bytes is 85.22% used, and

CentOS7解決firefox無法啟用ibus中文輸入的問題

可能 重啟 IE ali AS rtu 進入 後繼 無效 最近換電腦,要換掉使用了6年的舊環境,開始折騰重裝系統; 下了minimal版本的CentOS7.4,然後開始一點點裝想用的東西,多少找到一點十年前折騰LFS的感覺;然後竟然被輸入法拌住了半天,事後回想整個解決流程,

IDEA無法啟用jdk時配置操作

技術分享 分享圖片 http com img ima 直接 使用 分享 以上為報錯內容 在第一項可以看到配置jdk的空間 一般都有原來使用的jdk,可以直接選擇的。IDEA無法啟用jdk時配置操作

檢視Oracle資料庫例項啟動狀態

SQL> conn / as sysdba 已連線到空閒例程。 SQL> startup nomount ORACLE 例程已經啟動。 Total System Global Area 534462464 bytes Fixed Size 21