I have a script that gives me information on blocking locks. I need to create a cron job that will run every 30 minutes or so and emails/pages a DBA when a blocking lock exists for 30 minutes or longer. I thought it would be useful to create a temporary table, run the lock script and populate the table with any blocking locks. Then rerun the lock script in 30 minutes, if the same lock exists, then page/email the DBA. I am having trouble with making the syntax work. Anyone has similar script? Thanks.
