Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by talexb (Chancellor)
on Jan 18, 2021 at 20:26 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2024-04-20 10:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found