dbTalk Databases Forums  

Linked Server

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Linked Server in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Allan.
 
Posts: n/a

Default Linked Server - 09-12-2005 , 07:15 PM






I am trying to set-up a Linked Server in SQL 2000 to AS400 iSeries.
I would appreciate if anybody out there has the relevant syntax to
facilitate this.
I have tried and keep getting OLE DB Provider errors.
Thanks.

Reply With Quote
  #2  
Old   
Sue Hoegemeier
 
Posts: n/a

Default Re: Linked Server - 09-13-2005 , 10:36 PM






Install Client Access on the SQL Server box and make sure
you have the client updated with whatever service pack level
based on updates to the AS400. Then configure the linked
server as described in books online under Linked Servers,
configuring.
For data source, use the IP address of the AS400.
For provider string, you need to include the library you are
using, connect timeout setting and code page. There is some
documentation for the settings in the Client Access help
files.
You'd set the provider string somewhat like:
InitCat=YourLibrary;CCSID=37;PCCodePage=1252;
Data Source=xxx.xxx.xxx.xxx
Settings will depend on how your AS400 is configured. Again,
the Client Access help files have information on the
necessary connection string settings.

-Sue

On Mon, 12 Sep 2005 17:15:03 -0700, Allan.
<Allan. (AT) discussions (DOT) microsoft.com> wrote:

Quote:
I am trying to set-up a Linked Server in SQL 2000 to AS400 iSeries.
I would appreciate if anybody out there has the relevant syntax to
facilitate this.
I have tried and keep getting OLE DB Provider errors.
Thanks.


Reply With Quote
  #3  
Old   
Allan.
 
Posts: n/a

Default Re: Linked Server - 09-13-2005 , 11:51 PM



Thanks Sue.
I actually got it going with the following:

EXEC sp_addlinkedserver
@server = '[myServerName]',
@srvproduct = '',
@provider = 'MSDASQL',
@datasrc = '[myDataSource on the AS400]',
@location = '',
@provstr = 'DRIVER={Client Access ODBC Driver (32-bit)};SYSTEM=[myAS400
name];UID=[AS400 userName];PWD=[AS400 Pwd];',
@catalog = ''

Additional to this was setting up an ODBC Client Access connection with the
relevant settings.

I was then able to dynamically update the above variables in the
sp_addlinkedserver T-SQL command by using Global Variables within the DTS
package, so now I ahve a 'soft' solution, rather than relying on hard-coding
all of the variables.

Any other comments would be most welcome.
Cheers.

"Sue Hoegemeier" wrote:

Quote:
Install Client Access on the SQL Server box and make sure
you have the client updated with whatever service pack level
based on updates to the AS400. Then configure the linked
server as described in books online under Linked Servers,
configuring.
For data source, use the IP address of the AS400.
For provider string, you need to include the library you are
using, connect timeout setting and code page. There is some
documentation for the settings in the Client Access help
files.
You'd set the provider string somewhat like:
InitCat=YourLibrary;CCSID=37;PCCodePage=1252;
Data Source=xxx.xxx.xxx.xxx
Settings will depend on how your AS400 is configured. Again,
the Client Access help files have information on the
necessary connection string settings.

-Sue

On Mon, 12 Sep 2005 17:15:03 -0700, Allan.
Allan. (AT) discussions (DOT) microsoft.com> wrote:

I am trying to set-up a Linked Server in SQL 2000 to AS400 iSeries.
I would appreciate if anybody out there has the relevant syntax to
facilitate this.
I have tried and keep getting OLE DB Provider errors.
Thanks.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.