473,803 Members | 4,139 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DB2 --> 2005 Linked Server Mystery Solved

I've seen a number of posts from frustrated folks about this topic,
with not much offered as a solution. I actually managed to get this to
work today, so I thought I'd post for the benefit of the community.

My team went through a number of puzzling errors in getting this work,
like the CLI0150E (Driver not capable) error, and a variety of DB2OLEDB
errors. None which were really indicative of the problem. Here's how
I got a read/write connection to function between SQL 2005 and a DB2
UDB database on AIX (v8.2)

1) First I configured a UDL data source as described in this Microsoft
article: http://support.microsoft.com/kb/218590/ This created the
resulting provider string:
Here is the resulting provider string:
[oledb]
; Everything after this line is an OLE DB initstring
Provider=DB2OLE DB;User ID=<masked>;Pas sword=<masked>; Initial
Catalog=<MYDBNA ME>;Network Transport Library=TCP;Hos t CCSID=37;PC Code
Page=1252;Netwo rk Address=myserve r.corp.somethin g.org;Network
Port=50000;Pack age Collection=<TAB SCHEMA>;Default
Schema=<TABSCHE MA>;Process Binary as Character=False ;Units of
Work=RUW;Defaul t Qualifier=<TABS CHEMA>;DBMS Platform=DB2/6000;Defer
Prepare=False;P ersist Security Info=True;Conne ction Pooling=True;De rive
Parameters=Fals e;

2) Then I created the linked server in SQL 2005:
/****** Object: LinkedServer [MYDB2LINKEDSERV ER] Script Date:
01/18/2007 15:10:00 ******/
EXEC master.dbo.sp_a ddlinkedserver @server = N'OLEDB2',
@srvproduct=N'M icrosoft OLE DB Provider for DB2',
@provider=N'DB2 OLEDB', @datasrc=N'<MYS ERVER>',
@provstr=N'Prov ider=DB2OLEDB;I nitial Catalog=<MYDBNA ME>;Network
Transport Library=TCPIP;H ost CCSID=37;PC Code Page=1252;Netwo rk
Address=<myserv er>.corp.nai.or g;Network Port=50000;Pack age
Collection=NULL ID;Process Binary as Character=False ;Units of
Work=RUW;DBMS Platform=DB2/6000;Defer Prepare=False;P ersist Security
Info=False;Conn ection Pooling=True;De rive Parameters=Fals e;',
@catalog=N'<MYD BNAME>'
GO
EXEC master.dbo.sp_s erveroption @server=N'OLEDB 2', @optname=N'coll ation
compatible', @optvalue=N'fal se'
GO
EXEC master.dbo.sp_s erveroption @server=N'OLEDB 2', @optname=N'data
access', @optvalue=N'tru e'
GO
EXEC master.dbo.sp_s erveroption @server=N'OLEDB 2', @optname=N'dist ',
@optvalue=N'fal se'
GO
EXEC master.dbo.sp_s erveroption @server=N'OLEDB 2', @optname=N'pub' ,
@optvalue=N'fal se'
GO
EXEC master.dbo.sp_s erveroption @server=N'OLEDB 2', @optname=N'rpc' ,
@optvalue=N'tru e'
GO
EXEC master.dbo.sp_s erveroption @server=N'OLEDB 2', @optname=N'rpc out',
@optvalue=N'tru e'
GO
EXEC master.dbo.sp_s erveroption @server=N'OLEDB 2', @optname=N'sub' ,
@optvalue=N'fal se'
GO
EXEC master.dbo.sp_s erveroption @server=N'OLEDB 2', @optname=N'conn ect
timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_s erveroption @server=N'OLEDB 2', @optname=N'coll ation
name', @optvalue=null
GO
EXEC master.dbo.sp_s erveroption @server=N'OLEDB 2', @optname=N'lazy
schema validation', @optvalue=N'fal se'
GO
EXEC master.dbo.sp_s erveroption @server=N'OLEDB 2', @optname=N'quer y
timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_s erveroption @server=N'OLEDB 2', @optname=N'use
remote collation', @optvalue=N'tru e'

3) Then, I had to manually change this option in SQL 2005 (There used
to be a button for it in SQL 2000, so you have to do it manually now)
exec master.dbo.sp_M Sset_oledb_prop 'DB2OLEDB','All owInProcess',1
*** IMPORTANT STEP. IT WON'T WORK WITHOUT IT!!**

4) Then I ran my SQL:

select * from MYDB2LINKEDSERV ER.MYDBNAME.TAB SCHEMA.MY_TABLE

insert into MYDB2LINKEDSERV ER.MYDBNAME.TAB SCHEMA.MY_TABLE
select MY_SQL_COL from MY_SQL_TABLE

Jan 19 '07 #1
0 5385

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
6543
by: kharless | last post by:
Greetings, If I use a "select into" to clone a table, all attributes are created correctly, however, if I use the same statement across a linked server, my identity column loses its IDENTITY specification. Is this a known issue or basic functionality of using "select into" with linked servers? Kurt
3
11855
by: RandyMartin | last post by:
<<cross posted from microsoft.public.sqlserver.server>> Environment: Windows 2003 Standard Edition SP1, SQL 2005 EE RTM (both servers) I am getting the following messages when I run this query: select * from LINKEDSERVER.databasename.dbo.tablename
6
1888
by: pb648174 | last post by:
I have a web server and database server which are not on a domain. The web server has an app that is running on under the IUSR account and there is a corresponding IUSR account on the database server. The web app connects to the SQL server with the windows authentication and everything works fine. I also have a stored proc which does a file search using a linked server to an index server on the very same web server. For now assume that...
6
4750
by: Neil | last post by:
After creating a linked server to a remote server, I needed to log in using sp_addlinkedsrvlogin to get my stored procedure to work. However, I noticed that after stopping SQL Server and the DTC and then restarting both, that my stored procedure worked without having to execute sp_addlinkedsrvlogin. Is the log-in information stored in the machine, such that if SQL Server is stopped or the server is rebooted, on does not have to execute...
0
1550
by: cliffeh | last post by:
Hello, I'm trying to create a linked server in Microsoft SQL Server 2005 x64 with SP1 on Windows 2003 Standard x64 with SP1 to an iSeries with V5R2, using Client Access V5R3, service level SI24723. I have this working using an ODBC connection on Windows 2003/SQL 2005 x86 edition, but can't get it working on the x64 version. I'm getting various errors when I execute queries, including: Msg 7399, Level 16, State 1, Line 1
2
4168
by: sqlgirl | last post by:
Hi, We have 2 servers. Server1 is a 2000 box, with SP3 (yes I know it is not up to date). Server2 is a 2005 box, SP2. I set up Server1 (2000) to have a linked server to Server2 (2005). The reason I did this is because we are using a stored procedure on Server2 to send mail, as we have found that using mail on 2000 doesn't always work as advertised.
1
3675
by: BillCo | last post by:
There seems to be a lot of confusion around the groups about linking to an Access mdb with the SQL Server Jet OLE DB provider and I havent been able to find a straight forward solution. Basically, I have an Access MDB (A2K) on one server and a SQL Server DB (2005 std ed.) on another - Both on the same network. I'm trying to create a linked server object in the SQL server to view data in the mdb. I've set it up and it works - but only from...
0
1143
by: dordali | last post by:
Have a question. I have a table e.g. "Table1" on DB1 that is going to be archived once a month to "ArchiveTable1" on DB2, both on the one server. Will have to change SPs that were accessing table1 to now access ArchiveTable1. This is no problem as I can just do the following: select * from db2.dbo.ArchiveTable1. Some time in the future this ArchiveTable1 will be moved to another server, and I wont be able to use: db2.dbo.ArchiveTable1. When...
0
1674
by: Derftics | last post by:
Hello everybody, Did anyone of you know this problem? Goal: I need to created a SQL 2005 link server using the radio button "I]Be made using login's current security context" Scenario 1: I created the link in my MMC client in my workstation and i encounter this error message. TITLE: Microsoft SQL Server Management Studio ------------------------------
0
10542
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10309
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10289
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10068
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9119
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7600
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4274
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3795
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2968
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.