Home » RDBMS Server » Networking and Gateways » ORA-12560
ORA-12560 [message #367862] Fri, 10 November 2000 12:13
Richard Earp
Messages: 1
Registered: November 2000
Junior Member
may I ask you for a bit of help? I'm trying to connect Visual Basic with Oracle on a PC (no network). I have 8.1.5 installed and VB 6.0 Profession Edition. Thanks in advance

I can start the listener with
>lsnrctl start

I can ping the database with
>tnsping EXTPROC_CONNECTION_DATA
and I get OK.

I stop the listener and start an Oracle session use a program segment in Visual BASIC, but all I ever get is ORA-12560, protocol adapter error. I think I have the parameters correct in the tnsnames.ora and listener.ora files .. I don't know about the names.ora or sqlnet.ora, but I can ping the database and start the
listner at least.

If I can ping the database and I can start the listener, where should I look as I cannot get (from Visual Basic) the
Set OraDatabase = OraSession.DbOpenDatabase("E ...
statement to work.

A snippet from your web page as well as my file contents are below:

How does one connect to an Oracle Database?
>
> Look at the following Visual Basic code example:
>
> Sub Form_Load ()
> Dim OraSession As Object 'Declare variables as OLE Objects Dim
> OraDatabase As Object Dim OraDynaset As Object
>
> Set OraSession = CreateObject("OracleInProcServer.XOraSession") Set
> OraDatabase = OraSession.DbOpenDatabase("EXTPROC_CONNECTION_DATA",
> "scott/tiger", 0&)
> MsgBox "Connected to " & OraDatabase.Connect & "@" &
> OraDatabase.DatabaseName
>
> 'Create the OraDynaset Object and display the first value
> Set OraDynaset = OraDatabase.DbCreateDynaset("select empno, ename
> from
> emp", 0&)
> MsgBox "Employee " & OraDynaset.Fields("empno").value & ", #" &
> OraDynaset.Fields("ename").value End Sub
>
>
> # C:\ORACLE\ORA81\NETWORK\ADMIN\TNSNAMES.ORA Configuration
> File:c:\Oracle\Ora81\NETWORK\ADMIN\tnsnames.ora
> # Generated by Oracle Net8 Assistant
>
> EXTPROC_CONNECTION_DATA =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
> )
> (CONNECT_DATA =
> (SID = ORCL)
> (PRESENTATION = RO)
> )
> )
>
> # C:\ORACLE\ORA81\NETWORK\ADMIN\LISTENER.ORA Configuration
> File:c:\Oracle\Ora81\network\admin\listener.ora
> # Generated by Oracle Net8 Assistant
>
> LISTENER =
> (DESCRIPTION_LIST =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
> )
> )
> )
>
>
> SID_LIST_LISTENER =
> (SID_LIST =
> (SID_DESC =
> (SID_NAME = ORCL)
> (ORACLE_HOME = c:\Oracle\Ora81)
> (PROGRAM = c:\oracle\ora81\bin\extproc)
> )
> )
>
> # C:\ORACLE\ORA81\NETWORK\ADMIN\NAMES.ORA Configuration
> File:c:\Oracle\Ora81\NETWORK\ADMIN\names.ora
> # Generated by Oracle Net8 Assistant
>
> NAMES.SERVER_NAME = MyDomain
>
> NAMES.ADDRESSES =
> (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
>
>
> NAMES.ADMIN_REGION =
> (REGION =
> (DESCRIPTION =
> (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
> (CONNECT_DATA =
> (SID = ORCL)
> (Server = Dedicated)
> )
> )
> (USERID = scott)
> (PASSWORD = tiger)
> (NAME = LOCAL_REGION)
> (REFRESH = 86400)
> (RETRY = 60)
> (EXPIRE = 600)
> (VERSION = 134230016)
> )
>
> # C:\ORACLE\ORA81\NETWORK\ADMIN\SQLNET.ORA Configuration
> File:c:\Oracle\Ora81\NETWORK\ADMIN\sqlnet.ora
> # Generated by Oracle Net8 Assistant
>
> NAMES.PREFERRED_SERVERS =
> (ADDRESS_LIST =
> # (ADDRESS = (PROTOCOL = IPC)(KEY = PLSExtProc))
> (ADDRESS = (PROTOCOL = IPC)(KEY = ORCL))
> )
>
> SQLNET.EXPIRE_TIME = 0
Previous Topic: Windows 98 Client Errors
Next Topic: SQL*NET timeout problem
Goto Forum:
  


Current Time: Sat Nov 23 23:38:15 CST 2024