SQL Tuning advisor question

  • From: Michael Schmitt <mschmitt@xxxxxxxxxxxx>
  • To: "<oracle-l@xxxxxxxxxxxxx> (oracle-l@xxxxxxxxxxxxx)" <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 19 Dec 2014 18:06:00 +0000

Hello,

We started seeing a long running query on one of our production environments 
that kicked off around 10pm every night.  The query was running as a user who 
indicated that they were not working at that time and/or have anything 
scheduled.

Looking into this more I realized that the connection was coming from one of 
our test servers, and it looks like it was the SQL Tuning advisor analyzing a 
statement that uses a database link pointed at production (user has/had a link 
pointed at production for some data validation they did).

I was a bit surprised to realize that the SQL Tuning advisor in a test 
environment was accessing a database link like this and hitting our production 
system for the last 5 nights with the same query.  Besides disabling the 
scheduled task, is there anything we can do to prevent this from happening?  I 
am guessing it is grabbing the SQL from AWR or something

Thanks,
Mike

Other related posts: