mebster82
asked on
Issue with Sql Job and Linked Server Query
Hi,
My query to my linked db2 server works fine in a management studio. When I run the same exact query in a sql job. I get the error below. I am running sql server 2008 R2.
Executed as user: NT AUTHORITY\SYSTEM. Cannot initialize the data source object of OLE DB provider "IBMDASQL" for linked server "ISERIES". [SQLSTATE 42000] (Error 7303) OLE DB provider "IBMDASQL" for linked server "ISERIES" returned message "CWBSY1006 - User ID is invalid ". [SQLSTATE 01000] (Error 7412). The step failed
My query to my linked db2 server works fine in a management studio. When I run the same exact query in a sql job. I get the error below. I am running sql server 2008 R2.
Executed as user: NT AUTHORITY\SYSTEM. Cannot initialize the data source object of OLE DB provider "IBMDASQL" for linked server "ISERIES". [SQLSTATE 42000] (Error 7303) OLE DB provider "IBMDASQL" for linked server "ISERIES" returned message "CWBSY1006 - User ID is invalid ". [SQLSTATE 01000] (Error 7412). The step failed
ASKER
Usernames is the same for both
Is your MS Sql server service and SQL Agent service running under same account? If not then please try to run your agent service under same account under which your sql server service is running.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Kindly check the credentials you are using in SSMS and the username you are using in the job to connect the linked server.
Also check the username under which the job is supposed to run.