用dblink能修改_使用dblink导致scn发现改变 – 提供7*24专业数据库(Oracle,SQL Server,MySQL等)恢复和Oracle技术服务@Tel:+86 1342964878...

1.dblink目标端

[oracle@node1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Sat Jan 21 15:25:59 2012

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, Oracle Label Security, OLAP, Data Mining,

Oracle Database Vault and Real Application Testing options

SQL> select dbms_flashback.GET_SYSTEM_CHANGE_NUMBER scn from dual;

SCN

----------

17454270

SQL> select file#,CHECKPOINT_CHANGE# scn from v$datafile;

FILE# SCN

---------- ----------

1 17454265

2 17454265

3 17454265

4 17454265

5 17454265

6 17454265

7 17454265

8 17454265

9 17454265

10 17454265

11 17454265

FILE# SCN

---------- ----------

13 17454265

14 17454265

13 rows selected.

通过这里可以知道,该数据库目前的scn是小于18000000。

2.dblink操作

[oracle@node1 admin]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Sat Jan 21 15:49:39 2012

Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select dbms_flashback.GET_SYSTEM_CHANGE_NUMBER scn from dual;

SCN

----------

20359364

SQL> select dbms_flashback.GET_SYSTEM_CHANGE_NUMBER scn from dual@chf;

SCN

----------

20359367

通过这步操作发现目标端的scn发生改变,和原端库scn一致(因为先后关系,有小出入)

3.再次查看dblink目标端

SQL> alter system checkpoint;

System altered.

SQL> select file#,CHECKPOINT_CHANGE# scn from v$datafile;

FILE# SCN

---------- ----------

1 20359409

2 20359409

3 20359409

4 20359409

5 20359409

6 20359409

7 20359409

8 20359409

9 20359409

10 20359409

11 20359409

FILE# SCN

---------- ----------

13 20359409

14 20359409

13 rows selected.

通过checkpoint之后,发现目标库的scn已经发现改变(向前推荐),从而证明使用dblink,确实使得scn小的库和scn大的库一致。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值