user1973756
user1973756

Reputation:

Server parameter in Perl DBI->connect()

I'm new to Perl, I have a database connect like this:

DBI->connect("dbi:Sybase:server=JDBC", 'guest', 'sybase');

I want to know how Perl knows that what is IP of JDBC server and connect to that?

Should it saved in other place?

Thank you

Upvotes: 1

Views: 527

Answers (1)

Steffen Ullrich
Steffen Ullrich

Reputation: 123260

Have a look at the documentation for DBD::Sybase. In http://search.cpan.org/~mewp/DBD-Sybase/Sybase.pm#The_interfaces_file you will find the following:

The DBD::Sybase module is built on top of the Sybase Open Client Client Library API. This library makes use of the Sybase interfaces file (sql.ini on Win32 machines) to make a link between a logical server name (e.g. SYBASE) and the physical machine / port number that the server is running on. The OpenClient library uses the environment variable SYBASE to find the location of the interfaces file, as well as other files that it needs (such as locale files).

So the mapping is done with the interfaces file.

Upvotes: 1

Related Questions