in reply to DBD module.

You tested it using db1 for ORACLE_SID. When you start the program, it will look at the ORACLE_SID environment variable. You can even set it in a BEGIN block, if you want.

In short - yes.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^2: DBD module.
by renu (Initiate) on Apr 21, 2006 at 03:16 UTC
    It is working fine for first application whose ORACLE_SID=db1. And not working for other application(ORACLE_SID=db2)
      You know - saying something like that in your original post would have been helpful and saved you a day of waiting for the right answer.

      Have you checked to see what $ENV{ORACLE_SID} is set to? That's what DBD::Oracle is looking for. If you absolutely need to, you can do something like:

      BEGIN { $ENV{ORACLE_SID} = 'db2'; } use DBI; my $dbh = DBI->connect( .. );

      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?