May 3, 2010 at 3:58 pm
Hi all...not even sure how to phrase the question, but here goes!! I have an application that uses a ton of dbs. I have a list of several, that I am not sure are being used and I want to find out if that is a true statement. Is there a script or tool or ?? that can tell me if a database is being used anymore?? Properties?? I dunno....any suggestions anyone??? Thank you in advance, as always!! 😛
May 3, 2010 at 4:17 pm
Profiler!
Run a trace, filter on the database ID (SQL 2000 or less) or on the DB Name (SQL 2005 up).
Leo
Leo
Nothing in life is ever so complicated that with a little work it can't be made more complicated.
May 3, 2010 at 8:16 pm
Quick eyeball check sp_who2
you could also check the default trace, and see if there has been any activity.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
May 4, 2010 at 8:40 am
May 4, 2010 at 2:16 pm
I agree with the above steps...
but one other option..
you could always check ODBC on the client side...(if it's an MDAC based app)
May 4, 2010 at 2:18 pm
You are welcome.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
May 5, 2010 at 5:09 pm
Set your Database(s) to 'AUTO CLOSE' and then check ErrorLog to see which ones are being used
May 7, 2010 at 2:10 am
Try DMV sys.dm_db_index_usage_stats. If there are no rows for a particular database_id, then the database has not been used since the database last came online
The advantage of the above approach, as opposed to SQL Profiler trace, is that it is a low impact approach
May 7, 2010 at 9:01 am
tony.turner (5/7/2010)
Try DMV sys.dm_db_index_usage_stats. If there are no rows for a particular database_id, then the database has not been used since the database last came onlineThe advantage of the above approach, as opposed to SQL Profiler trace, is that it is a low impact approach
This DMV stats will be there from "sql server last reboot" only.
May 7, 2010 at 9:03 am
May 7, 2010 at 9:50 am
Hi Leo
can you explain how to actually do a trace on sql server 2005
Thanks
Jim
May 7, 2010 at 10:58 am
Angelindiego (5/7/2010)
Thank you all for the ideas, I am trying them all!!!!!!!!!!
You're welcome.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
May 7, 2010 at 11:52 am
Hi Jason
thanks
unfortyunately, working at an AFB, that site is blocked
i will have to read it from home
Jim
May 7, 2010 at 12:01 pm
JC-3113 (5/7/2010)
Hi Leocan you explain how to actually do a trace on sql server 2005
Thanks
Jim
Here is a document that goes through how to do that.
http://msdn.microsoft.com/en-us/library/ms187929.aspx
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
May 7, 2010 at 12:14 pm
Thanks
will take a look at it
Jim
Viewing 15 posts - 1 through 15 (of 32 total)
You must be logged in to reply to this topic. Login to reply