dbTalk Databases Forums  

Dynamically changing my error log

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Dynamically changing my error log in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jamie Thomson
 
Posts: n/a

Default Dynamically changing my error log - 09-17-2003 , 07:30 AM






Hi,
I am logging the execution of a package to a log file
using the logging capability on the package properties.

However, I don't like the fact that each new run logs to
the same log file just seperated by a line of asterixs.
What I want to do is, on each seperate package execution,
output to a file called "filenameYYYYMMDDHHMI.log" or
something similar. You get the idea.

So, how do I dynamically change the name of that log file.
Obviously I need an ActiveX Script to do this but none of
the documentation that I have tells you the name of the
property which holds the name of this log file. Can anyone
help?

TIA.

Regards
Jamie


Reply With Quote
  #2  
Old   
Ryan Waight
 
Posts: n/a

Default Re: Dynamically changing my error log - 09-17-2003 , 07:35 AM






sqldts.com has example code for overwriting the error log on each executing
rather than appending, you could modify this code to rename.
http://www.sqldts.com/?240

--
HTH
Ryan Waight, MCDBA, MCSE

"Jamie Thomson" <jamie.thomson (AT) int21 (DOT) com> wrote

Quote:
Hi,
I am logging the execution of a package to a log file
using the logging capability on the package properties.

However, I don't like the fact that each new run logs to
the same log file just seperated by a line of asterixs.
What I want to do is, on each seperate package execution,
output to a file called "filenameYYYYMMDDHHMI.log" or
something similar. You get the idea.

So, how do I dynamically change the name of that log file.
Obviously I need an ActiveX Script to do this but none of
the documentation that I have tells you the name of the
property which holds the name of this log file. Can anyone
help?

TIA.

Regards
Jamie




Reply With Quote
  #3  
Old   
Jamie Thomson
 
Posts: n/a

Default Re: Dynamically changing my error log - 09-17-2003 , 08:06 AM



Thanks Ryan,
I was looking at that article before I posted and decided then that if
there wasn't a better way then I would do as you suggest. Its not
exactly what I want but it may have to do.

Can someone confirm whether or not it is possible to dynamically change
the name of the log file?

Thanks
Jamie




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

Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Dynamically changing my error log - 09-17-2003 , 08:21 AM



Yes and you would do it exactly as stated

You use an Active Script task and set the LogFileName to whatever you want
it to be. You can assign to it the value of a global variable which if
using SQL Server 2000 you can set through DTSRUN and the /A switch.

You can set it dynamically if you want it based on date values by following
this article.

How can I change the filename for a text file connection?
(http://www.sqldts.com/default.aspx?200)



--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Jamie Thomson" <frinck109 (AT) yahoo (DOT) co.uk> wrote

Quote:
Thanks Ryan,
I was looking at that article before I posted and decided then that if
there wasn't a better way then I would do as you suggest. Its not
exactly what I want but it may have to do.

Can someone confirm whether or not it is possible to dynamically change
the name of the log file?

Thanks
Jamie




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



Reply With Quote
  #5  
Old   
Jamie T
 
Posts: n/a

Default Re: Dynamically changing my error log - 09-17-2003 , 10:15 AM




Thanks all, thats great.
I missed the reference to <pkg>.LogFileName on sqldts.com

Regards
Jamie



*** Sent via Developersdex http://www.developersdex.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.