中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

ORA-38760: This database instance failed to turn on flashback database

發布時間:2020-07-12 01:29:52 來源:網絡 閱讀:21028 作者:misterfzw 欄目:關系型數據庫

昨晚學習ORACLE用HR用戶執行:create table reg_copy as select * from regions;居然一片空白沒有任何反應,不想強行退出,于是用ORACLE用戶來終止會話的方式來處理,先后用了三種方式:

第一種:select sid,serial# from v$session where username='HR';

         然后用:ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE

第二種:ALTER SYSTEM DISCONNECT SESSION 'sid,serial#' IMMEDIATE

第三種:用以下命令查到系統級別的進程號,然后殺掉。

SET LINESIZE 100
COLUMN spid FORMAT A10
COLUMN username FORMAT A10
COLUMN program FORMAT A45
 
SELECT s.inst_id,
       s.sid,
       s.serial#,
       p.spid,
       s.username,
       s.program
FROM   gv$session s
       JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id
WHERE  s.type != 'BACKGROUND';

結果今天起來起動數據庫就有如下提示了:

SQL> startup
ORACLE instance started.
Total System Global Area 1536602112 bytes
Fixed Size            2213616 bytes
Variable Size          956303632 bytes
Database Buffers      570425344 bytes
Redo Buffers            7659520 bytes
Database mounted.
ORA-38760: This database instance failed to turn on flashback database

不知跟昨天的事有沒有關系,先記錄下來。晚些做實現進一步驗證。先記錄處理此故障的步驟。

SQL> shutdown immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 1536602112 bytes
Fixed Size            2213616 bytes
Variable Size          956303632 bytes
Database Buffers      570425344 bytes
Redo Buffers            7659520 bytes
Database mounted.
ORA-38760: This database instance failed to turn on flashback database


SQL> alter database flashback on;
alter database flashback on
*
ERROR at line 1:
ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
ORA-38713: Flashback Database logging is already turned on.


SQL> alter database flashback off;

Database altered.

SQL> alter database flashback on;
alter database flashback on
*
ERROR at line 1:
ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
ORA-38714: Instance recovery required.


SQL> alter database flashback off;

Database altered.

SQL> shutdown immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area 1536602112 bytes
Fixed Size            2213616 bytes
Variable Size          956303632 bytes
Database Buffers      570425344 bytes
Redo Buffers            7659520 bytes
Database mounted.
SQL> alter database flashback on;
alter database flashback on
*
ERROR at line 1:
ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
ORA-38714: Instance recovery required.

SQL>  select FLASHBACK_ON from v$database;

FLASHBACK_ON
------------------
RESTORE POINT ONLY

SQL> alter database force logging;

Database altered.

SQL> alter database flashback off;

Database altered.

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-38760: This database instance failed to turn on flashback database


SQL> shutdown immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area 1536602112 bytes
Fixed Size            2213616 bytes
Variable Size          956303632 bytes
Database Buffers      570425344 bytes
Redo Buffers            7659520 bytes
Database mounted.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-38760: This database instance failed to turn on flashback database


SQL> alter database flashback on;
alter database flashback on
*
ERROR at line 1:
ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
ORA-38714: Instance recovery required.

SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-38760: This database instance failed to turn on flashback database

參考大牛的文章,說是跟還原點有關系。
SQL> col name for a30
SQL> /

NAME                   TO_CHAR(TIME,'YYYY/ GUA
------------------------------ ------------------- ---
B1                   2016/06/06 23:03:58 YES

SQL> alter database flashback off;

Database altered.

SQL> select flashback_on from v$database;

FLASHBACK_ON
------------------
RESTORE POINT ONLY

SQL> drop restore point b1;

Restore point dropped.

SQL> select flashback_on from v$database;

FLASHBACK_ON
------------------
NO

SQL> select open_mode from v$database;

OPEN_MODE
--------------------
MOUNTED

SQL> alter database flashback on;
alter database flashback on
*
ERROR at line 1:
ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
ORA-38714: Instance recovery required.


SQL> recover database;
Media recovery complete.
SQL> alter database flashback on;
alter database flashback on
*
ERROR at line 1:
ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
ORA-38714: Instance recovery required.


SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-00264: no recovery required


SQL> shutdown immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area 1536602112 bytes
Fixed Size            2213616 bytes
Variable Size          956303632 bytes
Database Buffers      570425344 bytes
Redo Buffers            7659520 bytes
Database mounted.
SQL> alter database flashback on;
alter database flashback on
*
ERROR at line 1:
ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
ORA-38714: Instance recovery required.


SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-00264: no recovery required

SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery


SQL> alter database open;

Database altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 1536602112 bytes
Fixed Size            2213616 bytes
Variable Size          956303632 bytes
Database Buffers      570425344 bytes
Redo Buffers            7659520 bytes
Database mounted.
Database opened.
SQL> select flashback_on,log_mode from v$database;

FLASHBACK_ON       LOG_MODE
------------------ ------------
NO           ARCHIVELOG

SQL> alter database flashback on;

Database altered.
SQL> select flashback_on,log_mode from v$database;

FLASHBACK_ON       LOG_MODE
------------------ ------------
YES           ARCHIVELOG

結論:

應該是由于數據庫非一致性關閉導致的38760錯誤,如果重啟flashback都報錯38714,就刪除還原點后,再重啟數據庫,可以正常啟動了。以后還是正常關機保險。

參考:http://blog.csdn.net/aaron8219/article/details/10129503

http://blog.chinaunix.net/uid-22948773-id-2821820.html


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

芜湖县| 铁岭市| 广河县| 信丰县| 柘荣县| 福鼎市| 运城市| 固安县| 彝良县| 巴南区| 东平县| 二连浩特市| 安康市| 金乡县| 石台县| 科技| 绥芬河市| 广元市| 达拉特旗| 龙门县| 乐山市| 铁力市| 翁源县| 康保县| 沧源| 邮箱| 朝阳市| 崇礼县| 尖扎县| 镇雄县| 富宁县| 高安市| 凌海市| 永清县| 兴文县| 修武县| 讷河市| 晴隆县| 马鞍山市| 东乌珠穆沁旗| 萝北县|