Solved

Issue with Sql Job and Linked Server Query

Posted on 2013-05-20
4
638 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 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

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…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

696 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