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?

osij2is
  • 3,885
  • 2
  • 24
  • 31

2 Answers2

1

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

TomTom
  • 51,649
  • 7
  • 54
  • 136
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....

Khushil
  • 553
  • 3
  • 11
  • 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). – osij2is Oct 11 '10 at 15:15
  • http://www.sqlteam.com/article/using-ddl-triggers-in-sql-server-2005-to-capture-schema-changes maybe what you're looking for then? – Khushil Oct 18 '10 at 18:15