Home » RDBMS Server » Server Administration » Tracking Database Links
Tracking Database Links [message #392382] Tue, 17 March 2009 13:31 Go to next message
Ivancleber da Silva Neves
Messages: 74
Registered: July 2002
Member
How can I track if a database link is being used or not ? Is there a way to audit when a statement references a database link ? Any other way ? How could I do that ?

Thanks in advance
Re: Tracking Database Links [message #392383 is a reply to message #392382] Tue, 17 March 2009 13:42 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/ds_concepts.htm#sthref3975
You can only audit the sql which might use the database link.

Re: Tracking Database Links [message #392388 is a reply to message #392383] Tue, 17 March 2009 14:07 Go to previous messageGo to next message
Ivancleber da Silva Neves
Messages: 74
Registered: July 2002
Member
Let me explain my need. I have several database links created im my instance ( almost 300 ). Most of them are no longer used. I just want to find out what are still referenced in select statments and drop the other ones. I donĀ“t need to audit the objets in the target instance. I just want to know if the link is still being used. There must be a way of doing this. Any ideia ? DDL trigger ? Could I track DML statmens and seek for "@" in the text ?

Thanks in advance

Re: Tracking Database Links [message #392389 is a reply to message #392388] Tue, 17 March 2009 14:20 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
That is what the docs said.
You cannot audit the usage of db link.
You can only audit the creation/Drop of a db link.
All you can do is, audit all the sql statements (select/udpdate/...) and look for usage of '@'.

It could be very expensive.
Re: Tracking Database Links [message #392390 is a reply to message #392388] Tue, 17 March 2009 14:26 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
You can also drop them and see what are the problems.

Regards
Michel
Re: Tracking Database Links [message #392393 is a reply to message #392389] Tue, 17 March 2009 14:41 Go to previous messageGo to next message
Ivancleber da Silva Neves
Messages: 74
Registered: July 2002
Member
Can i put in memory the table where the audited statment are written to be less expensive ?

Thanks a lot
Re: Tracking Database Links [message #392394 is a reply to message #392393] Tue, 17 March 2009 14:44 Go to previous message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
It is auditing that is expensive, If it is done the way you want.
Does not matter where the records are written.
Previous Topic: Schema size is very large - LOBSEGMENT
Next Topic: Error 600 encountered while recovering transaction (24, 20)
Goto Forum:
  


Current Time: Tue Dec 03 00:36:36 CST 2024