Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Issue with Sql Job and Linked Server Query

Posted on 2013-05-20
4
Medium Priority
?
691 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

610 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