Hi, I run a query. See my query below, Code: master..xp[_]cmdshell 'FIND "2007-01-19" "e:mssql7logerrorlog"'[code] The above script is working fine in sql server 2000 server but it is not working in sql server 7. Do you known the reason? Advance Thanks I am posting this on half of S. Ramesh, as he is unable to post this ---------------------------------------- Contributing Editor, Writer & Forums Moderator [URL]http://www.SQL-Server-Performance.Com[/URL] Visit my Blog at [URL='http://dineshasanka.spaces.live.com'][/URL]http://dineshasanka.spaces.live.com/
As your query is effectively running a command from an OS prompt, the Windows account under which your SQL Server instance is running needs to have sufficient OS-level permission on the e:mssql7log folder. So I would assume there are differences at the Windows level between the SQL 7.0 and SQL 2000 instances.
As Adrian mentioned it could be permission issue... He can try the following... exec master.dbo.xp_readerrorlog -1, 'e:mssql7logerrorlog', '2007-01-09' Mohammed U.