Author |
Message
|
harish.sun |
Posted: Thu Jul 30, 2009 9:38 pm Post subject: Various ways to connect to a database using WMB |
|
|
Newbie
Joined: 29 Jul 2009 Posts: 9
|
What are the various ways to connect to a database using WMB |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Jul 30, 2009 10:30 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Have you read the Documentation on the Subject?
Have you perused this forum and got any ideas?
Have to received any training on Broker?
Have you asked your IBM Salesperson this question?
Have you read the Product Datasheet?
If the answer is No to at least two of the above please do at least two and let us know what information you have gleaned. We will be happy to tell you if you are incorrect and how you can proceed.
finally, what are your reasons for asking this question? _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
MQEnthu |
Posted: Thu Jul 30, 2009 10:31 pm Post subject: |
|
|
 Partisan
Joined: 06 Oct 2008 Posts: 329 Location: India
|
You can configure a Compute, Filter, or Database node to select data from database . _________________ -----------------------------------------------
It is good to remember the past,
but don't let past capture your future |
|
Back to top |
|
 |
zpat |
Posted: Thu Jul 30, 2009 11:02 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
|
Back to top |
|
 |
harish.sun |
Posted: Thu Jul 30, 2009 11:14 pm Post subject: |
|
|
Newbie
Joined: 29 Jul 2009 Posts: 9
|
smdavies99 wrote: |
Have you read the Documentation on the Subject?
Have you perused this forum and got any ideas?
Have to received any training on Broker?
Have you asked your IBM Salesperson this question?
Have you read the Product Datasheet?
If the answer is No to at least two of the above please do at least two and let us know what information you have gleaned. We will be happy to tell you if you are incorrect and how you can proceed.
finally, what are your reasons for asking this question? |
I had gone through few of the documents and most of the places they were talking about connecting through ODBC connection and also it says we can connect using JDBC with few give ups.
I was facing some issue on using ODBC driver where it returns junk characters using an Oracle Database. I had posted this issue in a separate thread.
Just wanted to know what are the other possible ways to connect to database like
1. Using ODBC
2. Using JDBC
which one is the best one to go for and what situation? |
|
Back to top |
|
 |
zpat |
Posted: Fri Jul 31, 2009 12:01 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
There are plenty of sites accessing Oracle from WMB over ODBC. It's just a question of getting compatible drivers and versions.
Look at the sample odbc64.ini file, eg for WMB 6.1 on AIX
Quote: |
##########################################################################
;# 64 bit ODBC database driver manager initialisation file. #
;##########################################################################
;# It is recommended that you take a copy of this file and then edit the #
;# copy. #
;# #
;# 1. Complete the 'Mandatory information stanza' section #
;# at the end of the file. #
;# #
;# 2. For each data source, add the name of the data source into #
;# the 'List of data sources stanza' section. #
;# #
;# 3. For each data source, create a stanza in the #
;# 'Individual data source stanzas' section. #
;##########################################################################
;#######################################
;#### List of data sources stanza ######
;#######################################
[ODBC Data Sources]
DB2DB=IBM DB2 ODBC Driver
ORACLEDB=DataDirect 5.3 64bit Oracle Wire Protocol
ORACLERACDB=DataDirect 5.3 64bit Oracle Wire Protocol (Real Application Clusters)
SYBASEDB=DataDirect 5.3 64bit Sybase Wire Protocol
SYBASEDBUTF8=DataDirect 5.3 64bit Sybase UTF8 Wire Protocol
SQLSERVERDB=DataDirect 5.3 64bit SQL Server Wire Protocol
INFORMIXDB=IBM Informix ODBC Driver
;##########################################################
;########## Individual data source stanzas ################
;##########################################################
;# DB2 stanza
[DB2DB]
DRIVER=libdb2Wrapper64.so
Description=DB2DB DB2 ODBC Database
Database=DB2DB
;# Oracle stanza
[ORACLEDB]
Driver=<Your Broker install directory>/ODBC64/V5.3/lib/UKora23.so
Description=DataDirect 5.3 64bit Oracle Wire Protocol
HostName=<Your Oracle Server Machine Name>
PortNumber=<Port on which Oracle is listening on HostName>
SID=<Your Oracle SID>
CatalogOptions=0
EnableStaticCursorsForLongData=0
ApplicationUsingThreads=1
EnableDescribeParam=1
OptimizePrepare=1
WorkArounds=536870912
ProcedureRetResults=1
ColumnSizeAsCharacter=1
;# Oracle Real Application Clusters stanza
[ORACLERACDB]
Driver=<Your Broker install directory>/ODBC64/V5.3/lib/UKora23.so
Description=DataDirect 5.3 64bit Oracle Wire Protocol
HostName=<Your Oracle Server Machine Name>
PortNumber=<Port on which Oracle is listening on HostName>
ServiceName=<Your Oracle Real Application Cluster Service Name>
CatalogOptions=0
EnableStaticCursorsForLongData=0
ApplicationUsingThreads=1
EnableDescribeParam=1
OptimizePrepare=1
WorkArounds=536870912
ProcedureRetResults=1
ColumnSizeAsCharacter=1
;# Sybase Stanza
[SYBASEDB]
Driver=<Your Broker install directory>/ODBC64/V5.3/lib/UKase23.so
Description=DataDirect 5.3 64bit Sybase Wire Protocol
Database=<Your Database Name>
ApplicationUsingThreads=1
EnableDescribeParam=1
OptimizePrepare=1
SelectMethod=0
NetworkAddress=<Your Sybase Server Name>,<Your Sybase Port Number>
SelectUserName=1
ColumnSizeAsCharacter=1
EnableSPColumnTypes=2
;# Sybase Stanza for a UTF8 datasource
[SYBASEDBUTF8]
Driver=<Your Broker install directory>/ODBC64/V5.3/lib/UKase23.so
Description=DataDirect 5.3 64bit Sybase Wire Protocol
Database=<Your Database Name>
ApplicationUsingThreads=1
EnableDescribeParam=1
OptimizePrepare=1
SelectMethod=0
NetworkAddress=<Your Sybase Server Name>,<Your Sybase Port Number>
SelectUserName=1
ColumnSizeAsCharacter=1
EnableSPColumnTypes=2
Charset=UTF8
;# UNIX to SQLServer stanza
[SQLSERVERDB]
Driver=<Your Broker install directory>/ODBC64/V5.3/lib/UKmsss23.so
Description=DataDirect 5.3 64bit SQL Server Wire Protocol
Address=<Your SQLServer Server Name>,<Your SQLServer Port Number>
AnsiNPW=Yes
Database=db
QuotedId=No
ColumnSizeAsCharacter=1
;# Informix Stanza
[INFORMIXDB]
Driver=libinfWrapper64.so
Description=IBM Informix ODBC Driver
ServerName=<Your Informix Server Name>
Database=<Your Database Name>
;##########################################
;###### Mandatory information stanza ######
;##########################################
[ODBC]
;# To turn on ODBC trace set Trace=1
Trace=0
TraceFile=<A Directory with plenty of free space to hold trace output>/odbctrace64.out
TraceDll=<Your Broker install directory>/ODBC64/V5.3/lib/odbctrac.so
InstallDir=<Your Broker install directory>/ODBC64/V5.3
UseCursorLib=0
IANAAppCodePage=4
UNICODE=UTF-8
|
|
|
Back to top |
|
 |
Maximreality |
Posted: Fri Jul 31, 2009 1:38 am Post subject: |
|
|
 Acolyte
Joined: 04 Jun 2004 Posts: 65 Location: Copenhagen
|
If you ODBC connection returns junk there might be something wrong with your driver....
We are using MQSeries Datadirect ODBC driver for Oracle and it works perfectly and has good performance.
/Rasmus |
|
Back to top |
|
 |
harish.sun |
Posted: Fri Jul 31, 2009 1:45 am Post subject: |
|
|
Newbie
Joined: 29 Jul 2009 Posts: 9
|
Maximreality wrote: |
If you ODBC connection returns junk there might be something wrong with your driver....
We are using MQSeries Datadirect ODBC driver for Oracle and it works perfectly and has good performance.
/Rasmus |
Even I thought, just to cross check, i wrote a simple java application and executed using the ODBC data source connection, which i created for WMB data source and it was returning the data in a proper format.
mean while, I will try to download the datadirect and verify.
Thanks for your response |
|
Back to top |
|
 |
fschofer |
Posted: Fri Jul 31, 2009 1:56 am Post subject: |
|
|
 Knight
Joined: 02 Jul 2001 Posts: 524 Location: Mainz, Germany
|
Hi,
you do not need to download something.
The Data Direct driver gets installed during WMB installation
You will find it here
<Your Broker install directory>/ODBC64/V5.3/lib/UKora23.so
Take a look at the ODBC configuration posted above.
Greetings
Frank |
|
Back to top |
|
 |
harish.sun |
Posted: Tue Aug 04, 2009 1:50 am Post subject: |
|
|
Newbie
Joined: 29 Jul 2009 Posts: 9
|
fschofer wrote: |
Hi,
you do not need to download something.
The Data Direct driver gets installed during WMB installation
You will find it here
<Your Broker install directory>/ODBC64/V5.3/lib/UKora23.so
Take a look at the ODBC configuration posted above.
Greetings
Frank |
I am not able to find the driver. I use WMB & MQ 6.1 |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Aug 04, 2009 2:01 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The sample ODBC ini file, either the 32bit sample or the 64bit sample, will tell you what the path to the drivers is on your system.
The sample ODBC ini file is on your system. |
|
Back to top |
|
 |
fschofer |
Posted: Tue Aug 04, 2009 2:38 am Post subject: |
|
|
 Knight
Joined: 02 Jul 2001 Posts: 524 Location: Mainz, Germany
|
Hi,
have you tried to use the find command for searching
The command below should show you the installed oracle ODBC drivers.
find / -name "*UKora*" 2> /dev/null
Greetings
Frank |
|
Back to top |
|
 |
|