Solved

Issue with Sql Job and Linked Server Query

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now