?
Solved

Issue with Sql Job and Linked Server Query

Posted on 2013-05-20
4
Medium Priority
?
652 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1305 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this article I will describe the Detach & Attach 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.
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

771 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