0

I'm in the planning stage/phase of migrating one of our SQL Server 2000 databases to 2008. Our database holds numerous tables (hundreds) and stored procedures (hundreds). I'm trying to figure out which are in use and which are not. My first guess was to look in the sysobjects table and see if there's a field that stores the a 'last accessed' but I can't seem to find anything within the MSDN documentation.

What's the best way to go about investigating which objects are in use or not in SQL Server 2000?

2 Answers 2

1

Out of luck. No way. SQL Server does not track usage timestamps for objects.

1
  • I can't verify this, but all signs point to your answer. Good enough for me. Commented Mar 16, 2011 at 19:20
0

USE YourDatabaseHere;

GO

SELECT name, create_date, modify_date

FROM sys.objects

GO

I think this is what you are looking for?

EDIT:

http://www.sqlteam.com/article/using-ddl-triggers-in-sql-server-2005-to-capture-schema-changes - a DDL way which may better suit the requirement....

2
  • Not quite. I'm looking for a way to see when a stored procedure or table was accessed last. In other words, the create_date and modify_date are for changes made to the objects. I want to know if there's a way to see when the object was being used (whether by exec call or sql query). Commented Oct 11, 2010 at 15:15
  • sqlteam.com/article/… maybe what you're looking for then? Commented Oct 18, 2010 at 18:15

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.