Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Detecting no action after amount of time

Author  Topic 

nicoz123
Starting Member

1 Post

Posted - 2013-02-06 : 07:17:19
Hi

I have a question regarding SQL SERVER 2008 R2.
I have two databases that are connected with eachother and they exchange information, but for some particular reason it stops working sometimes. Now my question is, is there a way to find out when there is no more action (nothing written in any table) after 30 minutes. Is there a script that can recognise this and execute another script, that I already have, and that way don't have to run manually.
For example it checks if the last timestamp was more than 30 minutes ago?

Thanks anyway
Nicolas

srimami
Posting Yak Master

160 Posts

Posted - 2013-02-08 : 17:24:50
I do not have scripts readily available but this can be achieved using batch scripts. The batch scripts checks whether any actions happened for the last 30 minutes on the databases and if No action occurred, you can fire another script to run on databases.
Go to Top of Page
   

- Advertisement -