Run the following query under context of any system or user database to get the sql server database engine account and the account for sql […]
How to tell when data changed in a table?
This query will show list of each table when it was last scanned SELECTOBJECT_NAME(OBJECT_ID) AS TableName,[database_id],[object_id],[index_id],[user_seeks],[user_scans],[user_lookups],[user_updates],[last_user_seek],[last_user_scan],[last_user_lookup],[last_user_update],[system_seeks],[system_scans],[system_lookups],[system_updates],[last_system_seek],[last_system_scan],[last_system_lookup],[last_system_update]FROM sys.dm_db_index_usage_statsWHERE database_id = DB_ID( ‘NameOfDatabase’) Note: Replace the ‘NameOfDatabase‘ […]