ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 关于DBMS_LOGSTDBY.INSTANTIATE_TABLE

关于DBMS_LOGSTDBY.INSTANTIATE_TABLE

原创 Linux操作系统 作者:aaqwsh 时间:2011-01-07 22:21:43 0 删除 编辑
前两天处理逻辑备库时手工同步了一个表
EXECUTE DBMS_LOGSTDBY.INSTANTIATE_TABLE ('myschema', 'mytable', 'mydblink');
导致网站首页出现问题,本以为该操作是一个 truncate + impdp ,看来不是这样的,有时间做个10046研究一下:
 

INSTANTIATE_TABLE Procedure

This procedure creates and populates a table in the standby database from a corresponding table in the primary database. The table requires the name of the database link (dblink) as an input parameter.

Use the INSTANTIATE_TABLE procedure to:

  • Add a table to a standby database
  • Re-create a table in a standby database

Syntax

DBMS_LOGSTDBY.INSTANTIATE_TABLE (
table_name IN VARCHAR2,
schema_name IN VARCHAR2,
dblink IN VARCHAR2);

Parameters

Table 29-4 describes the parameters for the INSTANTIATE_TABLE procedure.

Table 29-4  DBMS_LOGSTDBY.INSTANTIATE_TABLE Procedure Parameters
Parameter Description

table_name

Name of the table to be created or re-created in the standby database.

schema_name

Name of the schema.

dblink

Name of the database link account that has privileges to read and lock the table in the primary database.

Exceptions

None.

Usage Notes

  • Use this procedure to create and populate a table in a way that keeps the data on the standby database transactionally consistent with the primary database.
  • This procedure assumes that the metadata has been maintained correctly.
  • This table is not safe until the redo log that was current on the primary database at the time of execution is applied to the standby database.

Example

Enter this statement to create and populate a new table on the standby database.

SQL> EXECUTE DBMS_LOGSTDBY.INSTANTIATE_TABLE ('myschema', 'mytable', 'mydblink');

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

上一篇: rdba(转)
请登录后发表评论 登录
全部评论

注册时间:2010-11-24

  • 博文量
    132
  • 访问量
    287982