Professional Web Applications Themes

Oracle Connection using Perl DBI - PERL Beginners

Hoping for a little insight: I'm using: - Oracle 10g Release 10.2.0.4.0 on Windows 2003 Server - Perl 5.8.9 on a Windows 7 workstation From my workstation I can open a sqlplus session, but using the exact same credentials and the perl script below, I get a failure due to a 'bad' userid/password. print "start of pr\n"; use DBI; use DBD::Oracle qw(:ora_session_modes); my $DBUSER = "extract"; my $DBPASS = "password"; my $database = 'extract'; my $DSN = "dbi:Oracle:$database"; my $dbh = DBI->connect( $DSN, $DBUSER, $DBPASS, { PrintError=>1,###Report errors via warn() to the screen RaiseError=>1,##Do report errors via die() AutoCommit =>0## ...

  1. #1

    Default Oracle Connection using Perl DBI

    Hoping for a little insight:

    I'm using:
    - Oracle 10g Release 10.2.0.4.0 on Windows 2003 Server
    - Perl 5.8.9 on a Windows 7 workstation

    From my workstation I can open a sqlplus session, but using the exact same credentials and the perl script below, I get a failure due to a 'bad' userid/password.

    print "start of pr\n";
    use DBI;
    use DBD::Oracle qw(:ora_session_modes);
    my $DBUSER = "extract";
    my $DBPASS = "password";

    my $database = 'extract';
    my $DSN = "dbi:Oracle:$database";
    my $dbh = DBI->connect( $DSN,
    $DBUSER,
    $DBPASS, {
    PrintError=>1,###Report errors via warn() to the screen
    RaiseError=>1,##Do report errors via die()
    AutoCommit =>0## disable autocommit
    })
    || die( $DBI::errstr . "\n" );


    The script works correctly if I use different (call them 'global' since I don't know the proper Oracle term) credentials but I want to limit the connection to JUST this user and his 3 tables.

    Mark
    Last edited by azwxman; March 30th at 09:57 PM. Reason: clarification
    azwxman is offline Junior Member
    Join Date
    Mar 2012
    Location
    Tucson AZ
    Posts
    1

Similar Threads

  1. Perl - Oracle Connection on WIN32
    By Jai Kejriwal in forum PERL Modules
    Replies: 2
    Last Post: December 2nd, 03:01 AM
  2. Perl Module DBD::ORACLE
    By polarbear in forum PERL Modules
    Replies: 2
    Last Post: November 7th, 11:13 PM
  3. Perl, Oracle, DBD
    By danglesocket in forum PERL Miscellaneous
    Replies: 0
    Last Post: September 8th, 09:47 PM
  4. perl dbi oracle and blobs
    By Benjamin Goldberg in forum PERL Miscellaneous
    Replies: 3
    Last Post: August 28th, 12:38 AM
  5. Oracle ADO connection
    By Beaux in forum Oracle Server
    Replies: 1
    Last Post: December 6th, 07:45 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139