Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 create log file

Author  Topic 

gongxia649
So Suave

344 Posts

Posted - 2006-05-11 : 10:20:41
how do i create a log file after i exec a proc.

gongxia649
So Suave

344 Posts

Posted - 2006-05-11 : 14:39:16
bump
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2006-05-11 : 15:04:12
what does that even mean?

Do you want to log the activity of a sproc?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam
Go to Top of Page

gongxia649
So Suave

344 Posts

Posted - 2006-05-11 : 15:46:27
lets say.
select * from items

result is going to show on query analyzer.
i also want to show the results in a log file.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2006-05-11 : 15:59:38
You have to build that process yourself manually...for insert,update and delete you could build triggers

In either case it requires code by you



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam
Go to Top of Page

gongxia649
So Suave

344 Posts

Posted - 2006-05-11 : 20:39:38
using a trigger can create a log file?
i didnt know that
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-05-12 : 01:27:12
If you are trying to create an "audit" of changes you would be better to insert the changed rows into a separate audit table - rather than to "export" them to a file.

That way you can report on the changes for specific criteria etc., but you can also produce chronological reports of changes - which is all you would get from a log file!

But there again maybe the log file is to communicate the changes to some other application?

What problem you are trying to solve?

Kristen
Go to Top of Page
   

- Advertisement -