FAQ
Hi All,

I am moving one of my programs to be run on a different box. The rules are a
bit different on the other box. One of those things is that the username and
password can not be hardcoded into the program. I don't have all the
information yet, but does anyone know if the way to do this is through
environment variables? if it is another please clue me in. Just trying to get
a little background.

I looked in 'Programming the Perl DBI' didn't find anything that covered this.
I could just be blind though.

Thanks,

-Ian

Search Discussions

  • Timothy Helck at Apr 19, 2002 at 6:02 pm
    Ian,

    Which environment and which kind of database? If you have unix with Oracle
    there's a really nice feature called "ops id" which allows the user to logon
    to the database provided his Oracle login name is the same as his unix login
    name. I'm not sure if it works going from one server to another.

    If you are using Oracle, let me know, and I'll go find my notes from the
    last time I worked on it.

    Tim Helck

    -----Original Message-----
    From: Ian Harisay
    Sent: Friday, April 19, 2002 1:57 PM
    To: dbi-users@perl.org
    Subject: Question about logging in without username and password


    Hi All,

    I am moving one of my programs to be run on a different box. The rules are
    a
    bit different on the other box. One of those things is that the username
    and
    password can not be hardcoded into the program. I don't have all the
    information yet, but does anyone know if the way to do this is through
    environment variables? if it is another please clue me in. Just trying to
    get
    a little background.

    I looked in 'Programming the Perl DBI' didn't find anything that covered
    this.
    I could just be blind though.

    Thanks,

    -Ian
  • Ian Harisay at Apr 25, 2002 at 10:35 pm
    "ops id" was the way the DBA wanted to handle the logon. I have this worked out
    now. Thanks for insight everyone provided.

    -Ian

    timothy.helck@bowker.com wrote:

    Ian,

    Which environment and which kind of database? If you have unix with Oracle
    there's a really nice feature called "ops id" which allows the user to logon
    to the database provided his Oracle login name is the same as his unix login
    name. I'm not sure if it works going from one server to another.

    If you are using Oracle, let me know, and I'll go find my notes from the last
    time I worked on it.

    Tim Helck

    -----Original Message-----
    From: Ian Harisay
    Sent: Friday, April 19, 2002 1:57 PM
    To: dbi-users@perl.org
    Subject: Question about logging in without username and password

    Hi All,

    I am moving one of my programs to be run on a different box. The rules are a
    bit different on the other box. One of those things is that the username and
    password can not be hardcoded into the program. I don't have all the
    information yet, but does anyone know if the way to do this is through
    environment variables? if it is another please clue me in. Just trying to
    get
    a little background.

    I looked in 'Programming the Perl DBI' didn't find anything that covered
    this.
    I could just be blind though.

    Thanks,

    -Ian
  • Accardo, Glen at Apr 19, 2002 at 6:12 pm
    With Microsoft SQL Server, you could use Windows authentication instead
    of SQL Server authentication. All you have to do is create a Windows
    user in SQL Server, then eliminate the username and password when connecting
    via DBI, like so:

    my $dbh = DBI->connect("dbi:ODBC:DRIVER={SQL Server};".
    "SERVER=$instance;DATABASE=$db",
    {RaiseError => 1, PrintError => 1})
    or die "\n\nCannot connect.\n\n$DBI::errstr\n";


    glen accardo
    BMC Software, Inc.



    -----Original Message-----
    From: Ian Harisay
    Sent: Friday, April 19, 2002 12:57 PM
    To: dbi-users@perl.org
    Subject: Question about logging in without username and password


    Hi All,

    I am moving one of my programs to be run on a different box. The rules are
    a
    bit different on the other box. One of those things is that the username
    and
    password can not be hardcoded into the program. I don't have all the
    information yet, but does anyone know if the way to do this is through
    environment variables? if it is another please clue me in. Just trying to
    get
    a little background.

    I looked in 'Programming the Perl DBI' didn't find anything that covered
    this.
    I could just be blind though.

    Thanks,

    -Ian
  • Michael A Chase at Apr 19, 2002 at 6:13 pm

    On Fri, 19 Apr 2002 11:56:36 -0600 Ian Harisay wrote:

    I am moving one of my programs to be run on a different box. The rules
    are a
    bit different on the other box. One of those things is that the
    username and
    password can not be hardcoded into the program. I don't have all the
    information yet, but does anyone know if the way to do this is through
    environment variables? if it is another please clue me in. Just trying
    to get
    a little background.
    There's more that two ways to do it. You can put the information in
    environment varialbes, in command line parameters, use DBIx::Password (I
    think) and many other possiblities.
    --
    Mac :})
    ** I normally forward private questions to the appropriate mail list. **
    Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.htm
    Give a hobbit a fish and he eats fish for a day.
    Give a hobbit a ring and he eats fish for an age.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdbi-users @
categoriesperl
postedApr 19, '02 at 5:56p
activeApr 25, '02 at 10:35p
posts5
users4
websitedbi.perl.org

People

Translate

site design / logo © 2022 Grokbase