Db2

 View Only

newbie needs guidance on connection properties to db2 cloud from a sql linked server

  • 1.  newbie needs guidance on connection properties to db2 cloud from a sql linked server

    Posted Tue May 07, 2024 10:54 AM

    Hi, I'm tasked with basically making a clone of our linked server to a db2 erp for a new IDENTICAL instance in the cloud.   Mhy understanding is that the network address is the dnsname (dddddd) and the new cloud based instance willl be the same same.   Our tech guys will flip this to point to the new instance when its time to switch.   They've build a special vpn tunnel in the mean time to the cloud instance.  I know the ip address to the new server.  Can this community help me to clone what i already have to the new cloud linked server?

    USE [master]
    GO
    
    EXEC master.dbo.sp_addlinkedserver @server = N'erp_cloud', @srvproduct=N'', @provider=N'DB2OLEDB', @provstr=N'Provider=DB2OLEDB;DBMS Platform=DB2/AS400;Network Transport Library=TCPIP;Network Address=dddddd;Initial Catalog=CC;Package Collection=pppplib;
    Default Schema=ppppLIB;Host CCSID=37;PC Code Page=1252;Connection Pooling=True;'
    
    EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'erp_cloud',@useself=N'False',@locallogin=NULL,@rmtuser=N'xxxxxxxx',@rmtpassword='########'
    GO
    
    EXEC master.dbo.sp_serveroption @server=N'erp_cloud', @optname=N'collation compatible', @optvalue=N'true'
    GO
    
    EXEC master.dbo.sp_serveroption @server=N'erp_cloud', @optname=N'data access', @optvalue=N'true'
    GO
    
    EXEC master.dbo.sp_serveroption @server=N'erp_cloud', @optname=N'dist', @optvalue=N'false'
    GO
    
    EXEC master.dbo.sp_serveroption @server=N'erp_cloud', @optname=N'pub', @optvalue=N'false'
    GO
    
    EXEC master.dbo.sp_serveroption @server=N'erp_cloud', @optname=N'rpc', @optvalue=N'false'
    GO
    
    EXEC master.dbo.sp_serveroption @server=N'erp_cloud', @optname=N'rpc out', @optvalue=N'false'
    GO
    
    EXEC master.dbo.sp_serveroption @server=N'erp_cloud', @optname=N'sub', @optvalue=N'false'
    GO
    
    EXEC master.dbo.sp_serveroption @server=N'erp_cloud', @optname=N'connect timeout', @optvalue=N'0'
    GO
    
    EXEC master.dbo.sp_serveroption @server=N'erp_cloud', @optname=N'collation name', @optvalue=null
    GO
    
    EXEC master.dbo.sp_serveroption @server=N'erp_cloud', @optname=N'lazy schema validation', @optvalue=N'false'
    GO
    
    EXEC master.dbo.sp_serveroption @server=N'erp_cloud', @optname=N'query timeout', @optvalue=N'0'
    GO
    
    EXEC master.dbo.sp_serveroption @server=N'erp_cloud', @optname=N'use remote collation', @optvalue=N'true'
    GO
    
    EXEC master.dbo.sp_serveroption @server=N'erp_cloud', @optname=N'remote proc transaction promotion', @optvalue=N'true'
    GO
    


    ------------------------------
    stan teitelbaum
    ------------------------------