Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to access the date a table is last changed

Status
Not open for further replies.

BootMeUp

MIS
May 31, 2000
35
0
0
US
In order to automatically provide "last update" date for several tables, I need to find a system table or other source which reflects the last date/time the table had any changes (ok), but preferably only "update".
I tried to use a trigger on the table, however, because of the application which runs on the SQL7 SP3 database (SDE - Spatial Data Engine (GIS)), this somehow conflicted with the automatic index triggers already set by this application. Adding my trigger to the table repeatedly corrupted it.
Any ideas?
Steve A.
 
There is no system table or automatic audit provided in SQL Server 7. You must do one of the following.

1) Create your own mechanism using triggers as you have apparently attempted. How are you adding the code to the trigger? Perhaps we can help you with that task.

2) Add an update datetime column to the tables you wish to audit. Update that date from the application or via trigger.

3) Buy 3rd-party audit trail software. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions in the SQL Server forum. Many of the ideas apply to all forums.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top