Showing posts with label executed. Show all posts
Showing posts with label executed. Show all posts

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()). [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

Monday, March 26, 2012

Job scheduling

Hi,

I have two jobs scheduled on the Agent. Each job has ten steps. The next step is executed only if the previous suceeds.

I want Job 2 to execute only if Job 1 suceeds. How do I schedule that?

I was thinking that I can have the ten steps of Job 2 as steps (11 to 20) of Job 1 with each step executing after the previous one succeeds. If I do that then I can get rid of Job 2.

Let me know what approach you would advise.

Thanksthats what i would do|||I think that is the only option. I am not aware of any other way of controlling the job sequence.|||You don't have to merge two jobs into one. At the end of job1, on step 10 choose "go to next step if succeeds" and then add one more step with command:

exec sp_start_job @.job_name = job2

Monday, March 12, 2012

Job Fails

I have a package that runs fine when manually executed, but if a job is created that executes the package the job fails. The job is run as the same account that runs sql server agent. The error message that appears is to see the job history but the job history just says the package failed. When I try to add logging no log is created.When you manually execute the package are you executing it under the same account that Agent is running. If not, then try and do that and see if the package runs. If it doesn't then it would most likely be a permissions problem for that account. If it does then you should try and post this in the Agent forum.

Thanks,
Matt|||

I get this exact same problem... but only with one specific package.
Other packages run fine - both manually and as jobs.

This particular package runs fine manually but NOT as job.
This package only has file tasks which copies file from a remote location to local disk. I have double-checked permissions. The account which has permission on the remote location is the same account under which SQL Server, and SQL Agent are running.

Any clue?

thanks,
Nitesh

|||So you are running both SQLServer and Agent as a domain account and the same domain acount has permissions on the remote server? Then I don't have any further thoughts but you should first verify that if you use runas to run a cmd shell under the agent account that the package still works. You should verify that the job isn't running under a proxy with a different account. If both these are true then you should post in the Agent forum since this is not a SSIS problem if the package runs when not run under Agent.

Sorry I can't be of more assistance,
Matt|||

Yes, I am running both SQLServer and Agent as a domain account and the same domain acount has permissions on the remote server.

I have 16 packages scheduled like this. 15 of them work fine (none of them copy files from remote location). Only this package breaks.

I will try to post this on Agent forum and update this thread with replies.

thanks,
Nitesh

|||Matt,

I found the problem.

I had mapped the network share (\\servername\sharename) to X:\ on the box running SSIS. So, my file source connection strings looked like X:\filename.txt

When I changed the file source connection string to \\servername\sharename\filename.txt , then it started working fine - both manually AND as a job.

Although my problem is solved, can you throw some light on why it happens like this?

thanks,
Nitesh|||

How are you mapping to X:? Are you executing the package on a different machine when you execute it under a job? Sounds like a problem with the context of the machine; doesn't have the mapping. So, if it doesn't have the mapping, it will be looking for the literal X: drive.
K

|||

Nitesh Ambastha wrote:

I had mapped the network share (\\servername\sharename) to X:\ on the box running SSIS. So, my file source connection strings looked like X:\filename.txt

When I changed the file source connection string to \\servername\sharename\filename.txt , then it started working fine - both manually AND as a job.

Although my problem is solved, can you throw some light on why it happens like this?


This is the way share security works in Windows 2003 - the network share mapped by user is private to this user session, and is invisible to other users running on same machine.

E.g. I mapped a disk using 'net share x: \\machine\share' and now have a drive x:. But when I (simultaneously) create another remote desktop connection to the same machine, I don't have x: drive.

The Agent creates a new user session, and thus this session does not see the share created by interactive user session.|||Thanks Michael.
That explains it.

regards,
Nitesh|||This is really not important but after reading your post, I created 1 desktop connection, mapped the network drive (X: drive to \\remoteserver\sharename) and then created another desktop connection to the same machine - and I found the mapped network drive (X: drive). Am I missing something or maybe network admins here carry over my profile and map it for me :(

regards,
Nitesh|||Did you check 'reconnect at logon' option (or /persistent:yes in net.exe command line)? In this case every logon creates a connection, but technically they are different :)

Is this Windows 2003? I'm not sure it worked the same way on Windows 2000.

This is simple to check with SysInternal's WinObj utility - \DosDevices object used to live in root, but now it is \Sessions\<N>\DosDevices.

Job Failing if shceduled from DTS

Hi,
I have an .exe executed from DTS and it is running successfully but when I
schedule a job for the DTS it fails."Detail Records: Error: -214722033
0
(80040496); Provider Error: 0 (0) Error string: CreateProcessTask
'DTSTask_DTSCreateProcessTask_1': Process returned code -532459699, which
does not match the specified Succ... Process Exit Code 1. The step failed.
"
Can anyone please help me?
Thanks.
Riz"Riz" <Riz@.discussions.microsoft.com> wrote in message
news:8032F201-CA6F-42C7-97B4-38F99003331E@.microsoft.com...
> Hi,
> I have an .exe executed from DTS and it is running successfully but when I
> schedule a job for the DTS it fails."Detail Records:
Error: -2147220330
> (80040496); Provider Error: 0 (0) Error string: CreateProcessTask
> 'DTSTask_DTSCreateProcessTask_1': Process returned code -532459699, which
> does not match the specified Succ... Process Exit Code 1. The step
failed."
When you run the job it is running under your permissions, when the SQL
Agent runs a scheduled job it runs under the Agent's permissions.
Most likely the agent does not have access to a resource such as the Network
or a particular share. Or, you need to use the full path in the DTS.
Try the Following:
1. Check in Services to see what account the SQL Server Agent is logging in
as.
If it is logging in to local machine it does not have access to any network
resources.
2. Make sure the executable, including any necessary data files, is
available to the SQL Server Agent account.
3. Use UNC Paths (\\CompName\ShareName\) to avoid drive mapping issues.
Good Luck,
Jim

Friday, March 9, 2012

Job failed with error 3624

Hi Guys,
In my develoment server, I got error with 3624 when job running, error
message is like:
Executed as user: Devl\Administrator. [SQLSTATE HY000] (Error 3624)
Location: p:\sql\ntdbms\storeng\drs\include\record.inl:1447 Expression:
m_SizeRec > 0 && m_SizeRec <= MAXDATAROW SPID: 75 Process ID: 1752
[SQLSTATE 01000] (Error 3624). The step failed.
The server was very slow, and like hang up. I cannot connect to server from
my computer. after while, maybe 4 minutes roughly, the server was recovered.
I got that error, and the job runing correctly.
the job runs every one minute to pupulate into a table, which selected from
other tables, and server is a subscriber server that has data replicated
from other server. Can somebody tell me what is reason? Thanks.Why nobody answer me this question? nobody had this error?
"Iter" wrote:
> Hi Guys,
> In my develoment server, I got error with 3624 when job running, error
> message is like:
> Executed as user: Devl\Administrator. [SQLSTATE HY000] (Error 3624)
> Location: p:\sql\ntdbms\storeng\drs\include\record.inl:1447 Expression:
> m_SizeRec > 0 && m_SizeRec <= MAXDATAROW SPID: 75 Process ID: 1752
> [SQLSTATE 01000] (Error 3624). The step failed.
> The server was very slow, and like hang up. I cannot connect to server from
> my computer. after while, maybe 4 minutes roughly, the server was recovered.
> I got that error, and the job runing correctly.
> the job runs every one minute to pupulate into a table, which selected from
> other tables, and server is a subscriber server that has data replicated
> from other server. Can somebody tell me what is reason? Thanks.|||This can either be a corruption in the database (see DBCC CHECKDB) or a bug in the product (open a
case with MS if DBCC doesn't report a corruption).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Iter" <Iter@.discussions.microsoft.com> wrote in message
news:E9DF8C82-38F6-4737-A2FC-E775CA38D522@.microsoft.com...
> Why nobody answer me this question? nobody had this error?
>
> "Iter" wrote:
>> Hi Guys,
>> In my develoment server, I got error with 3624 when job running, error
>> message is like:
>> Executed as user: Devl\Administrator. [SQLSTATE HY000] (Error 3624)
>> Location: p:\sql\ntdbms\storeng\drs\include\record.inl:1447 Expression:
>> m_SizeRec > 0 && m_SizeRec <= MAXDATAROW SPID: 75 Process ID: 1752
>> [SQLSTATE 01000] (Error 3624). The step failed.
>> The server was very slow, and like hang up. I cannot connect to server from
>> my computer. after while, maybe 4 minutes roughly, the server was recovered.
>> I got that error, and the job runing correctly.
>> the job runs every one minute to pupulate into a table, which selected from
>> other tables, and server is a subscriber server that has data replicated
>> from other server. Can somebody tell me what is reason? Thanks.|||I checked the database with dbcc checkdb, no error reported. Is this sql
server software bug? Thanks.
"Tibor Karaszi" wrote:
> This can either be a corruption in the database (see DBCC CHECKDB) or a bug in the product (open a
> case with MS if DBCC doesn't report a corruption).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Iter" <Iter@.discussions.microsoft.com> wrote in message
> news:E9DF8C82-38F6-4737-A2FC-E775CA38D522@.microsoft.com...
> > Why nobody answer me this question? nobody had this error?
> >
> >
> > "Iter" wrote:
> >
> >> Hi Guys,
> >> In my develoment server, I got error with 3624 when job running, error
> >> message is like:
> >> Executed as user: Devl\Administrator. [SQLSTATE HY000] (Error 3624)
> >> Location: p:\sql\ntdbms\storeng\drs\include\record.inl:1447 Expression:
> >> m_SizeRec > 0 && m_SizeRec <= MAXDATAROW SPID: 75 Process ID: 1752
> >> [SQLSTATE 01000] (Error 3624). The step failed.
> >> The server was very slow, and like hang up. I cannot connect to server from
> >> my computer. after while, maybe 4 minutes roughly, the server was recovered.
> >> I got that error, and the job runing correctly.
> >> the job runs every one minute to pupulate into a table, which selected from
> >> other tables, and server is a subscriber server that has data replicated
> >> from other server. Can somebody tell me what is reason? Thanks.
>|||Yes, if the database comes out clean, I'd strongly suspect a bug. Perhaps you can try this on the
most recent service pack and/or check if there are hotfixes available for this?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Iter" <Iter@.discussions.microsoft.com> wrote in message
news:C5F65767-84F7-4E7A-9E8E-444CBA9F55EB@.microsoft.com...
>I checked the database with dbcc checkdb, no error reported. Is this sql
> server software bug? Thanks.
>
> "Tibor Karaszi" wrote:
>> This can either be a corruption in the database (see DBCC CHECKDB) or a bug in the product (open
>> a
>> case with MS if DBCC doesn't report a corruption).
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "Iter" <Iter@.discussions.microsoft.com> wrote in message
>> news:E9DF8C82-38F6-4737-A2FC-E775CA38D522@.microsoft.com...
>> > Why nobody answer me this question? nobody had this error?
>> >
>> >
>> > "Iter" wrote:
>> >
>> >> Hi Guys,
>> >> In my develoment server, I got error with 3624 when job running, error
>> >> message is like:
>> >> Executed as user: Devl\Administrator. [SQLSTATE HY000] (Error 3624)
>> >> Location: p:\sql\ntdbms\storeng\drs\include\record.inl:1447 Expression:
>> >> m_SizeRec > 0 && m_SizeRec <= MAXDATAROW SPID: 75 Process ID: 1752
>> >> [SQLSTATE 01000] (Error 3624). The step failed.
>> >> The server was very slow, and like hang up. I cannot connect to server from
>> >> my computer. after while, maybe 4 minutes roughly, the server was recovered.
>> >> I got that error, and the job runing correctly.
>> >> the job runs every one minute to pupulate into a table, which selected from
>> >> other tables, and server is a subscriber server that has data replicated
>> >> from other server. Can somebody tell me what is reason? Thanks.
>>

job failed (SSIS). Executed as user: SRVDESASQL2005\SYSTEM.

Hi everyone,
I've made SSIS using domain security and after that it has been scheduled by
Sql Server Agent. But that job fails and looking into history job I read:
"Executed as user: SRVDESASQL2005\SYSTEM. The package execution failed. The
step failed."
Mssql Server agent is being used for local system. Is there the problem?
Nevertheles the aforementioned user have symin role.
Does anyone ever faced this kind of issue?
Thanks in advance,This issue is already solved.
Please post DDL, DCL and DML statements as well as any error message in
order to understand better your request. It''''s hard to provide information
without seeing the code. location: Alicante (ES)
"Enric" wrote:

> Hi everyone,
> I've made SSIS using domain security and after that it has been scheduled
by
> Sql Server Agent. But that job fails and looking into history job I read:
> "Executed as user: SRVDESASQL2005\SYSTEM. The package execution failed. T
he
> step failed."
> Mssql Server agent is being used for local system. Is there the problem?
> Nevertheles the aforementioned user have symin role.
> Does anyone ever faced this kind of issue?
> Thanks in advance,
>
>
>
>
>|||Just curious.. what was the reason. Was it because SSIS accessed some
resource in the network for whcih the local user didn't have access'
"Enric" wrote:
> This issue is already solved.
> --
> Please post DDL, DCL and DML statements as well as any error message in
> order to understand better your request. It''''s hard to provide informati
on
> without seeing the code. location: Alicante (ES)
>
> "Enric" wrote:
>

job failed (SSIS). Executed as user: SRVDESASQL2005\SYSTEM.

Hi everyone,

I've made SSIS using domain security and after that it has been scheduled by Sql Server Agent. But that job fails and looking into history job I read:

"Executed as user: SRVDESASQL2005\SYSTEM. The package execution failed. The step failed."

Mssql Server agent is being used for local system. Is there the problem?

Nevertheles the aforementioned user have sysadmin role.

Does anyone ever faced this kind of issue?

Thanks in advance,


Check out this kb article, which digs into scheduling and permissions problems, and the way to troubleshoot them:

http://support.microsoft.com/kb/918760

|||

Effectively I was setting local system as user for the service so that...

Thanks anyway.

Wednesday, March 7, 2012

Job Does Not Execute Correctly

Hi everyone,
I have a management job which runs every minute automatically. However recently I discovered that the result was not executed correctly even the job history tells me it runs successfully. On the other hand, the result was executed correctly (i.e. what I expect) when I try to start the job manually.
Any idea what issue does it related to? I doubt if it is related to any security context but cannot prove it yet. Thanks for any idea.Hi,
As you say u execute job every 1 minute, What does the job
do and what is the expected time period of the job
completion.
Regards
Thirumal
www.thirumal.com
>--Original Message--
>Hi everyone,
>I have a management job which runs every minute
automatically. However recently I discovered that the
result was not executed correctly even the job history
tells me it runs successfully. On the other hand, the
result was executed correctly (i.e. what I expect) when I
try to start the job manually.
>Any idea what issue does it related to? I doubt if it is
related to any security context but cannot prove it yet.
Thanks for any idea.
>.
>|||Thirumal,
Thanks for your reply. The job executes within just few seconds, wont' be too long.
The job retreives several records from tables and then insert records into another table based on a if-else condition.
The code is like this:
DECLARE @.thisMin varchar(25)
DECLARE @.table_no varchar(2), @.table_tmp varchar(2)
SET @.thisMin = GETDATE()
SET @.table_no = DATEDIFF(dd, ''01/01/01'', @.thisMin) % 36
SET @.table_tmp = DATEDIFF(dd, ''01/01/01'', DATEADD(dd, -1, @.thisMin)) % 36
EXEC(''
DECLARE temp_cur CURSOR FOR
SELECT DISTINCT alertId FROM z_EventHistoryD''+@.table_no+'' WHERE
DATEDIFF(mi, endTime, '''+@.thisMin+''') = 0 OR
DATEDIFF(mi, endTime, '''+@.thisMin+''') = 1
GROUP BY alertId, severitySortOrder
HAVING COUNT(alertId) = 1
DECLARE @.alertId int, @.thisSSO int, @.lastSSO int, @.auditTime datetime
OPEN temp_cur
FETCH NEXT FROM temp_cur INTO @.alertId
WHILE @.@.FETCH_STATUS = 0
BEGIN
SET @.thisSSO = NULL
SET @.lastSSO = NULL
SET @.auditTime = NULL
IF DATEPART(hh, '''+@.thisMin+''')=0 AND DATEPART(mi, '''+@.thisMin+''')=0
SELECT @.lastSSO = severitySortOrder, @.auditTime = endTime
FROM z_EventHistoryD''+@.table_tmp+'' WHERE alertId = @.alertId
AND DATEDIFF(mi, endTime, '''+@.thisMin+''') = 1
ELSE
SELECT @.lastSSO = severitySortOrder, @.auditTime = endTime
FROM z_EventHistoryD''+@.table_no+'' WHERE alertId = @.alertId
AND DATEDIFF(mi, endTime, '''+@.thisMin+''') = 1
SELECT @.thisSSO = severitySortOrder, @.auditTime = endTime
FROM z_EventHistoryD''+@.table_no+'' WHERE alertId = @.alertId
AND DATEDIFF(mi, endTime, '''+@.thisMin+''') = 0
IF (@.lastSSO IS NULL)
--PRINT ''''-- NEW EVENT''''
INSERT INTO alertAudit VALUES (@.alertId, NULL, @.thisSSO, 1, @.auditTime)
ELSE
IF (@.thisSSO IS NULL)
--PRINT ''''-- ENDING EVENT''''
INSERT INTO alertAudit
SELECT alertId, @.lastSSO, NULL, -1, clearTime FROM alertHistory WHERE alertId = @.alertId
ELSE
IF (@.thisSSO <> @.lastSSO)
--PRINT ''''-- CHANGE SEVERITY EVENT''''
INSERT INTO alertAudit VALUES (@.alertId, @.lastSSO, @.thisSSO, 2, @.auditTime)
ELSE
IF (@.thisSSO = @.lastSSO)
PRINT ''''-- UNCHANGED SEVERITY''''
ELSE
PRINT ''''-- UNKNOWN ERROR''''
/*--DEBUG
PRINT @.alertId
PRINT @.auditTime
PRINT @.lastSSO
PRINT @.thisSSO
--DEBUG*/
FETCH NEXT FROM temp_cur INTO @.alertId
END
CLOSE temp_cur
DEALLOCATE temp_cur
'')
Thanks again
"Thirumal" wrote:
> Hi,
> As you say u execute job every 1 minute, What does the job
> do and what is the expected time period of the job
> completion.
> Regards
> Thirumal
> www.thirumal.com
> >--Original Message--
> >Hi everyone,
> >
> >I have a management job which runs every minute
> automatically. However recently I discovered that the
> result was not executed correctly even the job history
> tells me it runs successfully. On the other hand, the
> result was executed correctly (i.e. what I expect) when I
> try to start the job manually.
> >
> >Any idea what issue does it related to? I doubt if it is
> related to any security context but cannot prove it yet.
> Thanks for any idea.
> >.
> >
>