|
找到了删除基础表的删除方法
How to Disable a Replication Trigger in Oracle 8.x:
===================================================
Prior to Oracle8, snapshot triggers: $RT, USTRG$ and TLOG$ were PL/SQL
procedures that can be seen and modified (although unsupported) by
users. With the release of Oracle8, the INTERNALIZED trigger was
introduced.
The Internal triggers provide the same functionality as embedded
PL/SQL triggers, but they cannot be seen or modified by users.
Prior to Oracle8, users can easily disable these triggers by issuing
an ALTER TRIGGER command. Since these triggers are now internal in
Oracle8, an ALTER TRIGGER command is not possible.
To disable the $RT triggers in Oracle8, you can execute the
DBMS_SNAPSHOT.BEGIN_TABLE_REORGANIZATION() procedure to destroy the
triggers before performing activity on the replicated table, and
execute the DBMS_SNAPSHOT.END_TABLE_REORGANIZATION() procedure to
recreate them. These procedures are documented in the Replication Manual
to help reorganize your master tables preserving the ability to fast refresh.
However, these procedures will only work with PRIMARY KEY snapshots because
only master tables whose snapshot is refreshed with PRIMARY KEY can be
reorganized and still have the ability to fast refresh.
Example:
Master Site
============
> execute DBMS_SNAPSHOT.BEGIN_TABLE_REORGANIZATION ('SCOTT','T1');
PL/SQL procedure successfully completed.
> INSERT INTO T1 VALUES (5,'THIS IS 5 ');
1 row created.
> COMMIT;
Commit complete.
> SELECT * FROM MLOG$_T1;
no rows selected
> EXECUTE DBMS_SNAPSHOT.END_TABLE_REORGANIZATION ('SCOTT','T1');
PL/SQL procedure successfully completed.
Snapshot Site
==============
> EXEC DBMS_SNAPSHOT.REFRESH('S_T1','F');
PL/SQL procedure successfully completed.
NOTE: This step is necessary to guarantee that a fast refresh will
continue to work AFTER you enable the triggers.
If you skip this step, you will receive an ORA-12034
"snapshot log on \"%s\".\"%s\" younger than last refresh"
and will have to perform a complete refresh.
ALL SNAPSHOTS refreshing off this master table must be refreshed
You will also receive this error if your snapshot is NOT based
on a PRIMARY KEY, but instead, ROWID.
Master Site
============
> INSERT INTO T1 VALUES (6,'I6 NO5?');
1 row created.
> COMMIT;
Commit complete.
> SELECT * FROM MLOG$_T1;
no rows selected
Snapshot Site
==============
> EXEC DBMS_SNAPSHOT.REFRESH('S_T1','F');
PL/SQL procedure successfully completed.
Master Site
============
> select * From t1;
COL1 COL2
---------- ----------
1 test1
6 I6 NO5?
5 THIS IS 5
Snapshot Site
==============
> select * From s_t1;
COL1 COL2
---------- ----------
1 test1
6 I6 NO5 |
|