Posts
33
Comments
186
Trackbacks
0
Find out all the changes / alterations to SQL database objects
This script when run under user who has access to 'sys.traces' will be able to sql tables, stored procedures which has been modified.

DECLARE @filename VARCHAR(255) 
SELECT @FileName = SUBSTRING(path, 0, LEN(path)-CHARINDEX('\', REVERSE(path))+1) + '\Log.trc'  
FROM sys.traces   
WHERE is_default = 1;  
print @FileName
SELECT gt.HostName, 
       gt.ApplicationName, 
       gt.NTUserName, 
       gt.NTDomainName, 
       gt.LoginName, 
       gt.SPID, 
       gt.EventClass, 
       te.Name AS EventName,
       gt.EventSubClass,      
       gt.TEXTData, 
       gt.StartTime, 
       gt.EndTime, 
       gt.ObjectName, 
       gt.DatabaseName, 
       gt.FileName, 
       gt.IsSystem
FROM [fn_trace_gettable](@filename, DEFAULT) gt 
JOIN sys.trace_events te ON gt.EventClass = te.trace_event_id 
WHERE EventClass in (164) AND gt.EventSubClass = 0

ORDER BY StartTime DESC; 
posted on Thursday, November 5, 2015 4:22 PM Print
Comments
Gravatar
# re: Find out all the changes / alterations to SQL database objects
covasi
2/20/2018 7:08 PM
This is the best alternative without any doubt for the traditional banks and their system. If you don’t want mainstream banks and their financial services, then www.netspend.com is the best service that you will get in the USA.

Post Comment

Title *
Name *
Email
Comment *  
Verification