Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2002
    Posts
    2

    Unanswered: help needed oracle and asp

    I have oracle 8i personal installed in windows xp
    I installed the IIS and update it form Microsoft
    When I want to connect ASP to oracle I got a error message
    Different ones
    Please see this config and till me if it is right or what
    I use a user name in oracle as : system and password : manager name
    of my computer xp-1-2-3 the data name is John

    I have a table called mountain and I want to get info form it

    Here what I did in the ASP "just the script"
    <%

    Dim adOpenForwardOnly, adLockReadOnly, adCmdTable, adCmdText

    adOpenForwardOnly=0

    adLockReadOnly=1

    adCmdTable=2

    adCmdText=0



    Dim objConn, objRS, qstring

    Set objConn = Server.CreateObject("ADODB.Connection")

    Set objRS = Server.CreateObject("ADODB.Recordset")



    objConn.Open "Provider=MSDAORA.1;User
    ID=system;Password=manager;"



    qstring="Select * from mountain order by name"

    objRS.open qstring, objConn, adOpenForwardOnly, adLockReadOnly,
    AdCmdText



    While not objrs.EOF

    response.write "<TR>" & chr(13)

    response.write " <TD align=middle>" & objRS("name") & "</TD>" &
    chr(13)

    response.write " <TD align=middle>" & objRS("height_ft") &
    "</TD>" & chr(13)

    response.write " <TD align=middle>" & objRS("location") &
    "</TD>" & chr(13)

    response.write "</TR>" & chr(13)

    objrs.movenext

    Wend



    ObjRs.close

    objConn.close

    Set objrs = Nothing

    Set objConn = Nothing

    %>

    Here is the tnsnames.ora

    # TNSNAMES.ORA Network Configuration File:
    C:\oracle\ora81\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.

    JOHN =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = xp-1-2-3)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVICE_NAME = JOHN)
    )
    )

    INST1_HTTP =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = xp-1-2-3)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVER = SHARED)
    (SERVICE_NAME = JOHN)
    (PRESENTATION = http://admin)
    )
    )

    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    )
    )

    error messages

    Microsoft OLE DB Provider for Oracle (0x80004005) ORA-12541: TNS:no listener
    Microsoft OLE DB Provider for Oracle (0x80004005) ORA-12547: TNS:lost contact

    ----when i change the user name to sys and pasword to sys in the ASP
    script=== after changing it in oracle
    and eliminating the Data Source part
    from objConn.Open "Provider=MSDAORA.1;UserID=sys;Password=sys;Da ta Source=John"

    to
    objConn.Open "Provider=MSDAORA.1;UserID=sys;Password=sys"

    i got this new message
    Microsoft OLE DB Provider for Oracle (0x80040E4D)
    ORA-01017: invalid username/password; logon denied

  2. #2
    Join Date
    Apr 2001
    Location
    Netherlands
    Posts
    191
    If it says 'invalid username/passwd' that means it was able to contact the database, so the setup is correct.
    Just enter the correct username / password and it will work.
    Ruud Schilders
    -----------------
    Oracle DBA
    e-mail : ruud@schilders.it
    URL : www.schilders.it
    Twitter : www.twitter.com/ruudschilders

  3. #3
    Join Date
    Apr 2002
    Posts
    6
    I have some doubts about the IIS set up in my computer. I need to know hot set it up. I have asked couple of questions to you please check your private messages. Thank you.

  4. #4
    Join Date
    May 2002
    Posts
    29
    Hi Debjit,

    The Connection parameter should be something

    objconn.open "Provider=MSDAORA.1;Password=manager;User ID=System;Data Source=JOHN;Persist Security Info=True"

    Assuming that John is ur local DB.

    And nother thing is the sys user's password by default is change_on_install and not sys unless u have changed it. Try this it might work.

    Regards
    Dinesh

Posting Permissions

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