Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^2: Sybase to MSSQl migration for Perl in Linux RHEL

by talexb (Canon)
on Jan 18, 2021 at 20:26 UTC ( #11127071=note: print w/replies, xml ) Need Help??

in reply to Re: Sybase to MSSQl migration for Perl in Linux RHEL
in thread Sybase to MSSQl migration for Perl in Linux RHEL

Right -- and I didn't tell you everything about how I set this client up. I used a module for credentials and the DSN information like this:

package ABCDB; our $DSN = 'Driver=FreeTDS;ServerName=SqlServer;Database=ABCDAT'; our $User = 'User'; our $Password = 'Password'; our $Attributes = { LongReadLen => 65535, LongTruncOk => 1, odbc_query_timeout => 30 } +;
Then, in each of the scripts I wrote, a connection just uses the boilerplate
my $dbh = DBI->connect ( "dbi:ODBC:$ABCDB::DSN", $ABCDB::User, $ABCDB::Password, $ABCDB::Attributes );
And a final note .. this module is in a separate directory specifically so that it's *not* included in the repository. Never include any authentication in a repository, even if it's a private one.

Alex / talexb / Toronto

Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11127071]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (1)
As of 2021-09-27 23:40 GMT
Find Nodes?
    Voting Booth?

    No recent polls found