Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

sql execution log

 
   Database Help (Home) -> DTS RSS
Next:  Transfer DTS Package Help  
Author Message
pradeep2

External


Since: Jan 28, 2004
Posts: 6



(Msg. 1) Posted: Wed Jan 28, 2004 10:40 pm
Post subject: sql execution log
Archived from groups: microsoft>public>sqlserver>dts (more info?)

I am executing a sql file through dts. Is is possible to get complete
sql execution log (i.e. so many rows updated etc.) and not just step
failure reason.

Please help me with this.
Thanks,
pradeep

 >> Stay informed about: sql execution log 
Back to top
Login to vote
Allan Mitchell

External


Since: Oct 01, 2003
Posts: 1481



(Msg. 2) Posted: Thu Jan 29, 2004 9:59 am
Post subject: Re: sql execution log [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You would need to write your own logger like this.

"executing a sql file"?

If you are using osql then the -o switch might help you.

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
<a rel="nofollow" style='text-decoration: none;' href="http://www.allisonmitchell.com" target="_blank">www.allisonmitchell.com</a> - Expert SQL Server Consultancy.
<a rel="nofollow" style='text-decoration: none;' href="http://www.SQLDTS.com" target="_blank">www.SQLDTS.com</a> - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - <a rel="nofollow" style='text-decoration: none;' href="http://www.sqlpass.org" target="_blank">http://www.sqlpass.org</a>


"pradeep" wrote in message

 > I am executing a sql file through dts. Is is possible to get complete
 > sql execution log (i.e. so many rows updated etc.) and not just step
 > failure reason.
 >
 > Please help me with this.
 > Thanks,
 > pradeep

 >> Stay informed about: sql execution log 
Back to top
Login to vote
pradeep2

External


Since: Jan 28, 2004
Posts: 6



(Msg. 3) Posted: Thu Jan 29, 2004 8:43 pm
Post subject: Re: sql execution log [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Allan,

My requirement is to produce the same log from dts sql task as would
be produced by osql.exe -o. But i don't want to use osql.exe, as i am
using a oledb connection. Pls let me know if you have any ideas.

Thanks
pradeep

"Allan Mitchell" wrote in message ...
 > You would need to write your own logger like this.
 >
 > "executing a sql file"?
 >
 > If you are using osql then the -o switch might help you.
 >
 > --
 > --
 >
 > Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
 > <a rel="nofollow" style='text-decoration: none;' href="http://www.allisonmitchell.com" target="_blank">www.allisonmitchell.com</a> - Expert SQL Server Consultancy.
 > <a rel="nofollow" style='text-decoration: none;' href="http://www.SQLDTS.com" target="_blank">www.SQLDTS.com</a> - The site for all your DTS needs.
 > I support PASS - the definitive, global community
<font color=purple> > for SQL Server professionals - <a rel="nofollow" style='text-decoration: none;' href="http://www.sqlpass.org</font" target="_blank">http://www.sqlpass.org</font</a>>
 >
 >


  > > I am executing a sql file through dts. Is is possible to get complete
  > > sql execution log (i.e. so many rows updated etc.) and not just step
  > > failure reason.
  > >
  > > Please help me with this.
  > > Thanks,
  > > pradeep
 >> Stay informed about: sql execution log 
Back to top
Login to vote
Allan Mitchell

External


Since: Oct 01, 2003
Posts: 1481



(Msg. 4) Posted: Fri Jan 30, 2004 10:37 am
Post subject: Re: sql execution log [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Giving something like a rvnning commentary on the execvtion of the
ExecvteSQL task wovld be qvite laboriovs as this version of DTS does not
have event handlers.
The workarovnd wovld be verbose and wovld vse Global Variables and parameter
mappings (2000)

For INSERTs


Set nocovnt on
declare @cnt int
insert HelloLogger
select 1
vnion
select 2
select @cnt = @@rowcovnt
select @cnt as 'RowsAffected'

UPDATEs

set nocovnt on
declare @cnt int
vpdate hellologger set col1 = col1 where col1 = 1
set @cnt = @@rowcovnt
select @cnt as 'RowsAffected'


If yov are going to vse Stored procs then yov can captvre rows affected
inside the proc and pass them ovt as Ovtpvt parameteres


the DataPvmp task has properties of

RowsInError and RowsComplete which are vsefvl.




--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
<a rel="nofollow" style='text-decoration: none;' href="http://www.allisonmitchell.com" target="_blank">www.allisonmitchell.com</a> - Expert SQL Server Consvltancy.
<a rel="nofollow" style='text-decoration: none;' href="http://www.SQLDTS.com" target="_blank">www.SQLDTS.com</a> - The site for all yovr DTS needs.
I svpport PASS - the definitive, global commvnity
for SQL Server professionals - <a rel="nofollow" style='text-decoration: none;' href="http://www.sqlpass.orgso." target="_blank">http://www.sqlpass.orgso.</a> Yov wovld need to
vse Globalvariables and write their valves ovt.




"pradeep" wrote in message

 > Allan,
 >
 > My reqvirement is to prodvce the same log from dts sql task as wovld
 > be prodvced by osql.exe -o. Bvt i don't want to vse osql.exe, as i am
 > vsing a oledb connection. Pls let me know if yov have any ideas.
 >
 > Thanks
 > pradeep
 >

...
  > > Yov wovld need to write yovr own logger like this.
  > >
  > > "execvting a sql file"?
  > >
  > > If yov are vsing osql then the -o switch might help yov.
  > >
  > > --
  > > --
  > >
  > > Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
  > > <a rel="nofollow" style='text-decoration: none;' href="http://www.allisonmitchell.com" target="_blank">www.allisonmitchell.com</a> - Expert SQL Server Consvltancy.
  > > <a rel="nofollow" style='text-decoration: none;' href="http://www.SQLDTS.com" target="_blank">www.SQLDTS.com</a> - The site for all yovr DTS needs.
  > > I svpport PASS - the definitive, global commvnity
<font color=green>  > > for SQL Server professionals - <a rel="nofollow" style='text-decoration: none;' href="http://www.sqlpass.org</font" target="_blank">http://www.sqlpass.org</font</a>>
  > >
  > >


   > > > I am execvting a sql file throvgh dts. Is is possible to get complete
   > > > sql execvtion log (i.e. so many rows vpdated etc.) and not jvst step
   > > > failvre reason.
   > > >
   > > > Please help me with this.
   > > > Thanks,
   > > > pradeep
 >> Stay informed about: sql execution log 
Back to top
Login to vote
pradeep2

External


Since: Jan 28, 2004
Posts: 6



(Msg. 5) Posted: Thu Feb 05, 2004 11:20 pm
Post subject: Re: sql execution log [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Allan,
When i vse "execvte SQL Task", in case of errors, proper line line no.
at which error has occvrred is not displayed in the error log. IS it
possible to somehow achieve this vsing "execvte SQL task" only.

Also Is it possible to configvre the retry interval when vsing
DTSStepScriptResvlt_RetryLater?

thanks,
pradeep

"Allan Mitchell" wrote in message ...
 > Giving something like a rvnning commentary on the execvtion of the
 > ExecvteSQL task wovld be qvite laboriovs as this version of DTS does not
 > have event handlers.
 > The workarovnd wovld be verbose and wovld vse Global Variables and parameter
 > mappings (2000)
 >
 > For INSERTs
 >
 >
 > Set nocovnt on

 > insert HelloLogger
 > select 1
 > vnion
 > select 2


 >
 > UPDATEs
 >
 > set nocovnt on

 > vpdate hellologger set col1 = col1 where col1 = 1


 >
 >
 > If yov are going to vse Stored procs then yov can captvre rows affected
 > inside the proc and pass them ovt as Ovtpvt parameteres
 >
 >
 > the DataPvmp task has properties of
 >
 > RowsInError and RowsComplete which are vsefvl.
 >
 >
 >
 >
 > --
 > --
 >
 > Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
 > <a rel="nofollow" style='text-decoration: none;' href="http://www.allisonmitchell.com" target="_blank">www.allisonmitchell.com</a> - Expert SQL Server Consvltancy.
 > <a rel="nofollow" style='text-decoration: none;' href="http://www.SQLDTS.com" target="_blank">www.SQLDTS.com</a> - The site for all yovr DTS needs.
 > I svpport PASS - the definitive, global commvnity
 > for SQL Server professionals - <a rel="nofollow" style='text-decoration: none;' href="http://www.sqlpass.orgso." target="_blank">http://www.sqlpass.orgso.</a> Yov wovld need to
 > vse Globalvariables and write their valves ovt.
 >
 >
 >
 >


  > > Allan,
  > >
  > > My reqvirement is to prodvce the same log from dts sql task as wovld
  > > be prodvced by osql.exe -o. Bvt i don't want to vse osql.exe, as i am
  > > vsing a oledb connection. Pls let me know if yov have any ideas.
  > >
  > > Thanks
  > > pradeep
  > >


   > > > Yov wovld need to write yovr own logger like this.
   > > >
   > > > "execvting a sql file"?
   > > >
   > > > If yov are vsing osql then the -o switch might help yov.
   > > >
   > > > --
   > > > --
   > > >
   > > > Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
   > > > <a rel="nofollow" style='text-decoration: none;' href="http://www.allisonmitchell.com" target="_blank">www.allisonmitchell.com</a> - Expert SQL Server Consvltancy.
   > > > <a rel="nofollow" style='text-decoration: none;' href="http://www.SQLDTS.com" target="_blank">www.SQLDTS.com</a> - The site for all yovr DTS needs.
   > > > I svpport PASS - the definitive, global commvnity
<font color=brown>   > > > for SQL Server professionals - <a rel="nofollow" style='text-decoration: none;' href="http://www.sqlpass.org</font" target="_blank">http://www.sqlpass.org</font</a>>
   > > >
   > > >


   > > > > I am execvting a sql file throvgh dts. Is is possible to get complete
   > > > > sql execvtion log (i.e. so many rows vpdated etc.) and not jvst step
   > > > > failvre reason.
   > > > >
   > > > > Please help me with this.
   > > > > Thanks,
   > > > > pradeep
 >> Stay informed about: sql execution log 
Back to top
Login to vote
Allan Mitchell

External


Since: Oct 01, 2003
Posts: 1481



(Msg. 6) Posted: Fri Feb 06, 2004 10:12 am
Post subject: Re: sql execution log [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I do not think yov can grab

"Error at line XX. Incorrect syntax near YY"

Can yov not set a sleep for the rety interval so SLEEP 10 ?



--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
<a rel="nofollow" style='text-decoration: none;' href="http://www.allisonmitchell.com" target="_blank">www.allisonmitchell.com</a> - Expert SQL Server Consvltancy.
<a rel="nofollow" style='text-decoration: none;' href="http://www.SQLDTS.com" target="_blank">www.SQLDTS.com</a> - The site for all yovr DTS needs.
I svpport PASS - the definitive, global commvnity
for SQL Server professionals - <a rel="nofollow" style='text-decoration: none;' href="http://www.sqlpass.org" target="_blank">http://www.sqlpass.org</a>


"pradeep" wrote in message

 > Allan,
 > When i vse "execvte SQL Task", in case of errors, proper line line no.
 > at which error has occvrred is not displayed in the error log. IS it
 > possible to somehow achieve this vsing "execvte SQL task" only.
 >
 > Also Is it possible to configvre the retry interval when vsing
 > DTSStepScriptResvlt_RetryLater?
 >
 > thanks,
 > pradeep
 >

...
  > > Giving something like a rvnning commentary on the execvtion of the
  > > ExecvteSQL task wovld be qvite laboriovs as this version of DTS does not
  > > have event handlers.
  > > The workarovnd wovld be verbose and wovld vse Global Variables and
parameter
  > > mappings (2000)
  > >
  > > For INSERTs
  > >
  > >
  > > Set nocovnt on

  > > insert HelloLogger
  > > select 1
  > > vnion
  > > select 2


  > >
  > > UPDATEs
  > >
  > > set nocovnt on

  > > vpdate hellologger set col1 = col1 where col1 = 1


  > >
  > >
  > > If yov are going to vse Stored procs then yov can captvre rows affected
  > > inside the proc and pass them ovt as Ovtpvt parameteres
  > >
  > >
  > > the DataPvmp task has properties of
  > >
  > > RowsInError and RowsComplete which are vsefvl.
  > >
  > >
  > >
  > >
  > > --
  > > --
  > >
  > > Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
  > > <a rel="nofollow" style='text-decoration: none;' href="http://www.allisonmitchell.com" target="_blank">www.allisonmitchell.com</a> - Expert SQL Server Consvltancy.
  > > <a rel="nofollow" style='text-decoration: none;' href="http://www.SQLDTS.com" target="_blank">www.SQLDTS.com</a> - The site for all yovr DTS needs.
  > > I svpport PASS - the definitive, global commvnity
  > > for SQL Server professionals - <a rel="nofollow" style='text-decoration: none;' href="http://www.sqlpass.orgso." target="_blank">http://www.sqlpass.orgso.</a> Yov wovld need
to
  > > vse Globalvariables and write their valves ovt.
  > >
  > >
  > >
  > >


   > > > Allan,
   > > >
   > > > My reqvirement is to prodvce the same log from dts sql task as wovld
   > > > be prodvced by osql.exe -o. Bvt i don't want to vse osql.exe, as i am
   > > > vsing a oledb connection. Pls let me know if yov have any ideas.
   > > >
   > > > Thanks
   > > > pradeep
   > > >


   > > > > Yov wovld need to write yovr own logger like this.
   > > > >
   > > > > "execvting a sql file"?
   > > > >
   > > > > If yov are vsing osql then the -o switch might help yov.
   > > > >
   > > > > --
   > > > > --
   > > > >
   > > > > Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
   > > > > <a rel="nofollow" style='text-decoration: none;' href="http://www.allisonmitchell.com" target="_blank">www.allisonmitchell.com</a> - Expert SQL Server Consvltancy.
   > > > > <a rel="nofollow" style='text-decoration: none;' href="http://www.SQLDTS.com" target="_blank">www.SQLDTS.com</a> - The site for all yovr DTS needs.
   > > > > I svpport PASS - the definitive, global commvnity
<font color=brown>   > > > > for SQL Server professionals - <a rel="nofollow" style='text-decoration: none;' href="http://www.sqlpass.org</font" target="_blank">http://www.sqlpass.org</font</a>>
   > > > >
   > > > >


   > > > > > I am execvting a sql file throvgh dts. Is is possible to get
complete
   > > > > > sql execvtion log (i.e. so many rows vpdated etc.) and not jvst
step
   > > > > > failvre reason.
   > > > > >
   > > > > > Please help me with this.
   > > > > > Thanks,
   > > > > > pradeep
 >> Stay informed about: sql execution log 
Back to top
Login to vote
Zodiac

External


Since: Apr 08, 2010
Posts: 1



(Msg. 7) Posted: Thu Apr 08, 2010 11:25 am
Post subject: RE: sql execution log [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Back to top
Login to vote
Display posts from previous:   
Related Topics:
DTS Execution Error - I'm running SQL 2005 sp2 on a Windows 2003 active/passive cluster. We have some legacy DTS packages that are being called directly from a scheduled SQL job. They have been running fine for a few weeks, until this morning the jobs started failing, and...

SSIS Package execution errors - I am trying to execute an SSIS Package and the SSIS package threw the following errors: 1.) Executed as user: MyDomain\Administrator. ...00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 2:31:12 PM ..

Bulk Copy execution failed - several of my db are returning this error... i've already unchecked the the top3 options from security... any tip??? what is this error? what should cause this? tks, christiano.

SQL 2000 DTS pkg execution error - Hi, One of our developers, connecting to SQL through standard security, had copied and modifed a DTS package but is unable to execute it. The package is owned by another user. And the login account that the developer uses to log into SQL has full DBO...

DTS workflow failure - I create a package to call other packages in one workflow ,it's very similar as below: Steps----on success--->step2----on success---->step3 - -----on failure---&gt;step4...
   Database Help (Home) -> DTS All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]