how to configure an odbc connection on unix

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Ultramundane
Participant
Posts: 407
Joined: Mon Jun 27, 2005 8:54 am
Location: Walker, Michigan
Contact:

Post by Ultramundane »

The below commands should list the project locations where uvodbc.config needs to be edited.

Code: Select all

## CHANGE TO Directory Containing the VOC
cd $DSHOME

## GET PROJECT LIST
echo "$(dssh "SELECT PATH FMT '80L' \
        FROM UV.ACCOUNT \
       WHERE @ID NOT IN ('UV', 'uv', 'DS', 'ds') \
         AND @ID NOT LIKE 'HS.%';" \
| awk '{print $1}' \
| grep '/')"
[/quote]
kjaouhari
Participant
Posts: 325
Joined: Thu Mar 16, 2006 10:22 am

Post by kjaouhari »

I thought it was not necessary to configure uvodbc.config in the directory of each project ...

I let know when It runs succesfuly...

thanks again.
kjaouhari
Participant
Posts: 325
Joined: Thu Mar 16, 2006 10:22 am

Post by kjaouhari »

I put the odbc.ini in $DSHOME but I have still the same error message ...

>DS_CONNECT
Data Source information from /export/DATASTAGE/Projects/DEV/DEV_Primary_Dmt/uvodbc.config:

Data Source: localuv
DBMS Type: UNIVERSE
Network Type: TCP/IP
Host System: localhost 127.0.0.1
Service Name: uvserver

Data Source: MyDatabase
DBMS Type: ODBC

>DS_CONNECT MyDatabase
Enter username for connecting to 'PhoneNumber' DBMS [dsadm]: MyDatabase
Enter password for MyDatabase:
SQLConnect error: Status = -1 SQLState = IM002 Natcode = 0
[ODBC] [DataDirect][ODBC lib] Data source name not found and no default driver specified

... do i need to add something in the uvodbc.config file ?
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

this is what i did to add a sybase ODBC DSN in my system

added this entry to .odbc.ini ( IN $DSHOME directory)

Code: Select all

[car]
Driver=/app/ascential/Ascential/DataStage/branded_odbc/lib/VMase20.so
Description=DataDirect Sybase Wire Protocol
ApplicationName=
ApplicationUsingThreads=1
ArraySize=50
Charset=
CursorCacheSize=1
Database=car
DefaultLongDataBuffLen=1024
EnableDescribeParam=0
EnableQuotedIdentifiers=0
InitializationString=
Language=
LogonID=
NetworkAddress=sybsrv2.ky.bbxxx.com, 4100
OptimizePrepare=1
PacketSize=0
Password=
RaiseErrorPositionBehavior=0
SelectMethod=0
WorkStationID=
Added the following to uvodbc.config ( in project directory)

Code: Select all

<car>
DBMSTYPE = ODBC
I guess you would have done something similar, mentioning the same schema/db name in the entries in both files.

I did not really understand
I put the odbc.ini in $DSHOME but I have still the same error message ...
, .odbc.ini already exists in $DSHOME :? :?:
kjaouhari
Participant
Posts: 325
Joined: Thu Mar 16, 2006 10:22 am

Post by kjaouhari »

:D Thanks very much all for your help !!!

I've just resolved because I modified a odbc.ini file but this is the .odbc.ini file that I have to modify ... :wink:

in fact it's very easy to configure an odbc connection but we have just to modify the good file ...

Thanks again !
Post Reply