Showing posts with label job. Show all posts
Showing posts with label job. Show all posts

Monday, March 19, 2012

[SQLSTATE 22003] (Error 8115)

Hi,
I have this job that runs sometimes it completes successfully, sometimes it
fails.
When it fails it gives this error message -->
Executed as user: sqlagent. Arithmetic overflow error converting expression
to data type int.
[SQLSTATE 22003] (Error 8115) The statement has been terminated. [SQLSTATE
01000] (Error 3621).
The step failed.
When I did the research on all the codes in the error looks like one of the
statements such as -->
SELECT ABS(convert(int, -2147483648))
is causing the problem. The problem I am having is that stored procedure
that runs has many 'converts' and I do not know which one is causing the
problem. Can I setup some kind of monitor that will catch exact cause or
declared 'int' that it is unable to convert to "int"?
How should I go about it?
Thanks
-D
You can run a Profiler trace, including stored procedure statement
starting/completed and exception events. Alternatively, you can run the
proc from Query Analyzer, using the debugger to step through the code
Hope this helps.
Dan Guzman
SQL Server MVP
"D''Animal" <DAnimal@.discussions.microsoft.com> wrote in message
news:E1F085A7-C312-4989-96D4-EF2DFA1FD835@.microsoft.com...
> Hi,
> I have this job that runs sometimes it completes successfully, sometimes
> it
> fails.
> When it fails it gives this error message -->
> --
> Executed as user: sqlagent. Arithmetic overflow error converting
> expression
> to data type int.
> [SQLSTATE 22003] (Error 8115) The statement has been terminated.
> [SQLSTATE
> 01000] (Error 3621).
> The step failed.
> --
> When I did the research on all the codes in the error looks like one of
> the
> statements such as -->
> SELECT ABS(convert(int, -2147483648))
> is causing the problem. The problem I am having is that stored procedure
> that runs has many 'converts' and I do not know which one is causing the
> problem. Can I setup some kind of monitor that will catch exact cause or
> declared 'int' that it is unable to convert to "int"?
> How should I go about it?
> Thanks
> -D
>

[SQLSTATE 22003] (Error 8115)

Hi,
I have this job that runs sometimes it completes successfully, sometimes it
fails.
When it fails it gives this error message -->
--
Executed as user: sqlagent. Arithmetic overflow error converting expression
to data type int.
[SQLSTATE 22003] (Error 8115) The statement has been terminated. [SQLSTATE
01000] (Error 3621).
The step failed.
--
When I did the research on all the codes in the error looks like one of the
statements such as -->
SELECT ABS(convert(int, -2147483648))
is causing the problem. The problem I am having is that stored procedure
that runs has many 'converts' and I do not know which one is causing the
problem. Can I setup some kind of monitor that will catch exact cause or
declared 'int' that it is unable to convert to "int"?
How should I go about it?
Thanks
-DYou can run a Profiler trace, including stored procedure statement
starting/completed and exception events. Alternatively, you can run the
proc from Query Analyzer, using the debugger to step through the code
--
Hope this helps.
Dan Guzman
SQL Server MVP
"D''Animal" <DAnimal@.discussions.microsoft.com> wrote in message
news:E1F085A7-C312-4989-96D4-EF2DFA1FD835@.microsoft.com...
> Hi,
> I have this job that runs sometimes it completes successfully, sometimes
> it
> fails.
> When it fails it gives this error message -->
> --
> Executed as user: sqlagent. Arithmetic overflow error converting
> expression
> to data type int.
> [SQLSTATE 22003] (Error 8115) The statement has been terminated.
> [SQLSTATE
> 01000] (Error 3621).
> The step failed.
> --
> When I did the research on all the codes in the error looks like one of
> the
> statements such as -->
> SELECT ABS(convert(int, -2147483648))
> is causing the problem. The problem I am having is that stored procedure
> that runs has many 'converts' and I do not know which one is causing the
> problem. Can I setup some kind of monitor that will catch exact cause or
> declared 'int' that it is unable to convert to "int"?
> How should I go about it?
> Thanks
> -D
>

[SQLSTATE 22003] (Error 8115)

Hi,
I have this job that runs sometimes it completes successfully, sometimes it
fails.
When it fails it gives this error message -->
--
Executed as user: sqlagent. Arithmetic overflow error converting expression
to data type int.
[SQLSTATE 22003] (Error 8115) The statement has been terminated. [S
QLSTATE
01000] (Error 3621).
The step failed.
--
When I did the research on all the codes in the error looks like one of the
statements such as -->
SELECT ABS(convert(int, -2147483648))
is causing the problem. The problem I am having is that stored procedure
that runs has many 'converts' and I do not know which one is causing the
problem. Can I setup some kind of monitor that will catch exact cause or
declared 'int' that it is unable to convert to "int"?
How should I go about it?
Thanks
-DYou can run a Profiler trace, including stored procedure statement
starting/completed and exception events. Alternatively, you can run the
proc from Query Analyzer, using the debugger to step through the code
Hope this helps.
Dan Guzman
SQL Server MVP
"D''Animal" <DAnimal@.discussions.microsoft.com> wrote in message
news:E1F085A7-C312-4989-96D4-EF2DFA1FD835@.microsoft.com...
> Hi,
> I have this job that runs sometimes it completes successfully, sometimes
> it
> fails.
> When it fails it gives this error message -->
> --
> Executed as user: sqlagent. Arithmetic overflow error converting
> expression
> to data type int.
> [SQLSTATE 22003] (Error 8115) The statement has been terminated.
> [SQLSTATE
> 01000] (Error 3621).
> The step failed.
> --
> When I did the research on all the codes in the error looks like one of
> the
> statements such as -->
> SELECT ABS(convert(int, -2147483648))
> is causing the problem. The problem I am having is that stored procedure
> that runs has many 'converts' and I do not know which one is causing the
> problem. Can I setup some kind of monitor that will catch exact cause or
> declared 'int' that it is unable to convert to "int"?
> How should I go about it?
> Thanks
> -D
>

[SQLSTATE 01000] via Agent Job, but not Query Analyzer

I run a sproc through query analyzer, and all is fine, when I run the job via the SQL Agent, [SQLSTATE 01000] appears after every line in the "log" file, any ideas ?
This happens with the sp_help_revlogin procedure.
both are being run with sa.Known issue with the PRINT command in SQL Server.

[SQL] Format function - need help

I have this piece of SQL code coming from Access:

Format([Jobnumber2],"00000") AS [Job Number]

What is the translation in SQL server language? I can't find the equivalent of the Format function!

Otherwise, is there a way to use ASP code to format the number in the way I'd like to?

Cheers,

C

anybody knows?|||RIGHT('00000'+CAST(JobNumber2 AS varchar),5) AS [Job Number]|||Thanks very much for your help Motley!

Sunday, March 11, 2012

[scheduling] SSIS Package fails, but scheduler reports success

I have an SSIS Package that executes a stored procedure. It turns out my stored procedure was missing.

However, the SQL Job Scheduler reported that step as success.

Can anyone tell me why?

`Le

Because your package is not exiting with an indication of success/failure.

Moved to the SSIS forum.

|||
when I run it through the command line, it indeed gives me an error code of (1).

But the Scheduler still tells me that it is successful.

`Le
|||You need to check the JOB action to take when a step fails -perhaps it is set to continue and report success.|||The step itself is trying to run a stored procedure that does not exist. The Sql schedule should report a failure, but it is not. It reports a success.

The Sql Server job says "quit with failure" when there is an error. There is clearly a different problem here.

`Le

|||

It is difficult to help you when you have all of the details and we don't. We can't see what you are doing and what happens, Your descriptions are incomplete and do not allow a good problem determination and resolution.

Please post the entire command line that you are having problems with, including any success/failure statements after it executes.

Is this being executed by the Windows Scheduler?

What version of SQL Server are you using?

|||

Arnie Rowland wrote:

It is difficult to help you when you have all of the details and we don't. We can't see what you are doing and what happens, Your descriptions are incomplete and do not allow a good problem determination and resolution.

Please post the entire command line that you are having problems with, including any success/failure statements after it executes.

Is this being executed by the Windows Scheduler?

What version of SQL Server are you using?

Thank you for your reply. I will attempt to be more detailed:

SQL SERVER: 2005
VISUAL STUDIO: 2005
SSIS File Name: Foo.dtsx
Configuration File Name: Config.dtsConfig

This config file has multiple steps, including one step that executes a Stored Procedure.

When I run this through a command line, I run it as:
dtexec.exe /FILE "\\MyServer\Foo.dtsx.dtsx" /CONFIGFILE "\\MyServer\Config.dtsConfig" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING E

When it is run this way, process exits with error (1), because the Stored Procedure in question does not exist on the database. This is the correct error message.

When I run it through SQL SERVER 2005 SCHEDULER, I run it as a SSIS package, with the command line:
/FILE "\\MyServer\Foo.dtsx.dtsx" /CONFIGFILE "\\MyServer\Config.dtsConfig" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING E

However, the package always exits with success.

|||if a task inside a SSIS Package fails doesn't mean that the whole package fails
and the sql agent step would only report an error if the whole package fails

so you could set the property 'Fail Package on failure' to TRUE ... in the task where you execute this stored procedure.

- paul
|||When I run the package via command line (dtexec.exe), I do get fail message:

DTExec: The package execution returned DTSER_FAILURE(1)

~Le

Thursday, March 8, 2012

[Q] cpu is full.. 100%

os : win2000
sql : sql2000 enterprise
table name : job
I created fulltext catalog
table is job column name : title
full population is every sunday am 5:00
incremental population is every 2hours from 7am to next day 3am
whenever server is running the both population, cpu is full 100%(see the
task manager )
Question : can i reduce the cpu use?
the columns are updated frequently are readcnt of job table
if i remove the readcnt column, the cpu use will reduce?
thanks...
below is the result of sp_spaceused job
name rows reserved data index_size unused
Jobs 259845 468808 KB 214264 KB 28128 KB 226416 KB
column_name type
title varchar(100)
findPrsn tinyint
ageZn varchar
applyRght varchar
emplrId varchar
seq int
readCnt int
sido tinyint
workTyp char
applyDcmnt varchar
findYmd2 smalldatetime
gugun tinyint
finishYmd bit
ymd smalldatetime
particular char
position varchar
logo varchar
endymd smalldatetime
jobtype1 tinyint
jobtype2 tinyint
jobtype3 tinyint
paytype char
pay1 int
pay2 bit
suprise tinyint
ts timestamp
visible bit
createdYmd smalldatetime
parkchangsoon,
The limited duration high CPU usage you are seeing during your scheduled
Incremental Population is expected and normal as there is a lot of internal
work being processed that is not only CPU intensive, but memory and disk i/o
intensive, but only for specific durations. You can reduce the priority of
the MSSearch service via sp_fulltext_service 'resource_usage' <value>, where
<value> is by default set to 3, and set it to 1 (background). However, this
will have the affect of causing the Incremental Population to take much
longer time to complete.
Since you are using SQL Server 2000, I'd highly recommend that you look at
"Change Tracking" and "Updated Index in Background" (see the BOL for more
info on Change Tracking) as this will eliminate the need for your scheduled
Incremental Population and allow your FT Catalog to be updated in near
real-time as the FT-enabled column is updated. This will eliminate the high
cpu usage you are seeing during the scheduled Incremental Population.
Regards,
John
"parkchangsoon" <dev_sr@.albaroot.com> wrote in message
news:#PZ$lvLXEHA.2972@.TK2MSFTNGP12.phx.gbl...
> os : win2000
> sql : sql2000 enterprise
> table name : job
> I created fulltext catalog
> table is job column name : title
> full population is every sunday am 5:00
> incremental population is every 2hours from 7am to next day 3am
> whenever server is running the both population, cpu is full 100%(see the
> task manager )
> Question : can i reduce the cpu use?
> the columns are updated frequently are readcnt of job table
> if i remove the readcnt column, the cpu use will reduce?
> thanks...
>
> below is the result of sp_spaceused job
> name rows reserved data index_size unused
> ----
> Jobs 259845 468808 KB 214264 KB 28128 KB 226416 KB
> column_name type
> --
> title varchar(100)
> findPrsn tinyint
> ageZn varchar
> applyRght varchar
> emplrId varchar
> seq int
> readCnt int
> sido tinyint
> workTyp char
> applyDcmnt varchar
> findYmd2 smalldatetime
> gugun tinyint
> finishYmd bit
> ymd smalldatetime
> particular char
> position varchar
> logo varchar
> endymd smalldatetime
> jobtype1 tinyint
> jobtype2 tinyint
> jobtype3 tinyint
> paytype char
> pay1 int
> pay2 bit
> suprise tinyint
> ts timestamp
> visible bit
> createdYmd smalldatetime
>

Sunday, February 19, 2012

[Expired subscription clean up] job failing

Hi,

The "Expired subscription clean up" job at the distributor keeps failing with the following error. Any ideas what it could be?

Message
Executed as user: domain\servicesql. The Distributor has not been installed correctly. [SQLSTATE 42000] (Error 20036). The step failed.

Thanks,
Priyanga

I came accross the following link which provides a workaround to the problem.
Thanks Narayana!

http://vyaskn.tripod.com/sql_server_2005_expired_subscription_cleanup.htm

Cheers,
Priyanga

|||This is a bug in replication for the case where distributor is not configured as publisher, this bug has been fixed and will be available in SQL Server 2005 SP1.|||This did not fix the error, and I'm running SP2 on SQL Server 2005. Any other solutions available? THANKS!

[Expired subscription clean up] job failing

Hi,

The "Expired subscription clean up" job at the distributor keeps failing with the following error. Any ideas what it could be?

Message
Executed as user: domain\servicesql. The Distributor has not been installed correctly. [SQLSTATE 42000] (Error 20036). The step failed.

Thanks,
Priyanga

I came accross the following link which provides a workaround to the problem.
Thanks Narayana!

http://vyaskn.tripod.com/sql_server_2005_expired_subscription_cleanup.htm

Cheers,
Priyanga

|||This is a bug in replication for the case where distributor is not configured as publisher, this bug has been fixed and will be available in SQL Server 2005 SP1.|||This did not fix the error, and I'm running SP2 on SQL Server 2005. Any other solutions available? THANKS!

Monday, February 13, 2012

[396] An idle CPU condition has not been defined - OnIdle job schedules will have no effec

Scheduled tasks fail with this error message:
"[396] An idle CPU condition has not been defined - OnIdle job schedules
will have no effect"
The OS is Windows Server 2003 R2 Std Edition SP2
SQL Server 2005 Developer Edition (9.0.3042)
Analysis Services is running.
Microsoft SQL Server Management Studio 9.00.3042.00
Microsoft Analysis Services Client Tools 2005.090.3042.00
Microsoft Data Access Components (MDAC) 2000.086.3959.00
(srv03_sp2_rtm.070216-1710)
Microsoft MSXML 2.6 3.0 6.0
Microsoft Internet Explorer 7.0.5730.11
Microsoft .NET Framework 2.0.50727.832
Operating System 5.2.3790
What is the problem and the solution?Hi,
Goto properties of SQL Server Agent --> Advanced --> Check "Idle CPU
condition" and define appropriate values.
HTH,
Dinesh|||Hi,
To let me better understand your issue, could you please let me know the
following questions:
1. what is kind of your job?
2. Does your SQL Server Agent Service account has administrator permission?
If not, what is the result if you use a local administrator as your SQL
Server Agent Services startup account?
3. Does this issue occur always or intermittently?
Also, for further research, I recommend that you mail me
(changliw_at_microsoft_dot_com) the SQL error logs which are located in the
folder %ProgramFiles%\Microsoft SQL Server\MSSQL(.n)\LOG by default.
Best regards,
Charles Wang
Microsoft Online Community Support
=====================================================Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
======================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================|||Thank you. That did it.
<dinu_babu@.hotmail.com> wrote in message
news:1185349324.238775.247870@.x40g2000prg.googlegroups.com...
> Hi,
> Goto properties of SQL Server Agent --> Advanced --> Check "Idle CPU
> condition" and define appropriate values.
> HTH,
> Dinesh
>|||I needed to go to properties of SQL Server Agent --> Advanced --> Check
"Idle CPU
condition" and define appropriate values. as described by Dinesh|||Hi,
Thanks for your updating and response.
I am glad to hear that this issue has been fixed by Dinesh's suggestion. If
you have any other questions or concerns, please feel free to let us know.
It is always our pleasure to be of assistance.
Have a nice day!
Best regards,
Charles Wang
Microsoft Online Community Support
=====================================================Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
======================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================

'[380] Unable to start JobManager thread for job' appears in SQLAgent log.

The above message appears in the SQLAgent log. The job(s) in question don't run, it can affect all or only some of the jobs under that agent. Only solution is a restart of the SQLAgent. Can find no mention of JobManager in the online books
Anyone else experienced this?| The above message appears in the SQLAgent log. The job(s) in question
don't run,
| it can affect all or only some of the jobs under that agent. Only
solution is a restart of the
| SQLAgent. Can find no mention of JobManager in the online books.
|
| Anyone else experienced this?
--
This error indicates that you are unable to allocate more threads for
SQLAgent jobs. How many jobs are concurrently running when you hit this
error? You may need to reduce this amount.
Hope this helps,
--
Eric Cárdenas
SQL Server support|||The instance of SQL has approximately 40 jobs configured. Only 3 or 4 are active at one time. The rest are adhoc or run infrequently.||||
| The instance of SQL has approximately 40 jobs configured. Only
| 3 or 4 are active at one time. The rest are adhoc or run infrequently.
--
To confirm or dismiss that this error is a thread issue, setup performance
monitor logs on threads for SQL agent and see if you have an escalation of
threads.
If all else fails, I recommend raising a case with Microsoft product
support to assist you.
Hope this helps,
--
Eric Cárdenas
SQL Server support

[380] Unable to start JobManager thread for job ......

An error occurred on SQL Agent Error Log of my system as follows.
[380] Unable to start JobManager thread for job .....
I have two questions.
1. How can I increase the number of thread allocated to JobManager? Should I
only decrease the number of concurrent job?
2. Is the only solution to restart the SQL Agent service in this case? The
job was not executed after this error.
Thank you
Hanky
Do you know how many jobs are running concurrently ? It could be a thread
issue .. but thats usually another error message that clearly states that
its waiting for a thread... something like that.. It could be that your
server is busy ... You may also consider opening up a PSS case..
"??" <hanky74@.daum.net> wrote in message
news:uU4JWJDgEHA.2916@.TK2MSFTNGP12.phx.gbl...
> An error occurred on SQL Agent Error Log of my system as follows.
> [380] Unable to start JobManager thread for job .....
> I have two questions.
> 1. How can I increase the number of thread allocated to JobManager? Should
I
> only decrease the number of concurrent job?
> 2. Is the only solution to restart the SQL Agent service in this case? The
> job was not executed after this error.
> Thank you
> Hanky
>

[380] Unable to start JobManager thread for job ......

An error occurred on SQL Agent Error Log of my system as follows.
[380] Unable to start JobManager thread for job .....
I have two questions.
1. How can I increase the number of thread allocated to JobManager? Should I
only decrease the number of concurrent job?
2. Is the only solution to restart the SQL Agent service in this case? The
job was not executed after this error.
Thank you
HankyDo you know how many jobs are running concurrently ? It could be a thread
issue .. but thats usually another error message that clearly states that
its waiting for a thread... something like that.. It could be that your
server is busy ... You may also consider opening up a PSS case..
"??" <hanky74@.daum.net> wrote in message
news:uU4JWJDgEHA.2916@.TK2MSFTNGP12.phx.gbl...
> An error occurred on SQL Agent Error Log of my system as follows.
> [380] Unable to start JobManager thread for job .....
> I have two questions.
> 1. How can I increase the number of thread allocated to JobManager? Should
I
> only decrease the number of concurrent job?
> 2. Is the only solution to restart the SQL Agent service in this case? The
> job was not executed after this error.
> Thank you
> Hanky
>

[380] Unable to start JobManager thread for job ......

An error occurred on SQL Agent Error Log of my system as follows.
[380] Unable to start JobManager thread for job .....
I have two questions.
1. How can I increase the number of thread allocated to JobManager? Should I
only decrease the number of concurrent job?
2. Is the only solution to restart the SQL Agent service in this case? The
job was not executed after this error.
Thank you
HankyDo you know how many jobs are running concurrently ? It could be a thread
issue .. but thats usually another error message that clearly states that
its waiting for a thread... something like that.. It could be that your
server is busy ... You may also consider opening up a PSS case..
"Çѱ⿵" <hanky74@.daum.net> wrote in message
news:uU4JWJDgEHA.2916@.TK2MSFTNGP12.phx.gbl...
> An error occurred on SQL Agent Error Log of my system as follows.
> [380] Unable to start JobManager thread for job .....
> I have two questions.
> 1. How can I increase the number of thread allocated to JobManager? Should
I
> only decrease the number of concurrent job?
> 2. Is the only solution to restart the SQL Agent service in this case? The
> job was not executed after this error.
> Thank you
> Hanky
>