Then sign on to your database and create a database link to the CC database.
CREATE DATABASE LINK cc_link CONNECT TO user IDENTIFIED BY pass USING 'cc';
You'll be connecting to the CC database with the userid and password you specify. The USING clause is where you tell the database link which TNS alias to use. If the link is set up correctly, then the following will return a value:
SELECT sysdate FROM dual@cc_link;
Next you need to create a trigger that will insert information into a table in your CC database. The trigger can look similar to the following:
CREATE TRIGGER populate_cc AFTER DDL ON DATABASE BEGIN INSERT INTO change_table@cc_link VALUES ('DDL occurred'); END; /
There are many options on such a database trigger, so I would recommend
reading the Oracle documentation so that you know what type of triggers
to create to meet your requirements.
This was first published in May 2004