dbTalk Databases Forums  

DTS Task Logging

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


Discuss DTS Task Logging in the microsoft.public.sqlserver.dts forum.



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

Default DTS Task Logging - 02-04-2004 , 10:16 AM






What's the easiest way to log task steps inside DTS? I need to create and
examine some of the variables at certain points as the package steps through
the logs. I need to do it as a Job - verses running it interactively.

--
___________________________
Joe Horton
Database Developer / Software Engineer
WISHA/Legal Services Software Development
Department of Labor and Industries
Voice (360) 902-5928 fax (360) 902-6200



Reply With Quote
  #2  
Old   
Valmir Meneses
 
Posts: n/a

Default RE: DTS Task Logging - 02-04-2004 , 11:01 AM






Hey Joe, (Sorry, I could not resist the Hendrix tribute!
As for development purposes, I use the good old MSGBOX, but it might not suit you
For production pursoses, I write each watchpoint in a LOG_STATUS table with a Connection Object or a SQLTASK
HTH


----- Joe wrote: ----

What's the easiest way to log task steps inside DTS? I need to create an
examine some of the variables at certain points as the package steps throug
the logs. I need to do it as a Job - verses running it interactively

-
__________________________
Joe Horto
Database Developer / Software Enginee
WISHA/Legal Services Software Developmen
Department of Labor and Industrie
Voice (360) 902-5928 fax (360) 902-620




Reply With Quote
  #3  
Old   
Joe
 
Posts: n/a

Default Re: DTS Task Logging - 02-04-2004 , 11:09 AM



Yes - MSGBox works well for Dev - I'm struggling with a scheduled Job - can
you send me a code snippet of how you use the Log_Status -thanks!

"Valmir Meneses" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hey Joe, (Sorry, I could not resist the Hendrix tribute!)
As for development purposes, I use the good old MSGBOX, but it might not
suit you.
For production pursoses, I write each watchpoint in a LOG_STATUS table
with a Connection Object or a SQLTASK.
HTH,



----- Joe wrote: -----

What's the easiest way to log task steps inside DTS? I need to
create and
examine some of the variables at certain points as the package steps
through
the logs. I need to do it as a Job - verses running it
interactively.

--
___________________________
Joe Horton
Database Developer / Software Engineer
WISHA/Legal Services Software Development
Department of Labor and Industries
Voice (360) 902-5928 fax (360) 902-6200






Reply With Quote
  #4  
Old   
Darren Green
 
Posts: n/a

Default Re: DTS Task Logging - 02-04-2004 , 12:02 PM



In message <4532F710-2D4F-40B2-B70F-CCFDD9911D0D (AT) microsoft (DOT) com>, Valmir
Meneses <anonymous (AT) discussions (DOT) microsoft.com> writes
Quote:
Hey Joe, (Sorry, I could not resist the Hendrix tribute!)
As for development purposes, I use the good old MSGBOX, but it might
not suit you.
For production pursoses, I write each watchpoint in a LOG_STATUS table
with a Connection Object or a SQLTASK.
HTH,

In addition-

You can write to the DTS Task log, which comes out in both the package
log file and the tables used by the log to SQL Server option for a
package-

DTSPackageLog.WriteStringToLog "My String"

DTSPackageLog.WriteTaskRecord 1, "Desc"

See the PackageLog object in Books Online for documentation of this
object.

--
Darren Green


Reply With Quote
  #5  
Old   
Joe
 
Posts: n/a

Default Re: DTS Task Logging - 02-04-2004 , 12:25 PM



Hmm - doesn't like:

Function Main()
DTSPackageLog.WriteStringToLog "test"
Main = DTSStepScriptResult_ExecuteTask
End Function


"Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote

Quote:
In message <4532F710-2D4F-40B2-B70F-CCFDD9911D0D (AT) microsoft (DOT) com>, Valmir
Meneses <anonymous (AT) discussions (DOT) microsoft.com> writes
Hey Joe, (Sorry, I could not resist the Hendrix tribute!)
As for development purposes, I use the good old MSGBOX, but it might
not suit you.
For production pursoses, I write each watchpoint in a LOG_STATUS table
with a Connection Object or a SQLTASK.
HTH,


In addition-

You can write to the DTS Task log, which comes out in both the package
log file and the tables used by the log to SQL Server option for a
package-

DTSPackageLog.WriteStringToLog "My String"

DTSPackageLog.WriteTaskRecord 1, "Desc"

See the PackageLog object in Books Online for documentation of this
object.

--
Darren Green



Reply With Quote
  #6  
Old   
Darren Green
 
Posts: n/a

Default Re: DTS Task Logging - 02-04-2004 , 12:52 PM



In message <1022e8phfetl63c (AT) corp (DOT) supernews.com>, Joe
<hortoristic (AT) yahoo (DOT) com> writes
Quote:
Hmm - doesn't like:

Function Main()
DTSPackageLog.WriteStringToLog "test"
Main = DTSStepScriptResult_ExecuteTask
End Function


Help me out a bit, what is the error?


Perhaps I should mention that this is for SQL Server 2000 only. People
rarely post the version these days, so I just guess, and use the answer
which sounds best

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #7  
Old   
Joe
 
Posts: n/a

Default Re: DTS Task Logging - 02-04-2004 , 12:59 PM



Yup SQL2k

Error is:
Error Code: 0
Error Source=Microsoft VBScript runtime error
Error Desc: Object required: ' DTSPackageLog'

"Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote

Quote:
In message <1022e8phfetl63c (AT) corp (DOT) supernews.com>, Joe
hortoristic (AT) yahoo (DOT) com> writes
Hmm - doesn't like:

Function Main()
DTSPackageLog.WriteStringToLog "test"
Main = DTSStepScriptResult_ExecuteTask
End Function



Help me out a bit, what is the error?


Perhaps I should mention that this is for SQL Server 2000 only. People
rarely post the version these days, so I just guess, and use the answer
which sounds best

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org




Reply With Quote
  #8  
Old   
Darren Green
 
Posts: n/a

Default Re: DTS Task Logging - 02-04-2004 , 02:37 PM



In message <1022g9l4mtcle1e (AT) corp (DOT) supernews.com>, Joe
<hortoristic (AT) yahoo (DOT) com> writes
Quote:
Yup SQL2k

Error is:
Error Code: 0
Error Source=Microsoft VBScript runtime error
Error Desc: Object required: ' DTSPackageLog'

Is this in an ActiveX Script Task? For some (annoying) reason the log
object is only available in the Task, not workflow or transform scripts.


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #9  
Old   
Joe
 
Posts: n/a

Default Re: DTS Task Logging - 02-04-2004 , 03:02 PM



Thanks - I got it working - it was really weird - appeared to fix itself
once I exitted package or something. I got it working as a standalone
ActvieX.

What a pain it doesn't work in workflow.

Thanks for your notes Darren.

"Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote

Quote:
In message <1022g9l4mtcle1e (AT) corp (DOT) supernews.com>, Joe
hortoristic (AT) yahoo (DOT) com> writes
Yup SQL2k

Error is:
Error Code: 0
Error Source=Microsoft VBScript runtime error
Error Desc: Object required: ' DTSPackageLog'


Is this in an ActiveX Script Task? For some (annoying) reason the log
object is only available in the Task, not workflow or transform scripts.


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org




Reply With Quote
  #10  
Old   
Joe
 
Posts: n/a

Default Re: DTS Task Logging - 02-04-2004 , 03:42 PM



When using WriteTaskRecord instead of WriteStringToLog - where in the DB
does it write that?

Also - once again it doesn't like my syntax:
DTSPackageLog.WriteTaskRecord (DTSGlobalVariables("gLocalServer").Value)

"Joe" <hortoristic (AT) yahoo (DOT) com> wrote

Quote:
Thanks - I got it working - it was really weird - appeared to fix itself
once I exitted package or something. I got it working as a standalone
ActvieX.

What a pain it doesn't work in workflow.

Thanks for your notes Darren.

"Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote in
message
news:cbFj$zQCgVIAFwoS (AT) sqldts (DOT) com...
In message <1022g9l4mtcle1e (AT) corp (DOT) supernews.com>, Joe
hortoristic (AT) yahoo (DOT) com> writes
Yup SQL2k

Error is:
Error Code: 0
Error Source=Microsoft VBScript runtime error
Error Desc: Object required: ' DTSPackageLog'


Is this in an ActiveX Script Task? For some (annoying) reason the log
object is only available in the Task, not workflow or transform scripts.


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org






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.