Run it against the msdb database
All of the code samples have now been consolidated and moved to my blog at http://house9.blogspot.com/. Many google searches still point here so I am leaving this blog operational.
Showing posts with label sql. Show all posts
Showing posts with label sql. Show all posts
Tuesday, August 4, 2009
Get list of MSSQL jobs that are currently running
The following sql statement will return information about the currently executing MSSQL jobs.
Thursday, March 26, 2009
Get Filenames and Database names from MSSQL
I was doing some clean up on one of our database servers; we have many databases created with backup/restore for testing purposes I was checking for the largest ldf files and making sure those databases were in simple mode and then shirking the data files, there were a few files I could not match to the databases because the mdf and ldf file names were different from the actual database file name - found the following queries using a few google searches
Sunday, May 18, 2008
MSSQL drop and re-add constraints
One of the guys at work hooked me up with this code - quite useful if you want to do a bunch of data inserts but don't want to worry about the order you apply the inserts because of foreign key constraints
Before performing data actions:
After performing data actions:
Thanks to ET for this code bit!
Before performing data actions:
After performing data actions:
Thanks to ET for this code bit!
Subscribe to:
Posts (Atom)
Custom Search