I have a stored procedure that I am executing through the sql server
job scheduler, it executes properly but after each line in the log file
there is a sqlstate message.
procedure name p_document_purge [SQLSTATE 01000]
Archiving records [SQLSTATE 01000]
51 rows archived [SQLSTATE 01000]
Purging duplicate records [SQLSTATE 01000]
51 rows purged [SQLSTATE 01000]
Purge completed successfully [SQLSTATE 01000]
Does anyone know what might cause this? The @.@.ERROR during the
procedure is always 0 or it would rollback the entire transaction. Also
If I run the proc from query analyzer I do not get any negative
feedback regarding it. I tried looking in the documentation, but this
is listed as a general error which doesn't really help.
Thanks
BillPrint statements in the stored procedure can result in the
sqlstate message.
-Sue
.
On 23 Feb 2006 06:30:49 -0800, william_dudek@.yahoo.com
wrote:
>I have a stored procedure that I am executing through the sql server
>job scheduler, it executes properly but after each line in the log file
>there is a sqlstate message.
>procedure name p_document_purge [SQLSTATE 01000]
>Archiving records [SQLSTATE 01000]
>51 rows archived [SQLSTATE 01000]
>Purging duplicate records [SQLSTATE 01000]
>51 rows purged [SQLSTATE 01000]
>Purge completed successfully [SQLSTATE 01000]
>Does anyone know what might cause this? The @.@.ERROR during the
>procedure is always 0 or it would rollback the entire transaction. Also
>If I run the proc from query analyzer I do not get any negative
>feedback regarding it. I tried looking in the documentation, but this
>is listed as a general error which doesn't really help.
>Thanks
>Bill
Showing posts with label proc. Show all posts
Showing posts with label proc. Show all posts
Friday, March 30, 2012
Job with stored proc succeeds with sqlstate 01000
I have a stored procedure that I am executing through the sql server
job scheduler, it executes properly but after each line in the log file
there is a sqlstate message.
procedure name p_document_purge [SQLSTATE 01000]
Archiving records [SQLSTATE 01000]
51 rows archived [SQLSTATE 01000]
Purging duplicate records [SQLSTATE 01000]
51 rows purged [SQLSTATE 01000]
Purge completed successfully [SQLSTATE 01000]
Does anyone know what might cause this? The @.@.ERROR during the
procedure is always 0 or it would rollback the entire transaction. Also
If I run the proc from query analyzer I do not get any negative
feedback regarding it. I tried looking in the documentation, but this
is listed as a general error which doesn't really help.
Thanks
BillPrint statements in the stored procedure can result in the
sqlstate message.
-Sue
.
On 23 Feb 2006 06:30:49 -0800, william_dudek@.yahoo.com
wrote:
>I have a stored procedure that I am executing through the sql server
>job scheduler, it executes properly but after each line in the log file
>there is a sqlstate message.
>procedure name p_document_purge [SQLSTATE 01000]
>Archiving records [SQLSTATE 01000]
>51 rows archived [SQLSTATE 01000]
>Purging duplicate records [SQLSTATE 01000]
>51 rows purged [SQLSTATE 01000]
>Purge completed successfully [SQLSTATE 01000]
>Does anyone know what might cause this? The @.@.ERROR during the
>procedure is always 0 or it would rollback the entire transaction. Also
>If I run the proc from query analyzer I do not get any negative
>feedback regarding it. I tried looking in the documentation, but this
>is listed as a general error which doesn't really help.
>Thanks
>Bill
job scheduler, it executes properly but after each line in the log file
there is a sqlstate message.
procedure name p_document_purge [SQLSTATE 01000]
Archiving records [SQLSTATE 01000]
51 rows archived [SQLSTATE 01000]
Purging duplicate records [SQLSTATE 01000]
51 rows purged [SQLSTATE 01000]
Purge completed successfully [SQLSTATE 01000]
Does anyone know what might cause this? The @.@.ERROR during the
procedure is always 0 or it would rollback the entire transaction. Also
If I run the proc from query analyzer I do not get any negative
feedback regarding it. I tried looking in the documentation, but this
is listed as a general error which doesn't really help.
Thanks
BillPrint statements in the stored procedure can result in the
sqlstate message.
-Sue
.
On 23 Feb 2006 06:30:49 -0800, william_dudek@.yahoo.com
wrote:
>I have a stored procedure that I am executing through the sql server
>job scheduler, it executes properly but after each line in the log file
>there is a sqlstate message.
>procedure name p_document_purge [SQLSTATE 01000]
>Archiving records [SQLSTATE 01000]
>51 rows archived [SQLSTATE 01000]
>Purging duplicate records [SQLSTATE 01000]
>51 rows purged [SQLSTATE 01000]
>Purge completed successfully [SQLSTATE 01000]
>Does anyone know what might cause this? The @.@.ERROR during the
>procedure is always 0 or it would rollback the entire transaction. Also
>If I run the proc from query analyzer I do not get any negative
>feedback regarding it. I tried looking in the documentation, but this
>is listed as a general error which doesn't really help.
>Thanks
>Bill
Job with stored proc succeeds with sqlstate 01000
I have a stored procedure that I am executing through the sql server
job scheduler, it executes properly but after each line in the log file
there is a sqlstate message.
procedure name p_document_purge [SQLSTATE 01000]
Archiving records [SQLSTATE 01000]
51 rows archived [SQLSTATE 01000]
Purging duplicate records [SQLSTATE 01000]
51 rows purged [SQLSTATE 01000]
Purge completed successfully [SQLSTATE 01000]
Does anyone know what might cause this? The @.@.ERROR during the
procedure is always 0 or it would rollback the entire transaction. Also
If I run the proc from query analyzer I do not get any negative
feedback regarding it. I tried looking in the documentation, but this
is listed as a general error which doesn't really help.
Thanks
Bill
Print statements in the stored procedure can result in the
sqlstate message.
-Sue
..
On 23 Feb 2006 06:30:49 -0800, william_dudek@.yahoo.com
wrote:
>I have a stored procedure that I am executing through the sql server
>job scheduler, it executes properly but after each line in the log file
>there is a sqlstate message.
>procedure name p_document_purge [SQLSTATE 01000]
>Archiving records [SQLSTATE 01000]
>51 rows archived [SQLSTATE 01000]
>Purging duplicate records [SQLSTATE 01000]
>51 rows purged [SQLSTATE 01000]
>Purge completed successfully [SQLSTATE 01000]
>Does anyone know what might cause this? The @.@.ERROR during the
>procedure is always 0 or it would rollback the entire transaction. Also
>If I run the proc from query analyzer I do not get any negative
>feedback regarding it. I tried looking in the documentation, but this
>is listed as a general error which doesn't really help.
>Thanks
>Bill
sql
job scheduler, it executes properly but after each line in the log file
there is a sqlstate message.
procedure name p_document_purge [SQLSTATE 01000]
Archiving records [SQLSTATE 01000]
51 rows archived [SQLSTATE 01000]
Purging duplicate records [SQLSTATE 01000]
51 rows purged [SQLSTATE 01000]
Purge completed successfully [SQLSTATE 01000]
Does anyone know what might cause this? The @.@.ERROR during the
procedure is always 0 or it would rollback the entire transaction. Also
If I run the proc from query analyzer I do not get any negative
feedback regarding it. I tried looking in the documentation, but this
is listed as a general error which doesn't really help.
Thanks
Bill
Print statements in the stored procedure can result in the
sqlstate message.
-Sue
..
On 23 Feb 2006 06:30:49 -0800, william_dudek@.yahoo.com
wrote:
>I have a stored procedure that I am executing through the sql server
>job scheduler, it executes properly but after each line in the log file
>there is a sqlstate message.
>procedure name p_document_purge [SQLSTATE 01000]
>Archiving records [SQLSTATE 01000]
>51 rows archived [SQLSTATE 01000]
>Purging duplicate records [SQLSTATE 01000]
>51 rows purged [SQLSTATE 01000]
>Purge completed successfully [SQLSTATE 01000]
>Does anyone know what might cause this? The @.@.ERROR during the
>procedure is always 0 or it would rollback the entire transaction. Also
>If I run the proc from query analyzer I do not get any negative
>feedback regarding it. I tried looking in the documentation, but this
>is listed as a general error which doesn't really help.
>Thanks
>Bill
sql
Wednesday, March 28, 2012
Job step failing with "ConnectionRead (WrapperRead())." error
We have a job step which executes a stored proc that fails intermittently
with this error:
Executed as user: domain\user. ConnectionRead (WrapperRead()). [SQLSTATE
01000] (Message 258) General network error. Check your network
documentation. [SQLSTATE 08S01] (Error 11). The step failed.
This stored proc executes just fine through QA.
Could it be that the SP does execute but that the step is being incorrectly
reported as failed?
Thank you
-- alan cranfield, DBAuse same ANSI settings in job like in QA
"Cranfield" wrote:
> We have a job step which executes a stored proc that fails intermittently
> with this error:
> Executed as user: domain\user. ConnectionRead (WrapperRead()). [SQLSTA
TE
> 01000] (Message 258) General network error. Check your network
> documentation. [SQLSTATE 08S01] (Error 11). The step failed.
> This stored proc executes just fine through QA.
> Could it be that the SP does execute but that the step is being incorrectl
y
> reported as failed?
> Thank you
> --
> -- alan cranfield, DBA|||I tried your suggestion. Job step still fails.
This must be a bug. I will raise a case with PSS.
thanks for the reply.
-- cranfield, DBA
"Aleksandar Grbic" wrote:
[vbcol=seagreen]
> use same ANSI settings in job like in QA
>
> "Cranfield" wrote:
>
with this error:
Executed as user: domain\user. ConnectionRead (WrapperRead()). [SQLSTATE
01000] (Message 258) General network error. Check your network
documentation. [SQLSTATE 08S01] (Error 11). The step failed.
This stored proc executes just fine through QA.
Could it be that the SP does execute but that the step is being incorrectly
reported as failed?
Thank you
-- alan cranfield, DBAuse same ANSI settings in job like in QA
"Cranfield" wrote:
> We have a job step which executes a stored proc that fails intermittently
> with this error:
> Executed as user: domain\user. ConnectionRead (WrapperRead()). [SQLSTA
TE
> 01000] (Message 258) General network error. Check your network
> documentation. [SQLSTATE 08S01] (Error 11). The step failed.
> This stored proc executes just fine through QA.
> Could it be that the SP does execute but that the step is being incorrectl
y
> reported as failed?
> Thank you
> --
> -- alan cranfield, DBA|||I tried your suggestion. Job step still fails.
This must be a bug. I will raise a case with PSS.
thanks for the reply.
-- cranfield, DBA
"Aleksandar Grbic" wrote:
[vbcol=seagreen]
> use same ANSI settings in job like in QA
>
> "Cranfield" wrote:
>
Labels:
connectionread,
database,
domain,
error,
errorexecuted,
executes,
failing,
fails,
intermittentlywith,
job,
microsoft,
mysql,
oracle,
proc,
server,
sql,
step,
stored,
user,
wrapperread
Job step failing with "ConnectionRead (WrapperRead())." error
We have a job step which executes a stored proc that fails intermittently
with this error:
Executed as user: domain\user. ConnectionRead (WrapperRead()). [SQLSTATE
01000] (Message 258) General network error. Check your network
documentation. [SQLSTATE 08S01] (Error 11). The step failed.
This stored proc executes just fine through QA.
Could it be that the SP does execute but that the step is being incorrectly
reported as failed?
Thank you
--
-- alan cranfield, DBAuse same ANSI settings in job like in QA
"Cranfield" wrote:
> We have a job step which executes a stored proc that fails intermittently
> with this error:
> Executed as user: domain\user. ConnectionRead (WrapperRead()). [SQLSTATE
> 01000] (Message 258) General network error. Check your network
> documentation. [SQLSTATE 08S01] (Error 11). The step failed.
> This stored proc executes just fine through QA.
> Could it be that the SP does execute but that the step is being incorrectly
> reported as failed?
> Thank you
> --
> -- alan cranfield, DBA|||I tried your suggestion. Job step still fails.
This must be a bug. I will raise a case with PSS.
thanks for the reply.
--
-- cranfield, DBA
"Aleksandar Grbic" wrote:
> use same ANSI settings in job like in QA
>
> "Cranfield" wrote:
> > We have a job step which executes a stored proc that fails intermittently
> > with this error:
> >
> > Executed as user: domain\user. ConnectionRead (WrapperRead()). [SQLSTATE
> > 01000] (Message 258) General network error. Check your network
> > documentation. [SQLSTATE 08S01] (Error 11). The step failed.
> >
> > This stored proc executes just fine through QA.
> >
> > Could it be that the SP does execute but that the step is being incorrectly
> > reported as failed?
> >
> > Thank you
> >
> > --
> > -- alan cranfield, DBA
with this error:
Executed as user: domain\user. ConnectionRead (WrapperRead()). [SQLSTATE
01000] (Message 258) General network error. Check your network
documentation. [SQLSTATE 08S01] (Error 11). The step failed.
This stored proc executes just fine through QA.
Could it be that the SP does execute but that the step is being incorrectly
reported as failed?
Thank you
--
-- alan cranfield, DBAuse same ANSI settings in job like in QA
"Cranfield" wrote:
> We have a job step which executes a stored proc that fails intermittently
> with this error:
> Executed as user: domain\user. ConnectionRead (WrapperRead()). [SQLSTATE
> 01000] (Message 258) General network error. Check your network
> documentation. [SQLSTATE 08S01] (Error 11). The step failed.
> This stored proc executes just fine through QA.
> Could it be that the SP does execute but that the step is being incorrectly
> reported as failed?
> Thank you
> --
> -- alan cranfield, DBA|||I tried your suggestion. Job step still fails.
This must be a bug. I will raise a case with PSS.
thanks for the reply.
--
-- cranfield, DBA
"Aleksandar Grbic" wrote:
> use same ANSI settings in job like in QA
>
> "Cranfield" wrote:
> > We have a job step which executes a stored proc that fails intermittently
> > with this error:
> >
> > Executed as user: domain\user. ConnectionRead (WrapperRead()). [SQLSTATE
> > 01000] (Message 258) General network error. Check your network
> > documentation. [SQLSTATE 08S01] (Error 11). The step failed.
> >
> > This stored proc executes just fine through QA.
> >
> > Could it be that the SP does execute but that the step is being incorrectly
> > reported as failed?
> >
> > Thank you
> >
> > --
> > -- alan cranfield, DBA
Job step failing with "ConnectionRead (WrapperRead())." error
We have a job step which executes a stored proc that fails intermittently
with this error:
Executed as user: domain\user. ConnectionRead (WrapperRead()). [SQLSTATE
01000] (Message 258) General network error. Check your network
documentation. [SQLSTATE 08S01] (Error 11). The step failed.
This stored proc executes just fine through QA.
Could it be that the SP does execute but that the step is being incorrectly
reported as failed?
Thank you
-- alan cranfield, DBA
use same ANSI settings in job like in QA
"Cranfield" wrote:
> We have a job step which executes a stored proc that fails intermittently
> with this error:
> Executed as user: domain\user. ConnectionRead (WrapperRead()). [SQLSTATE
> 01000] (Message 258) General network error. Check your network
> documentation. [SQLSTATE 08S01] (Error 11). The step failed.
> This stored proc executes just fine through QA.
> Could it be that the SP does execute but that the step is being incorrectly
> reported as failed?
> Thank you
> --
> -- alan cranfield, DBA
|||I tried your suggestion. Job step still fails.
This must be a bug. I will raise a case with PSS.
thanks for the reply.
-- cranfield, DBA
"Aleksandar Grbic" wrote:
[vbcol=seagreen]
> use same ANSI settings in job like in QA
>
> "Cranfield" wrote:
with this error:
Executed as user: domain\user. ConnectionRead (WrapperRead()). [SQLSTATE
01000] (Message 258) General network error. Check your network
documentation. [SQLSTATE 08S01] (Error 11). The step failed.
This stored proc executes just fine through QA.
Could it be that the SP does execute but that the step is being incorrectly
reported as failed?
Thank you
-- alan cranfield, DBA
use same ANSI settings in job like in QA
"Cranfield" wrote:
> We have a job step which executes a stored proc that fails intermittently
> with this error:
> Executed as user: domain\user. ConnectionRead (WrapperRead()). [SQLSTATE
> 01000] (Message 258) General network error. Check your network
> documentation. [SQLSTATE 08S01] (Error 11). The step failed.
> This stored proc executes just fine through QA.
> Could it be that the SP does execute but that the step is being incorrectly
> reported as failed?
> Thank you
> --
> -- alan cranfield, DBA
|||I tried your suggestion. Job step still fails.
This must be a bug. I will raise a case with PSS.
thanks for the reply.
-- cranfield, DBA
"Aleksandar Grbic" wrote:
[vbcol=seagreen]
> use same ANSI settings in job like in QA
>
> "Cranfield" wrote:
Labels:
connectionread,
database,
domain,
error,
errorexecuted,
executes,
failing,
fails,
intermittentlywith,
job,
microsoft,
mysql,
oracle,
proc,
server,
sql,
step,
stored,
user,
wrapperread
Job Status Suspended
i am trying to code a proc that tests whether a job is running. i
understand how to get job status from the xp_sqlagent_enum_jobs via the
current execution status and i also understand that status = 4 means
the job is idle. what does status =5 (suspended) mean? The BOL
information seems to indicate that the job isnt running when status is
either 4 or 5 (status 0 = not idle and not suspended)
thanks
markHow about this bit of TSQL
select step_id FROM
msdb.dbo.sysjobhistory
WHERE instance_id =
(SELECT max(instance_id) FROM msdb.dbo.sysjobhistory h
INNER JOIN msdb.dbo.sysjobs j ON h.job_id=j.job_id
WHERE j.[name] = 'Your Job Name')
This will extract the current step that a job is on. If a has completed, the
step_id will be zero. If it hasn't completed, the step_id will be non-zero.
"markfcook@.gmail.com" wrote:
> i am trying to code a proc that tests whether a job is running. i
> understand how to get job status from the xp_sqlagent_enum_jobs via the
> current execution status and i also understand that status = 4 means
> the job is idle. what does status =5 (suspended) mean? The BOL
> information seems to indicate that the job isnt running when status is
> either 4 or 5 (status 0 = not idle and not suspended)
> thanks
> mark
>
understand how to get job status from the xp_sqlagent_enum_jobs via the
current execution status and i also understand that status = 4 means
the job is idle. what does status =5 (suspended) mean? The BOL
information seems to indicate that the job isnt running when status is
either 4 or 5 (status 0 = not idle and not suspended)
thanks
markHow about this bit of TSQL
select step_id FROM
msdb.dbo.sysjobhistory
WHERE instance_id =
(SELECT max(instance_id) FROM msdb.dbo.sysjobhistory h
INNER JOIN msdb.dbo.sysjobs j ON h.job_id=j.job_id
WHERE j.[name] = 'Your Job Name')
This will extract the current step that a job is on. If a has completed, the
step_id will be zero. If it hasn't completed, the step_id will be non-zero.
"markfcook@.gmail.com" wrote:
> i am trying to code a proc that tests whether a job is running. i
> understand how to get job status from the xp_sqlagent_enum_jobs via the
> current execution status and i also understand that status = 4 means
> the job is idle. what does status =5 (suspended) mean? The BOL
> information seems to indicate that the job isnt running when status is
> either 4 or 5 (status 0 = not idle and not suspended)
> thanks
> mark
>
Friday, March 23, 2012
Job Performance Vs Running from Query Analyzer
I have a proc that takes 43 seconds to run if I run it from query analyzer. If I run it from a job it takes 17.5061 minutes.
The job command is EXEC [HYPERe]..[B33HiveMigration].
I cut and paste it into Query Analyzer and whosh. From the job it's a dog. Are jobs governed. No other variables to consider - on a standalone network using the same box. The proc performs a series of updates, deletes, and inserts.
Thank you for your help.
How many times are you going to post this question?
http://www.aspfaq.com/
(Reverse address to reply.)
"Mark - HYPERe" <MarkHYPERe@.discussions.microsoft.com> wrote in message
news:A6CBF4C4-0889-4526-91EA-BB325D99D859@.microsoft.com...
> I have a proc that takes 43 seconds to run if I run it from query
analyzer. If I run it from a job it takes 17.5061 minutes.
> The job command is EXEC [HYPERe]..[B33HiveMigration].
> I cut and paste it into Query Analyzer and whosh. From the job it's a
dog. Are jobs governed. No other variables to consider - on a standalone
network using the same box. The proc performs a series of updates, deletes,
and inserts.
> Thank you for your help.
The job command is EXEC [HYPERe]..[B33HiveMigration].
I cut and paste it into Query Analyzer and whosh. From the job it's a dog. Are jobs governed. No other variables to consider - on a standalone network using the same box. The proc performs a series of updates, deletes, and inserts.
Thank you for your help.
How many times are you going to post this question?
http://www.aspfaq.com/
(Reverse address to reply.)
"Mark - HYPERe" <MarkHYPERe@.discussions.microsoft.com> wrote in message
news:A6CBF4C4-0889-4526-91EA-BB325D99D859@.microsoft.com...
> I have a proc that takes 43 seconds to run if I run it from query
analyzer. If I run it from a job it takes 17.5061 minutes.
> The job command is EXEC [HYPERe]..[B33HiveMigration].
> I cut and paste it into Query Analyzer and whosh. From the job it's a
dog. Are jobs governed. No other variables to consider - on a standalone
network using the same box. The proc performs a series of updates, deletes,
and inserts.
> Thank you for your help.
Job Performance Vs Running from Query Analyzer
I have a proc that takes 43 seconds to run if I run it from query analyzer. If I run it from a job it takes 17.5061 minutes.
The job command is EXEC [HYPERe]..[B33HiveMigration].
I cut and paste it into Query Analyzer and whosh. From the job it's a dog. Are jobs governed. No other variables to consider - on a standalone network using the same box. The proc performs a series of updates, deletes, and inserts.
Thank you for your help.
Ideally, it should take around the same amount of time. But are there any
logs in the sqlagent.out that might point to some errors or weird behaviour?
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.
The job command is EXEC [HYPERe]..[B33HiveMigration].
I cut and paste it into Query Analyzer and whosh. From the job it's a dog. Are jobs governed. No other variables to consider - on a standalone network using the same box. The proc performs a series of updates, deletes, and inserts.
Thank you for your help.
Ideally, it should take around the same amount of time. But are there any
logs in the sqlagent.out that might point to some errors or weird behaviour?
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.
Job Performance Vs Running from Query Analyzer
I have a proc that takes 43 seconds to run if I run it from query analyzer. If I run it from a job it takes 17.5061 minutes.
The job command is EXEC [HYPERe]..[B33HiveMigration].
I cut and paste it into Query Analyzer and whosh. From the job it's a dog. Are jobs governed. No other variables to consider - on a standalone network using the same box. The proc performs a series of updates, deletes, and inserts.
Thank you for your help.
Ownership issues? Why did you leave the table owner name blank (you should
always specify dbo if there is only one such table)? If you are dbo you are
going to see different plan, perhaps, than SQL Server agent (remember that
SQL Server Agent jobs do not execute in the same context as you are
currently logged in to Query Analyzer).
http://www.aspfaq.com/
(Reverse address to reply.)
"Mark - HYPERe" <Mark - HYPERe@.discussions.microsoft.com> wrote in message
news:DC69C3BE-3F01-4C92-B164-ADF680FB5220@.microsoft.com...
> I have a proc that takes 43 seconds to run if I run it from query
analyzer. If I run it from a job it takes 17.5061 minutes.
> The job command is EXEC [HYPERe]..[B33HiveMigration].
> I cut and paste it into Query Analyzer and whosh. From the job it's a
dog. Are jobs governed. No other variables to consider - on a standalone
network using the same box. The proc performs a series of updates, deletes,
and inserts.
> Thank you for your help.
|||Make sure you have SET NOCOUNT ON in your proc and check out MSKB 249730 to
see if it applies:
http://support.microsoft.com/default...30&Product=sql
Hope this helps.
Dan Guzman
SQL Server MVP
"Mark - HYPERe" <Mark - HYPERe@.discussions.microsoft.com> wrote in message
news:DC69C3BE-3F01-4C92-B164-ADF680FB5220@.microsoft.com...
> I have a proc that takes 43 seconds to run if I run it from query
analyzer. If I run it from a job it takes 17.5061 minutes.
> The job command is EXEC [HYPERe]..[B33HiveMigration].
> I cut and paste it into Query Analyzer and whosh. From the job it's a
dog. Are jobs governed. No other variables to consider - on a standalone
network using the same box. The proc performs a series of updates, deletes,
and inserts.
> Thank you for your help.
|||Thanks - that worked. Cheers to you. Sorry about the multiple posts. I was getting error messages when posting.
"Dan Guzman" wrote:
> Make sure you have SET NOCOUNT ON in your proc and check out MSKB 249730 to
> see if it applies:
> http://support.microsoft.com/default...30&Product=sql
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Mark - HYPERe" <Mark - HYPERe@.discussions.microsoft.com> wrote in message
> news:DC69C3BE-3F01-4C92-B164-ADF680FB5220@.microsoft.com...
> analyzer. If I run it from a job it takes 17.5061 minutes.
> dog. Are jobs governed. No other variables to consider - on a standalone
> network using the same box. The proc performs a series of updates, deletes,
> and inserts.
>
>
|||> Thanks - that worked. Cheers to you. Sorry about the multiple posts. I
was getting error messages when posting.
http://www.aspfaq.com/5007
sql
The job command is EXEC [HYPERe]..[B33HiveMigration].
I cut and paste it into Query Analyzer and whosh. From the job it's a dog. Are jobs governed. No other variables to consider - on a standalone network using the same box. The proc performs a series of updates, deletes, and inserts.
Thank you for your help.
Ownership issues? Why did you leave the table owner name blank (you should
always specify dbo if there is only one such table)? If you are dbo you are
going to see different plan, perhaps, than SQL Server agent (remember that
SQL Server Agent jobs do not execute in the same context as you are
currently logged in to Query Analyzer).
http://www.aspfaq.com/
(Reverse address to reply.)
"Mark - HYPERe" <Mark - HYPERe@.discussions.microsoft.com> wrote in message
news:DC69C3BE-3F01-4C92-B164-ADF680FB5220@.microsoft.com...
> I have a proc that takes 43 seconds to run if I run it from query
analyzer. If I run it from a job it takes 17.5061 minutes.
> The job command is EXEC [HYPERe]..[B33HiveMigration].
> I cut and paste it into Query Analyzer and whosh. From the job it's a
dog. Are jobs governed. No other variables to consider - on a standalone
network using the same box. The proc performs a series of updates, deletes,
and inserts.
> Thank you for your help.
|||Make sure you have SET NOCOUNT ON in your proc and check out MSKB 249730 to
see if it applies:
http://support.microsoft.com/default...30&Product=sql
Hope this helps.
Dan Guzman
SQL Server MVP
"Mark - HYPERe" <Mark - HYPERe@.discussions.microsoft.com> wrote in message
news:DC69C3BE-3F01-4C92-B164-ADF680FB5220@.microsoft.com...
> I have a proc that takes 43 seconds to run if I run it from query
analyzer. If I run it from a job it takes 17.5061 minutes.
> The job command is EXEC [HYPERe]..[B33HiveMigration].
> I cut and paste it into Query Analyzer and whosh. From the job it's a
dog. Are jobs governed. No other variables to consider - on a standalone
network using the same box. The proc performs a series of updates, deletes,
and inserts.
> Thank you for your help.
|||Thanks - that worked. Cheers to you. Sorry about the multiple posts. I was getting error messages when posting.
"Dan Guzman" wrote:
> Make sure you have SET NOCOUNT ON in your proc and check out MSKB 249730 to
> see if it applies:
> http://support.microsoft.com/default...30&Product=sql
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Mark - HYPERe" <Mark - HYPERe@.discussions.microsoft.com> wrote in message
> news:DC69C3BE-3F01-4C92-B164-ADF680FB5220@.microsoft.com...
> analyzer. If I run it from a job it takes 17.5061 minutes.
> dog. Are jobs governed. No other variables to consider - on a standalone
> network using the same box. The proc performs a series of updates, deletes,
> and inserts.
>
>
|||> Thanks - that worked. Cheers to you. Sorry about the multiple posts. I
was getting error messages when posting.
http://www.aspfaq.com/5007
sql
Job Performance Vs Running from Query Analyzer
I have a proc that takes 43 seconds to run if I run it from query analyzer. If I run it from a job it takes 17.5061 minutes.
The job command is EXEC [HYPERe]..[B33HiveMigration].
I cut and paste it into Query Analyzer and whosh. From the job it's a dog. Are jobs governed. No other variables to consider - on a standalone network using the same box. The proc performs a series of updates, deletes, and inserts.
Thank you for your help.Ownership issues? Why did you leave the table owner name blank (you should
always specify dbo if there is only one such table)? If you are dbo you are
going to see different plan, perhaps, than SQL Server agent (remember that
SQL Server Agent jobs do not execute in the same context as you are
currently logged in to Query Analyzer).
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Mark - HYPERe" <Mark - HYPERe@.discussions.microsoft.com> wrote in message
news:DC69C3BE-3F01-4C92-B164-ADF680FB5220@.microsoft.com...
> I have a proc that takes 43 seconds to run if I run it from query
analyzer. If I run it from a job it takes 17.5061 minutes.
> The job command is EXEC [HYPERe]..[B33HiveMigration].
> I cut and paste it into Query Analyzer and whosh. From the job it's a
dog. Are jobs governed. No other variables to consider - on a standalone
network using the same box. The proc performs a series of updates, deletes,
and inserts.
> Thank you for your help.|||Make sure you have SET NOCOUNT ON in your proc and check out MSKB 249730 to
see if it applies:
http://support.microsoft.com/default.aspx?scid=kb;en-us;249730&Product=sql
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Mark - HYPERe" <Mark - HYPERe@.discussions.microsoft.com> wrote in message
news:DC69C3BE-3F01-4C92-B164-ADF680FB5220@.microsoft.com...
> I have a proc that takes 43 seconds to run if I run it from query
analyzer. If I run it from a job it takes 17.5061 minutes.
> The job command is EXEC [HYPERe]..[B33HiveMigration].
> I cut and paste it into Query Analyzer and whosh. From the job it's a
dog. Are jobs governed. No other variables to consider - on a standalone
network using the same box. The proc performs a series of updates, deletes,
and inserts.
> Thank you for your help.|||> Thanks - that worked. Cheers to you. Sorry about the multiple posts. I
was getting error messages when posting.
http://www.aspfaq.com/5007
The job command is EXEC [HYPERe]..[B33HiveMigration].
I cut and paste it into Query Analyzer and whosh. From the job it's a dog. Are jobs governed. No other variables to consider - on a standalone network using the same box. The proc performs a series of updates, deletes, and inserts.
Thank you for your help.Ownership issues? Why did you leave the table owner name blank (you should
always specify dbo if there is only one such table)? If you are dbo you are
going to see different plan, perhaps, than SQL Server agent (remember that
SQL Server Agent jobs do not execute in the same context as you are
currently logged in to Query Analyzer).
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Mark - HYPERe" <Mark - HYPERe@.discussions.microsoft.com> wrote in message
news:DC69C3BE-3F01-4C92-B164-ADF680FB5220@.microsoft.com...
> I have a proc that takes 43 seconds to run if I run it from query
analyzer. If I run it from a job it takes 17.5061 minutes.
> The job command is EXEC [HYPERe]..[B33HiveMigration].
> I cut and paste it into Query Analyzer and whosh. From the job it's a
dog. Are jobs governed. No other variables to consider - on a standalone
network using the same box. The proc performs a series of updates, deletes,
and inserts.
> Thank you for your help.|||Make sure you have SET NOCOUNT ON in your proc and check out MSKB 249730 to
see if it applies:
http://support.microsoft.com/default.aspx?scid=kb;en-us;249730&Product=sql
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Mark - HYPERe" <Mark - HYPERe@.discussions.microsoft.com> wrote in message
news:DC69C3BE-3F01-4C92-B164-ADF680FB5220@.microsoft.com...
> I have a proc that takes 43 seconds to run if I run it from query
analyzer. If I run it from a job it takes 17.5061 minutes.
> The job command is EXEC [HYPERe]..[B33HiveMigration].
> I cut and paste it into Query Analyzer and whosh. From the job it's a
dog. Are jobs governed. No other variables to consider - on a standalone
network using the same box. The proc performs a series of updates, deletes,
and inserts.
> Thank you for your help.|||> Thanks - that worked. Cheers to you. Sorry about the multiple posts. I
was getting error messages when posting.
http://www.aspfaq.com/5007
Job Performance Vs Running from Query Analyzer
I have a proc that takes 43 seconds to run if I run it from query analyzer. If I run it from a job it takes 17.5061 minutes.
The job command is EXEC [HYPERe]..[B33HiveMigration].
I cut and paste it into Query Analyzer and whosh. From the job it's a dog. Are jobs governed. No other variables to consider - on a standalone network using the same box. The proc performs a series of updates, deletes, and inserts.
Thank you for your help.Ideally, it should take around the same amount of time. But are there any
logs in the sqlagent.out that might point to some errors or weird behaviour?
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.
The job command is EXEC [HYPERe]..[B33HiveMigration].
I cut and paste it into Query Analyzer and whosh. From the job it's a dog. Are jobs governed. No other variables to consider - on a standalone network using the same box. The proc performs a series of updates, deletes, and inserts.
Thank you for your help.Ideally, it should take around the same amount of time. But are there any
logs in the sqlagent.out that might point to some errors or weird behaviour?
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.
Job Performance Vs Running from Query Analyzer
I have a proc that takes 43 seconds to run if I run it from query analyzer.
If I run it from a job it takes 17.5061 minutes.
The job command is EXEC [HYPERe]..[B33HiveMigration].
I cut and paste it into Query Analyzer and whosh. From the job it's a dog.
Are jobs governed. No other variables to consider - on a standalone networ
k using the same box. The proc performs a series of updates, deletes, and i
nserts.
Thank you for your help.Ownership issues? Why did you leave the table owner name blank (you should
always specify dbo if there is only one such table)? If you are dbo you are
going to see different plan, perhaps, than SQL Server agent (remember that
SQL Server Agent jobs do not execute in the same context as you are
currently logged in to Query Analyzer).
http://www.aspfaq.com/
(Reverse address to reply.)
"Mark - HYPERe" <Mark - HYPERe@.discussions.microsoft.com> wrote in message
news:DC69C3BE-3F01-4C92-B164-ADF680FB5220@.microsoft.com...
> I have a proc that takes 43 seconds to run if I run it from query
analyzer. If I run it from a job it takes 17.5061 minutes.
> The job command is EXEC [HYPERe]..[B33HiveMigration].
> I cut and paste it into Query Analyzer and whosh. From the job it's a
dog. Are jobs governed. No other variables to consider - on a standalone
network using the same box. The proc performs a series of updates, deletes,
and inserts.
> Thank you for your help.|||Make sure you have SET NOCOUNT ON in your proc and check out MSKB 249730 to
see if it applies:
http://support.microsoft.com/defaul...730&Product=sql
Hope this helps.
Dan Guzman
SQL Server MVP
"Mark - HYPERe" <Mark - HYPERe@.discussions.microsoft.com> wrote in message
news:DC69C3BE-3F01-4C92-B164-ADF680FB5220@.microsoft.com...
> I have a proc that takes 43 seconds to run if I run it from query
analyzer. If I run it from a job it takes 17.5061 minutes.
> The job command is EXEC [HYPERe]..[B33HiveMigration].
> I cut and paste it into Query Analyzer and whosh. From the job it's a
dog. Are jobs governed. No other variables to consider - on a standalone
network using the same box. The proc performs a series of updates, deletes,
and inserts.
> Thank you for your help.|||Thanks - that worked. Cheers to you. Sorry about the multiple posts. I wa
s getting error messages when posting.
"Dan Guzman" wrote:
> Make sure you have SET NOCOUNT ON in your proc and check out MSKB 249730 t
o
> see if it applies:
> http://support.microsoft.com/defaul...730&Product=sql
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Mark - HYPERe" <Mark - HYPERe@.discussions.microsoft.com> wrote in message
> news:DC69C3BE-3F01-4C92-B164-ADF680FB5220@.microsoft.com...
> analyzer. If I run it from a job it takes 17.5061 minutes.
> dog. Are jobs governed. No other variables to consider - on a standalone
> network using the same box. The proc performs a series of updates, delete
s,
> and inserts.
>
>|||> Thanks - that worked. Cheers to you. Sorry about the multiple posts. I
was getting error messages when posting.
http://www.aspfaq.com/5007
If I run it from a job it takes 17.5061 minutes.
The job command is EXEC [HYPERe]..[B33HiveMigration].
I cut and paste it into Query Analyzer and whosh. From the job it's a dog.
Are jobs governed. No other variables to consider - on a standalone networ
k using the same box. The proc performs a series of updates, deletes, and i
nserts.
Thank you for your help.Ownership issues? Why did you leave the table owner name blank (you should
always specify dbo if there is only one such table)? If you are dbo you are
going to see different plan, perhaps, than SQL Server agent (remember that
SQL Server Agent jobs do not execute in the same context as you are
currently logged in to Query Analyzer).
http://www.aspfaq.com/
(Reverse address to reply.)
"Mark - HYPERe" <Mark - HYPERe@.discussions.microsoft.com> wrote in message
news:DC69C3BE-3F01-4C92-B164-ADF680FB5220@.microsoft.com...
> I have a proc that takes 43 seconds to run if I run it from query
analyzer. If I run it from a job it takes 17.5061 minutes.
> The job command is EXEC [HYPERe]..[B33HiveMigration].
> I cut and paste it into Query Analyzer and whosh. From the job it's a
dog. Are jobs governed. No other variables to consider - on a standalone
network using the same box. The proc performs a series of updates, deletes,
and inserts.
> Thank you for your help.|||Make sure you have SET NOCOUNT ON in your proc and check out MSKB 249730 to
see if it applies:
http://support.microsoft.com/defaul...730&Product=sql
Hope this helps.
Dan Guzman
SQL Server MVP
"Mark - HYPERe" <Mark - HYPERe@.discussions.microsoft.com> wrote in message
news:DC69C3BE-3F01-4C92-B164-ADF680FB5220@.microsoft.com...
> I have a proc that takes 43 seconds to run if I run it from query
analyzer. If I run it from a job it takes 17.5061 minutes.
> The job command is EXEC [HYPERe]..[B33HiveMigration].
> I cut and paste it into Query Analyzer and whosh. From the job it's a
dog. Are jobs governed. No other variables to consider - on a standalone
network using the same box. The proc performs a series of updates, deletes,
and inserts.
> Thank you for your help.|||Thanks - that worked. Cheers to you. Sorry about the multiple posts. I wa
s getting error messages when posting.
"Dan Guzman" wrote:
> Make sure you have SET NOCOUNT ON in your proc and check out MSKB 249730 t
o
> see if it applies:
> http://support.microsoft.com/defaul...730&Product=sql
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Mark - HYPERe" <Mark - HYPERe@.discussions.microsoft.com> wrote in message
> news:DC69C3BE-3F01-4C92-B164-ADF680FB5220@.microsoft.com...
> analyzer. If I run it from a job it takes 17.5061 minutes.
> dog. Are jobs governed. No other variables to consider - on a standalone
> network using the same box. The proc performs a series of updates, delete
s,
> and inserts.
>
>|||> Thanks - that worked. Cheers to you. Sorry about the multiple posts. I
was getting error messages when posting.
http://www.aspfaq.com/5007
Job Performance Vs Running from Query Analyzer
I have a proc that takes 43 seconds to run if I run it from query analyzer.
If I run it from a job it takes 17.5061 minutes.
The job command is EXEC [HYPERe]..[B33HiveMigration].
I cut and paste it into Query Analyzer and whosh. From the job it's a dog.
Are jobs governed. No other variables to consider - on a standalone networ
k using the same box. The proc performs a series of updates, deletes, and i
nserts.
Thank you for your help.Ideally, it should take around the same amount of time. But are there any
logs in the sqlagent.out that might point to some errors or weird behaviour?
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.
If I run it from a job it takes 17.5061 minutes.
The job command is EXEC [HYPERe]..[B33HiveMigration].
I cut and paste it into Query Analyzer and whosh. From the job it's a dog.
Are jobs governed. No other variables to consider - on a standalone networ
k using the same box. The proc performs a series of updates, deletes, and i
nserts.
Thank you for your help.Ideally, it should take around the same amount of time. But are there any
logs in the sqlagent.out that might point to some errors or weird behaviour?
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.
Friday, March 9, 2012
Job Execution
I've got a scheduled job that runs a package every couple of minutes, and I also have a method in an application that calls a stored proc that can also execute the same scheduled job. My question is what will happen if I call the stored proc to execute the job at the same time that the job is executing on its regular schedule. Is it possible that the an instance of the package will execute in parallel?
SQL Agent jobs won't run multiple instances simultaneously, as long as you are calling the same job.
Wednesday, March 7, 2012
Job and Stored Procedure Problems
I've written 2 stored procedures.
Proc 1, cycles through the system table and pulls out the names of all DB's.
Proc 2 is called by Proc 1, after it grabs 1 of the database names. It then
performs a type of backup based on a flag:
F = Full, D = Differential, and T = Transaction Logs.
I capture any errors and return them to Proc 1, so I can formulate an email
giving status.
At the end of Proc 1, I generate an email and ship off, giving the status of
each of the backups.
The process works just fine, if you do the TSQL statement through a query
window, reporting the status of the backup or error message. The problem I
am having, is when i schedule the job. To test it, I took one of my DB's
offline. When I run it through the Query Window, all errors and successes
report just fine.
When I run it through the Job, it fails at the offline database and kills
the entire job. Since the email isn't sent till the end of proc 1, the
email is never being generated, because upon failure of proc 2, it aborts
the entire job with an error.
It still backs up all the databases, just doesn't finish the email portion
of the process.
I've played with the job options, to continue to next step, even though one
doesn't exist, exit with success, doesn't do it, I've even played with SET
XACT_ABORT OFF
Thanks.Hi Kevin
You should be checking the status of the database in sysdatabases to exclude
offline one.
John
"Kevin Antel" wrote:
> I've written 2 stored procedures.
> Proc 1, cycles through the system table and pulls out the names of all DB'
s.
> Proc 2 is called by Proc 1, after it grabs 1 of the database names. It th
en
> performs a type of backup based on a flag:
> F = Full, D = Differential, and T = Transaction Logs.
> I capture any errors and return them to Proc 1, so I can formulate an emai
l
> giving status.
> At the end of Proc 1, I generate an email and ship off, giving the status
of
> each of the backups.
> The process works just fine, if you do the TSQL statement through a query
> window, reporting the status of the backup or error message. The problem
I
> am having, is when i schedule the job. To test it, I took one of my DB's
> offline. When I run it through the Query Window, all errors and successes
> report just fine.
> When I run it through the Job, it fails at the offline database and kills
> the entire job. Since the email isn't sent till the end of proc 1, the
> email is never being generated, because upon failure of proc 2, it aborts
> the entire job with an error.
> It still backs up all the databases, just doesn't finish the email portion
> of the process.
> I've played with the job options, to continue to next step, even though on
e
> doesn't exist, exit with success, doesn't do it, I've even played with SET
> XACT_ABORT OFF
> Thanks.
>
>
Proc 1, cycles through the system table and pulls out the names of all DB's.
Proc 2 is called by Proc 1, after it grabs 1 of the database names. It then
performs a type of backup based on a flag:
F = Full, D = Differential, and T = Transaction Logs.
I capture any errors and return them to Proc 1, so I can formulate an email
giving status.
At the end of Proc 1, I generate an email and ship off, giving the status of
each of the backups.
The process works just fine, if you do the TSQL statement through a query
window, reporting the status of the backup or error message. The problem I
am having, is when i schedule the job. To test it, I took one of my DB's
offline. When I run it through the Query Window, all errors and successes
report just fine.
When I run it through the Job, it fails at the offline database and kills
the entire job. Since the email isn't sent till the end of proc 1, the
email is never being generated, because upon failure of proc 2, it aborts
the entire job with an error.
It still backs up all the databases, just doesn't finish the email portion
of the process.
I've played with the job options, to continue to next step, even though one
doesn't exist, exit with success, doesn't do it, I've even played with SET
XACT_ABORT OFF
Thanks.Hi Kevin
You should be checking the status of the database in sysdatabases to exclude
offline one.
John
"Kevin Antel" wrote:
> I've written 2 stored procedures.
> Proc 1, cycles through the system table and pulls out the names of all DB'
s.
> Proc 2 is called by Proc 1, after it grabs 1 of the database names. It th
en
> performs a type of backup based on a flag:
> F = Full, D = Differential, and T = Transaction Logs.
> I capture any errors and return them to Proc 1, so I can formulate an emai
l
> giving status.
> At the end of Proc 1, I generate an email and ship off, giving the status
of
> each of the backups.
> The process works just fine, if you do the TSQL statement through a query
> window, reporting the status of the backup or error message. The problem
I
> am having, is when i schedule the job. To test it, I took one of my DB's
> offline. When I run it through the Query Window, all errors and successes
> report just fine.
> When I run it through the Job, it fails at the offline database and kills
> the entire job. Since the email isn't sent till the end of proc 1, the
> email is never being generated, because upon failure of proc 2, it aborts
> the entire job with an error.
> It still backs up all the databases, just doesn't finish the email portion
> of the process.
> I've played with the job options, to continue to next step, even though on
e
> doesn't exist, exit with success, doesn't do it, I've even played with SET
> XACT_ABORT OFF
> Thanks.
>
>
Subscribe to:
Posts (Atom)