cancel
Showing results for 
Search instead for 
Did you mean: 

datasource

SOLVED
Go to solution
Shivkumar
Super Advisor

datasource

Dear Sirs;

What is datasource name on unix ?

Thanks,
Shiv
4 REPLIES
Arunvijai_4
Honored Contributor

Re: datasource

Hi Shiv,

It is same as DSN on Windows. In unix for MySQL, you will configure it in odbc.ini file.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Yogeeraj_1
Honored Contributor
Solution

Re: datasource

hi,
see:
http://media.datadirect.com/download/docs/odbc/odbcref/unixenviron.html#wp588095

also note that, A typical datasource will contain the following:
Name: OracleDSThin
Data Source Class: com.evermind.sql.DriverManagerDataSource
Username: scott
Password: tiger
JDBC URL: jdbc:oracle:thin:@hostname:port:sid
where: hostname = the hostname where the database is installed
(i.e. ias.acme.com).
port = the database port number.
sid = the database System Identifier (SID).
JDBC Driver: oracle.jdbc.driver.OracleDriver


regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Joseph Loo
Honored Contributor

Re: datasource

hi,

A data source name (DSN) is a data structure that contains the information about a specific database that an Open Database Connectivity (ODBC) driver needs in order to connect to it. Included in the DSN, which resides either in the registry or as a separate text file, is information such as the name, directory and driver of the database, and, depending on the type of DSN, the ID and password of the user. The developer creates a separate DSN for each database. To connect to a particular database, the developer specifies its DSN within a program. In contrast, DSN-less connections require that all the necessary information be specified within the program.

There are three kinds of DSN: user DSNs (sometimes called machine DSNs); system DSNs; and file DSNs. User and system DSNs are specific to a particular computer, and store DSN information in the registry. A user DSN allows database access for a single user on a single computer, and a system DSN for any user of a particular computer. A file DSN contains the relevant information within a text file with a .DSN file extension, and can be shared by users of different computers who have the same drivers installed.



regards.
what you do not see does not mean you should not believe
morganelan
Trusted Contributor

Re: datasource

In the UNIX environment, there is no ODBC Administrator or Driver Manager. To configure an ODBC data source name (DSN) definition, you must edit the required system information, which is held in a plain text file called .odbc.ini (note that the name of this file starts with a period).

Start of changeSet the ODBCINI environment variable to point to the file, specifying a full path and file name. If you do not set this variable, the path defaults to /var/mqsi/odbc, which is a directory created when WebSphere Business Integration Event Broker is installed. The file must have file permissions of mqm:mqbrkrs. End of change

A sample template is provided as the file /mqsi/merant/odbc.ini which contains examples of how to configure a DSN residing in each of the databases supported by WebSphere Business Integration Event Broker. The sample template files for the supported platforms are displayed below. They show the recommended configuration for the supported databases.

The entries in the stanzas that you must configure to match your local requirements are shown in italics (descriptions of these entries are provided in ODBC.ini Parameters). You must retain all the entries shown, but you can remove a complete stanza if you do not require it for your configuration (for example, if you are using an Oracle database, you can remove the stanzas shown for DB2 and Sybase).

Make a copy of the default file, set ODBCINI to point to this copy, and make any changes to the copied file rather than to the default.

Ensure that the appropriate library search path environment variable (LD_LIBRARY_PATH on Solaris and Linux) is set to reflect the database products to be used. Refer to your database product documentation for more details.
Sample HP-UX:

[ODBC Data Sources]
WBRKBKDB=IBM DB2 ODBC Driver
MYDB=IBM DB2 ODBC Driver
ORACLEDB=DataDirect 410 Oracle Driver
SYBASEDB=DataDirect 410 Sybase ASE Driver

[WBRKBKDB]
Driver=/u/db2inst1/sqllib/lib/libdb2.sl
Description=WBRKBKDB DB2 ODBC Database
Database=WBRKBKDB

[MYDB]
Driver=/u/db2inst1/sqllib/lib/libdb2.sl
Description=MYDB DB2 ODBC Database
Database=MYDB

[ORACLEDB]
Driver=/opt/mqsi/merant/lib/UKor818.sl
Description=Oracle
ServerName=YourServerName
EnableDescribeParam=1
OptimizePrepare=1
WorkArounds=536870912
WorkArounds2=2

[SYBASEDB]
Driver=/opt/mqsi/merant/lib/UKase18.sl
Description=Sybase12
Database=sybasedb
ServerName=YourServerName
WorkstationID=id
EnableDescribeParam=1
OptimizePrepare=1
SelectMethod=0
NetworkAddress=10.30.14.72,5000
SelectUserName=1

[ODBC]
Trace=0
TraceFile=/var/mqsi/odbc/odbctrace.out
TraceDll=/opt/mqsi/merant/lib/odbctrac.sl
InstallDir=/opt/mqsi/merant

Kamal Mirdad