|
|
|
UDP Broadcaster
      
Group: General Forum Members
Last Login: Wednesday, January 02, 2013 12:15 PM
Points: 1,443,
Visits: 711
|
|
Right.. I guess you'd have to look real close at each object and make really sure it's not being used. It could point you in the right direction I guesss... You could identify for sure that an object is used, but not be 100% certain an object isn't used...
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, April 26, 2013 6:18 AM
Points: 129,
Visits: 205
|
|
Thanks, that you get attention to my wording (not many people captured it) There are several tricks. When you define the suspicious objects that may not be used, you can add simple trigger for select, insert, update with simple insert to log table with info about the table beeng accessed, date, and user. In addition, I am lucky because we adapt the policy and management supporting me with it that all calls (even simple reports with 1 SQL statement) only by stored procedures. )
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Sunday, September 18, 2011 6:11 PM
Points: 355,
Visits: 299
|
|
| Yesterday I run select bucketid, cacheobjtype, objtype, objid, dbid from master.dbo.SYSCACHEOBJECTS where objid = 1718297181
at 10:30 am. I do not understand why it keep lock the other process.
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Sunday, September 18, 2011 6:11 PM
Points: 355,
Visits: 299
|
|
I do not understand I run the process select bucketid, cacheobjtype, objtype, objid, dbid from master.dbo.SYSCACHEOBJECTS where objid = 1718297181. It still lock the process. My other scheduled task aplication in the server could not run due to the lock. Thanks.
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Today @ 7:27 PM
Points: 1,559,
Visits: 1,398
|
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, April 26, 2013 6:18 AM
Points: 129,
Visits: 205
|
|
Please try to read article carefully before trying. #1. You can use "nolock" hint #2. I did exclude where clause from the tests I was doing. Insert all rows to the temporary table and then get the objectid you are looking for. I show it for one object as an example at the beginning of the article. But in reality I never done it on the object by object bases. Always all records from syscache table and then make an analysis
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, November 14, 2012 7:40 AM
Points: 4,
Visits: 12
|
|
I did a slight alteration to the way this works in order to better do what I wanted... Rather than doing the insert each time and then relying on the query at the end to determine if it had been in the cache at one point, I insert up front and then have the job delete from the table any references to that object if it's currently in the cache. This way, whatever is in the table at the end of my monitoring period are things that weren't in the cache at some point during the period.
Granted, it isn't fool-proof going off the cache, but it at least helps narrow things down.
--Kevin Fairchild
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Yesterday @ 3:18 PM
Points: 22,
Visits: 89
|
|
| Okay, this works for SS2005. What exists to do the same kind of thing in SS2000?
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, September 17, 2008 1:04 PM
Points: 1,
Visits: 1
|
|
I saw this tool that finds Unused Stored Procedures: [url=http://www.kellermansoftware.com/p-35-unused-stored-procedures.aspx][/url]
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, May 20, 2013 12:51 PM
Points: 167,
Visits: 492
|
|
Sorry to resurrect this old thread, but I"m in the middle of a project to upgrade our sql 2000 dbs to sql 2008. I'd like to also use this as an opportunity to get rid of any procedures that aren't being used.
For the most part, I like the solution. I'm curious to hear everyone's input though about the frequency he ran the update code. Every 15 minutes? Ouch! Can somoene explain to me why this couldn't just as easily be run every hour or every 3 or 4 hours. If I were to run that code on my dbs every 15 minutes for a month, and have a whole other issue to contend with!
|
|
|
|