Solved

Issue with Sql Job and Linked Server Query

Posted on 2013-05-20
4
597 Views
Last Modified: 2014-01-31
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
0
Comment
Question by:mebster82
  • 2
4 Comments
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 39183626
Seems like a privilege issue.
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.
0
 

Author Comment

by:mebster82
ID: 39184968
Usernames is the same for both
0
 
LVL 12

Expert Comment

by:sachitjain
ID: 39186423
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.
0
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 435 total points
ID: 39186597
>> Usernames is the same for both

If both the usernames are same and your username is a windows account, can you try changing the startup account of your SQL Server and Agent services to that account.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hi, I have heard from my friends that it’s not possible to create Label Printing report using SSRS. I am amazed after hearing this words not possible in SSRS. I googled lot and found that it is possible to some of people know about the Report Bui…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question