dbTalk Databases Forums  

Need to View some type of LOG file

microsoft.public.sqlserver.tools microsoft.public.sqlserver.tools


Discuss Need to View some type of LOG file in the microsoft.public.sqlserver.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AQ Mahomed
 
Posts: n/a

Default Need to View some type of LOG file - 06-08-2004 , 10:08 AM






Hi

I need to view a log of all SQL scripts that were RUN in Sequel Server.
Is It possible to view some type of a log, which will show me the script
as well as when it was run.

Many Thanks
AQ



*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #2  
Old   
Adam Machanic
 
Posts: n/a

Default Re: Need to View some type of LOG file - 06-08-2004 , 11:02 AM






Retroactively, no. Going forward, you can use SQL Server Profiler to catch
scripts as they run.

Look up SQL Profiler in Books Online for information about how to use the
tool.


"AQ Mahomed" <aq786 (AT) shoecrazy (DOT) co.za> wrote

Quote:
Hi

I need to view a log of all SQL scripts that were RUN in Sequel Server.
Is It possible to view some type of a log, which will show me the script
as well as when it was run.

Many Thanks
AQ



*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!



Reply With Quote
  #3  
Old   
Hari Prasad
 
Posts: n/a

Default Re: Need to View some type of LOG file - 06-08-2004 , 11:56 AM



Hi,

You can get the object creation date from sysobjects system table.

use dbname
go
select substring(name,1,35) as Object_name,type as Object_type,crdate from
sysobjects


Description for Object_type displayed in the above query
----------------------------------------------------------
C = CHECK constraint
D = Default or DEFAULT constraint
F = FOREIGN KEY constraint
L = Log
FN = Scalar function
IF = Inlined table-function
P = Stored procedure
PK = PRIMARY KEY constraint (type is K)
RF = Replication filter stored procedure
S = System table
TF = Table function
TR = Trigger
U = User table
UQ = UNIQUE constraint (type is K)
V = View
X = Extended stored procedure


Thanks
Hari
MCDBA

"AQ Mahomed" <aq786 (AT) shoecrazy (DOT) co.za> wrote

Quote:
Hi

I need to view a log of all SQL scripts that were RUN in Sequel Server.
Is It possible to view some type of a log, which will show me the script
as well as when it was run.

Many Thanks
AQ



*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.