Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Sybase to MSSQl migration for Perl in Linux RHEL

by Anonymous Monk
on Jan 18, 2021 at 16:07 UTC ( #11127062=note: print w/replies, xml ) Need Help??


in reply to Sybase to MSSQl migration for Perl in Linux RHEL

You need to tell us a lot more about how these 400 scripts were built right now. Did they use ODBC to connect? If so, you might be able to do a lot by changing the ODBC data-source definition itself, which is (by design) centrally managed. Changing the SQL and/or programming within the scripts is more problematic since the two database engines are not quite the same. What we and you need right now are details. For instance, can you post the source-code of one small but complete script for our inspection? Before you and your colleagues start to "actually change anything anywhere," you need to plan this project and its deployment quite thoroughly.
  • Comment on Re: Sybase to MSSQl migration for Perl in Linux RHEL

Replies are listed 'Best First'.
Re^2: Sybase to MSSQl migration for Perl in Linux RHEL
by talexb (Canon) on Jan 18, 2021 at 20:26 UTC

    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.

    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://11127062]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2021-10-23 21:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (88 votes). Check out past polls.

    Notices?