Oracle connection problem

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Oracle connection problem

    I'm having some grief connecting to an Oracle database that I
    previously was able to connect to.

    The difference is that my web app now lives on a freshly setup server
    with a new install of the Oracle client files/drivers.

    My web server has both:
    Oracle 9 client files (SQL Plus and other annoyances)
    WinXP Pro (its a test server)

    The web server also has valid TNSNAMES.ORA file in the default
    location

    I have created a .UDL file on the server that can successfully connect
    to the remote Oracle database so it is finding my TNSNAMES.ORA and the
    relevant entry with no problem.

    The problem is that my ASP 3 application can't connect to the Oracle
    DB. I'm assuming its because it (or IIS) can't find the .ORA file.

    I don't think i had any worries when i configured the ASP application
    on the old server.

    The code I'm using to connect is unchanged and is as follows:

    'This is in my global.asa
    Application("DSNOracle") = "Provider=MSDAORA.1;Data
    Source=MyDataSource;User ID=myid;Password=mypasswd"


    ' this is the page that connects to oracle
    Dim objConn, rsOracle
    Dim sqlStatement

    sqlStatement = "SELECT Fname, Lname FROM DumbTable Where Lname =
    'smith'"

    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.Open (Application("DSNOracle"))
    Set rsOracle= objConn.Execute(sqlStatement)

    John Guest

  2. Similar Questions and Discussions

    1. Oracle JDBC oci drive connection problem
      To get the OCI driver to work on an Linux OS you have add the Oracle library to enviroment variable LD_LIBRARY_PATH. The easiest way to do this...
    2. Oracle 8i problem connection with pear
      Hello, mailing-list people, I need help about connect the RDBMS Oracle8i through PEAR library, look this code <html><head><title>Test DB Class -...
    3. Oracle Odbc Connection Problem
      I'm trying to connect to a oracle database using the " Microsoft ODBC for Oracle " driver with the followin script: <?php $user= "user";...
    4. #23668 [Opn->Fbk]: oracle<defunct> problem apache2+php+oracle
      ID: 23668 Updated by: sniper@php.net Reported By: thecluster at argentina dot com -Status: Open +Status: ...
    5. Oracle ADO connection
      Sorry about being so slow about all this. I found my installer that is only called 'Oracle Installer' and it will only choose files that have the...
  3. #2

    Default Oracle connection problem

    Hi John
    I recently ran into a similar problem, the work around
    ended up being: to remove the Oracle 9 client and install
    the Oracle 8 client. We needed a quick fix and this
    resolved it ... Good Luck!
    >-----Original Message-----
    >I'm having some grief connecting to an Oracle database
    that I
    >previously was able to connect to.
    >
    >The difference is that my web app now lives on a freshly
    setup server
    >with a new install of the Oracle client files/drivers.
    >
    >My web server has both:
    >Oracle 9 client files (SQL Plus and other annoyances)
    >WinXP Pro (its a test server)
    >
    >The web server also has valid TNSNAMES.ORA file in the
    default
    >location
    >
    >I have created a .UDL file on the server that can
    successfully connect
    >to the remote Oracle database so it is finding my
    TNSNAMES.ORA and the
    >relevant entry with no problem.
    >
    >The problem is that my ASP 3 application can't connect to
    the Oracle
    >DB. I'm assuming its because it (or IIS) can't find
    the .ORA file.
    >
    >I don't think i had any worries when i configured the ASP
    application
    >on the old server.
    >
    >The code I'm using to connect is unchanged and is as
    follows:
    >
    >'This is in my global.asa
    >Application("DSNOracle") = "Provider=MSDAORA.1;Data
    >Source=MyDataSource;User ID=myid;Password=mypasswd"
    >
    >
    >' this is the page that connects to oracle
    >Dim objConn, rsOracle
    >Dim sqlStatement
    >
    >sqlStatement = "SELECT Fname, Lname FROM DumbTable Where
    Lname =
    >'smith'"
    >
    >Set objConn = Server.CreateObject("ADODB.Connection")
    >objConn.Open (Application("DSNOracle"))
    >Set rsOracle= objConn.Execute(sqlStatement)
    >
    >.
    >
    Tracey Guest

  4. #3

    Default Re: Oracle connection problem

    On Wed, 17 Sep 2003 20:33:14 +0930, John <jnode55@icqmail.com> wrote:
    >I'm having some grief connecting to an Oracle database that I
    >previously was able to connect to.
    >
    >The difference is that my web app now lives on a freshly setup server
    >with a new install of the Oracle client files/drivers.
    >
    >My web server has both:
    >Oracle 9 client files (SQL Plus and other annoyances)
    >WinXP Pro (its a test server)
    >
    >The web server also has valid TNSNAMES.ORA file in the default
    >location
    >
    >I have created a .UDL file on the server that can successfully connect
    >to the remote Oracle database so it is finding my TNSNAMES.ORA and the
    >relevant entry with no problem.
    >
    >The problem is that my ASP 3 application can't connect to the Oracle
    >DB. I'm assuming its because it (or IIS) can't find the .ORA file.
    >
    >I don't think i had any worries when i configured the ASP application
    >on the old server.
    >
    >The code I'm using to connect is unchanged and is as follows:
    >
    >'This is in my global.asa
    >Application("DSNOracle") = "Provider=MSDAORA.1;Data
    >Source=MyDataSource;User ID=myid;Password=mypasswd"
    >
    >
    >' this is the page that connects to oracle
    >Dim objConn, rsOracle
    >Dim sqlStatement
    >
    >sqlStatement = "SELECT Fname, Lname FROM DumbTable Where Lname =
    >'smith'"
    >
    >Set objConn = Server.CreateObject("ADODB.Connection")
    >objConn.Open (Application("DSNOracle"))
    >Set rsOracle= objConn.Execute(sqlStatement)
    What version of Oracle is the database you are trying to reach?
    The V9 client cannot connect to any Oracle database older than v8.


    Turkbear Guest

  5. #4

    Default Oracle connection problem

    John, Do you have MDAC_TYP.EXE, (The Microsoft Data Access
    Components 2.8) on the new server? I ran into this
    recently where I could connect on one box and not
    another. It ended up being the lack of the exe above on
    the new box that was preventing the connection from taking
    place.

    Best of Luck!
    Abbey
    >-----Original Message-----
    >I'm having some grief connecting to an Oracle database
    that I
    >previously was able to connect to.
    >
    >The difference is that my web app now lives on a freshly
    setup server
    >with a new install of the Oracle client files/drivers.
    >
    >My web server has both:
    >Oracle 9 client files (SQL Plus and other annoyances)
    >WinXP Pro (its a test server)
    >
    >The web server also has valid TNSNAMES.ORA file in the
    default
    >location
    >
    >I have created a .UDL file on the server that can
    successfully connect
    >to the remote Oracle database so it is finding my
    TNSNAMES.ORA and the
    >relevant entry with no problem.
    >
    >The problem is that my ASP 3 application can't connect to
    the Oracle
    >DB. I'm assuming its because it (or IIS) can't find
    the .ORA file.
    >
    >I don't think i had any worries when i configured the ASP
    application
    >on the old server.
    >
    >The code I'm using to connect is unchanged and is as
    follows:
    >
    >'This is in my global.asa
    >Application("DSNOracle") = "Provider=MSDAORA.1;Data
    >Source=MyDataSource;User ID=myid;Password=mypasswd"
    >
    >
    >' this is the page that connects to oracle
    >Dim objConn, rsOracle
    >Dim sqlStatement
    >
    >sqlStatement = "SELECT Fname, Lname FROM DumbTable Where
    Lname =
    >'smith'"
    >
    >Set objConn = Server.CreateObject("ADODB.Connection")
    >objConn.Open (Application("DSNOracle"))
    >Set rsOracle= objConn.Execute(sqlStatement)
    >
    >.
    >
    Abbey Guest

  6. #5

    Default Re: Oracle connection problem

    Well thanks for the replies folks.

    The problem has been solved.

    For some reason the instance name in my TNSNAMES.ORA file was the
    problem.

    It used to be "MyDataSource.World" but for some reason, I can only
    access it now by removing the ".world" part of the instance name so
    that it is just "MyDataSource".

    I have no idea why the same verson of the Oracle client should need
    that modification in the .ora file. I'm writing it off as "just one
    of those things" :-).


    John Guest

Posting Permissions

  • You may not post new threads
  • You may 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