November 21, 2008 at 10:26 pm
I want to know how you can identify pc name in sql server
like any user deleted one table i want to know from which
pc that table was deleted
table was already deleted one week ago
November 21, 2008 at 11:25 pm
Are you trying to get Client Host Name from the past records?
Then you may need to try Log Reader to see which clients connected at that time....
Incase you are looking to read server name then
SELECT SERVERPROPERTY('MachineName') will give you Server Host Name.
For Cluster Servers you can use SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS') which will work only in SQL 2005
Regards,
Sakthi
My Blog -> http://www.sqlserverdba.co.cc
November 21, 2008 at 11:33 pm
No actually problem is that we have one common login
and some tables has been deleted from database xyz now we want
to know who deleted these table from database xyz
for this we need pcname from which sql statement
executed to delete table
November 22, 2008 at 12:34 am
If you don't already have some form of auditing in place, there's no way you're going to identify historical events. If you're setting up auditing, then you can use the host_name() function or the host_name column in sys.dm_exec_sessions
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 23, 2008 at 4:08 pm
If you have not disabled the default trace you might just be able to figure out what happened. The default trace captures 5 MB of data then rolls over to a new file, and the last 5 files are kept. Look in "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG" for files named log_###.trc. Figure out which one to open based on the timestamps of the files, then load it into profiler and see if you can locate the row that indicates when the table was dropped. You can at least get the hostname from where the drop command was issued.
Never heard of the default trace? Read this: http://www.sqlservercentral.com/articles/SQL+Server+2005/64547/[/url]
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply