ORA-08189,ORA-01466,ORA-38726

flashback的一些常见问题:
SQL> select timestamp_to_scn(sysdate) from dual;

TIMESTAMP_TO_SCN(SYSDATE)
-------------------------
                  7140853

SQL> alter table orders add (qty2 number);

Table altered.

SQL> select timestamp_to_scn(sysdate) from dual;

TIMESTAMP_TO_SCN(SYSDATE)
-------------------------
                  7140868

SQL> flashback table orders to scn 7140853;
flashback table orders to scn 7140853
                *
ERROR at line 1:
ORA-08189: cannot flashback the table because row movement is not enabled


SQL> alter table orders enable row movement;

Table altered.

SQL> flashback table orders to scn 7140853;

Flashback complete.

SQL> alter table orders drop column qty1;

Table altered.

SQL> flashback table orders to scn 7140853;
flashback table orders to scn 7140853
                *
ERROR at line 1:
ORA-01466: unable to read data - table definition has changed


SQL>               


尝试flash database:


SQL> flashback database to scn 7140853;
flashback database to scn 7140853
*
ERROR at line 1:
ORA-38726: Flashback database logging is not on.


SQL> alter database flashback on;

Database altered.

 

SQL> select DBMS_FLASHBACK.timestamp_to_scn(sysdate) from dual;
select DBMS_FLASHBACK.timestamp_to_scn(sysdate) from dual
       *
ERROR at line 1:
ORA-00904: "DBMS_FLASHBACK"."TIMESTAMP_TO_SCN": invalid identifier


SQL> @ ?rdbms/admin/dbmstran.sql;
SP2-0310: unable to open file "/tpsys/oracle/product/10.2.0/db_1rdbms/admin/dbmstran.sql"
SQL> @ ?/rdbms/admin/dbmstran.sql;

Package created.


Synonym created.


Grant succeeded.


Library created.

create or replace function timestamp_to_scn(query_time IN TIMESTAMP)
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00001: unique constraint (SYS.I_OBJ2) violated

 

Function created.

create or replace public synonym timestamp_to_scn for sys.timestamp_to_scn
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00001: unique constraint (SYS.I_OBJ2) violated

 

Synonym created.


Grant succeeded.


Grant succeeded.

SQL> select timestamp_to_scn(sysdate) from dual;

TIMESTAMP_TO_SCN(SYSDATE)
-------------------------
                  7143924

SQL> flashback database to scn 7143924;
flashback database to scn 7143924
*
ERROR at line 1:
ORA-38757: Database must be mounted and not open to FLASHBACK.


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

Total System Global Area 1660944384 bytes
Fixed Size                  1219736 bytes
Variable Size             436208488 bytes
Database Buffers         1207959552 bytes
Redo Buffers               15556608 bytes
Database mounted.
SQL> flashback database to scn 7143924;

Flashback complete.

SQL>

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16179598/viewspace-626753/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/16179598/viewspace-626753/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ORA-01547表示数据文件在备份或恢复期间发生了丢失或损坏。这个错误通常会导致数据库无法启动或无法访问特定的数据文件。要解决这个问题,需要找到数据文件的备份,并将其恢复到数据库中,以修复丢失或损坏的数据文件。 ORA-01152表示无法在数据库中找到要恢复的数据文件。这个错误通常发生在尝试恢复一个不存在的数据文件时。解决这个问题的方法是检查数据库的控制文件和日志文件,确保它们包含了正确的数据文件信息。如果需要,可以手动编辑控制文件中的数据文件列表,然后重新尝试恢复操作。 ORA-01110表示打开数据库时遇到了错误。这个错误通常发生在数据库启动过程中,可能与数据文件丢失、控制文件损坏或其他数据库文件问题有关。解决这个问题的方法是检查数据库的错误日志和跟踪文件,找到导致错误的原因,并按照相应的解决方案来修复该问题。这可能涉及到恢复备份的数据文件、修复损坏的控制文件或执行其他相关的数据库维护操作。 综上所述,ORA-01547、ORA-01152和ORA-01110都是与数据库文件相关的错误。要解决这些错误,需要找到原因,并采取适当的措施来修复或恢复相关的文件。这些错误可能会导致数据库无法启动或无法访问特定的数据文件,因此修复这些错误对于数据库的正常运行非常重要。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值