SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS package failing while executing as Agent job


SSIS package failing while executing as Agent job

Author
Message
lazy writer
lazy writer
SSC Journeyman
SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)

Group: General Forum Members
Points: 80 Visits: 1293
Hi,

I had some weird issues while running SSIS package as agent job. I can run SSIS package manually but failing to run as agent job. I thought its permission issues with Agent service account then I RDP into the server using service account login (domain\agentserviceaccount) and run the package and it went fine.

any idea?

much appreciated Smile

Thanks
John Mitchell-245523
John Mitchell-245523
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: General Forum Members
Points: 18775 Visits: 16226
What error message are you getting when you run it as a job? Does the package use package configurations? Could it be that the configuration settings are being picked up from a different place when you run it as a job?

John
lazy writer
lazy writer
SSC Journeyman
SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)

Group: General Forum Members
Points: 80 Visits: 1293
Thanks John,

This package wouldn't use any configurations and everything saved with in the package. Interestingly it works fine when I login as Agent service account then give right click and execute package all good but only problem when running as SQL Agent Job.

Error message keep varying and not the same for every failure as shown below..

failed with the following error: "String or binary data would be truncated

DSN contains an architecture mismatch between the Driver and Application
John Mitchell-245523
John Mitchell-245523
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: General Forum Members
Points: 18775 Visits: 16226
What are the differences between your login and the SQL Server Agent account login? Default database? Language? Anything else?

Does your package do anything user-sensitive, for example INSERT INTO MyTable (mycol) VALUES (SUSER_NAME())? If you could find out what task it's failing on, that will help you to work out the reason for the failure.

John
lazy writer
lazy writer
SSC Journeyman
SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)

Group: General Forum Members
Points: 80 Visits: 1293
thanks for your response John,

Here I am not comparing it with my login and service account.

just to narrow down the issue I logged into the server as service account using service account credentials and then ran the package execute utility and it wen fine.

then I ran the same package as Agent job and then it failing Sad -- While running as Agent Job it will be executed under the same service account security context.



any idea?
lkennedy76
lkennedy76
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1726 Visits: 919
lazy writer (3/20/2013)
Hi,

I had some weird issues while running SSIS package as agent job. I can run SSIS package manually but failing to run as agent job. I thought its permission issues with Agent service account then I RDP into the server using service account login (domain\agentserviceaccount) and run the package and it went fine.

any idea?

much appreciated Smile

Thanks



You need to have the package encryted with the user. you can open and save it all day however if you do not encrypt it won't save and it will fail.

MCSA SQL Server 2012
lkennedy76
lkennedy76
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1726 Visits: 919
It's the Database!!! (3/20/2013)
lazy writer (3/20/2013)
Hi,

I had some weird issues while running SSIS package as agent job. I can run SSIS package manually but failing to run as agent job. I thought its permission issues with Agent service account then I RDP into the server using service account login (domain\agentserviceaccount) and run the package and it went fine.

any idea?

much appreciated Smile

Thanks



You need to have the package encryted with the user. you can open and save it all day however if you do not encrypt it won't save and it will fail.


see this link for more detail...

http://www.mssqltips.com/sqlservertip/2091/securing-your-ssis-packages-using-package-protection-level/

MCSA SQL Server 2012
Welsh Corgi
Welsh Corgi
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13408 Visits: 4894
Right Click on the Project and Select Properties,

On the left click the debugging tab.

Make sure that Run64bitRuntime is set to false.

For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Welsh Corgi
Welsh Corgi
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13408 Visits: 4894
Looking at your error message more closely it could be related to the DSN.

Consider where it is a 32 bit DSN or a 64 bit DSN.

http://sql-ution.com/32-bit-odbc-connections-with-64-bit-ssis

For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Welsh Corgi
Welsh Corgi
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13408 Visits: 4894
It's the Database!!! (3/20/2013)
It's the Database!!! (3/20/2013)
lazy writer (3/20/2013)
Hi,

I had some weird issues while running SSIS package as agent job. I can run SSIS package manually but failing to run as agent job. I thought its permission issues with Agent service account then I RDP into the server using service account login (domain\agentserviceaccount) and run the package and it went fine.

any idea?

much appreciated Smile

Thanks



I capture my error messages.

This is an example when the password was not stored:


OLE DB provider "MSDASQL" for linked server "LS_RDB_DWH_POLICY" returned message "[Oracle][ODBC][Ora]ORA-01017: invalid username/password; logon denied ".


You need to have the package encryted with the user. you can open and save it all day however if you do not encrypt it won't save and it will fail.


see this link for more detail...

http://www.mssqltips.com/sqlservertip/2091/securing-your-ssis-packages-using-package-protection-level/


I error that the OP is receving is not consistent with package encrypted.

You will get a completly different error if it is password related.

For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search