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:
Then, in each of the scripts I wrote, a connection just uses the boilerplatepackage 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 } +;
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.my $dbh = DBI->connect ( "dbi:ODBC:$ABCDB::DSN", $ABCDB::User, $ABCDB::Password, $ABCDB::Attributes );
|
---|
Replies are listed 'Best First'. | |
---|---|
A reply falls below the community's threshold of quality. You may see it by logging in. |