Connecting SQL with IIB(Message Broker)

14:44 Unknown 0 Comments

  • Execute the following commands in command prompt to setup ODBC Path
  • ODBCINI=/app/mqsi/9.0.0.1/ODBC64/odbc.ini;export ODBCINI
  • ODBCSYSINI=/app/mqsi/9.0.0.1/ODBC64;export ODBCSYSINI
  • IE02_PATH=/opt/ibm/IE02/2.0.1;export IE02_PATH
  1. Go to the /var/mqsi/odbc/ directory in Linux
  2. Download the following files from above specified directory
    • odbc.ini
    • odbcinst.ini
  3. Open odbc.ini file in notepad ++ tool.
  4. Under [ODBC Data Sources] heading add the following line.
    • SQLSERVERDSN=DataDirect 7.0 ODBC SQL Server Wire Protocol
           Here SQLSERVERDSN is a data source name.

       5. Then add the following set of lines into the file.

       [SQLSERVERDSN ]

Driver=/opt/mqsi/iib9.0/ODBC64/V7.0/lib/UKmsss26.so

Description=DataDirect 7.0 ODBC SQL Server Wire Protocol

Address=DBSERVER\SQL_2016

;#Alternative way to locate server using a named instance

;#Address=<Your SQLServer Machine Name>\<Your SQLServer Instance Name>

AnsiNPW=Yes

Database=DB_NAME

QuotedId=No

ColumnSizeAsCharacter=1

LoginTimeout=0

         6.  From the above lines DBSERVER is a sql server machine name and SQL_2016 is a sql server instance name. DB_NAMEis a database name.

         7. Then give ctrl + s to save the file.

         8. After that open the odbcinst.ini file in notepad ++ editor.

         9. Under the [ODBC Drivers] heading add the below line.
          SQLSERVERDSN =Installed
         10. Then add the below code and save the file.

[SQLSERVERDSN ]

Driver=/opt/mqsi/iib9.0/ODBC64/V7.0/lib/UKmsss26.so

          11.  Upload the two updated file to linux broker installed location /var/mqsi/odbc/
          
          12.   Then go to linux terminal execute the following commands.
mqsisetdbparms brokername -n dsn::SQLSERVERDSN -u username -p password
mqsisetdbparms brokername -n odbc::SQLSERVERDSN -u username -p password
12.   To check whether the connection is correct with IIB. Execute the below command
mqsicvp broekrname -n SQLSERVERDSN 
13.   The result will be like successful command completion.




You Might Also Like

0 comments: