Skip to content

Remote Server Sybase IQ to Sybase IQ

December 19, 2012

Introduction

 

It is common practice in DW to have more than one environment other than production. This other environments are used for development and testing. Is also common practice that developer request refreshment of subset of data from production environment to test environment. When refreshing large amount of data, the most performing method in Sybase IQ is to download the data to a file in production environment and, in development environment, purge and load the table from the file. This method requires file manipulation on the host servers. If small subset of data needs to be refreshed, we can use select/insert in development environment using a proxy table from production in the insert part of the statement. For this last method, we need to create a remote server from Sybase IQ to Sybase IQ before been able to create the remote server.

In this post, I present a procedure to create a Sybase IQ remote server using the Sybase IQ 15.2 ODBC driver.

 

Environment

 

  • Sybase IQ 15.2 ESD#3 running on Solaris 10 over Sun Sparc x64 architecture.
  • Sybase IQ 15.2 64-bit ODBC Driver for Solaris 10

 

Procedure

 

On the test environment host server:

  1. Add the ODBC entry in .odbc.ini

    [ODBC Data Sources]

    MyProdIqSrvr = Sybase IQ

     

    [MyProdIqSrvr]

    Driver=/<mypath>/IQ-15_2/lib64/libdbodbc11.so

    DriverUnicodeType=1

    Description=Sybase IQ

    EngineName= MyProdIqSrvr

    CommLinks=tcpip(host=myhost:4400) # here I’m using port 4400

    DatabaseName=MyProdIqDb

    DatabaseFile=/ Data/MyProdIqDb.db

 

  1. Create and entry in the interface file ( you can do this using the iqdsedit tool)

 

MyProdIqSrvr

master tcp ether myhost 4400

query tcp ether myhost 4400

 

  1. Create the remote server

 

create server prodDwIqSrvr


class ‘ODBC’


using ‘MyProdIqSrvr’

 

  1. Test connectivity

 

  1. Create the proxy table

    create existing table DBA.MyTable_prod

    at ‘MyProdIqSrvr.MyprodIqDb.DBA.MyTable’

     

  2. Display the rows in the proxy table

     

    select * from DBA. MyTable _prod

     

  3. If you do not need it any more, drop the proxy table

     

    drop table DBA. MyTable _prod

 

Voila, we are done!

Advertisements

From → ODBC, SAP IQ

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: