Oracle sql*plus and form build

For a homework, I have to work on SQL*Plus and Form builder. I installed on a vm oracle 11g and dev suites 10g. Everything is a fresh install, but I can't find a way to connect on SQL*Plus not Form builder.

Both are asking for a host string which I'm not sure I have right. My tnsnames.ora looks like this :

LISTENER_ORCL =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
        (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        )
        (CONNECT_DATA =
            (SID = CKRExtProc)
            (PRESENTATION = RO)
        )
    )

ORCL =
    (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        (CONNECTION_DATA =
            (SERVER = DEDICATED)
            (SERVICE_NAME = orcl.localdomain)
        )
    )

I also unlocked the user scott/tiger. I tried to connect with SYSTEM/ <password> where <password> I gave on installation and scott/tiger with host string: ORCL, orcl.localdomain or nothing, but it keeps giving me error

ORA-12560 protocol adapter error (no hostring)

or

ORA-12154 could not resolve the connect identifier specified (with not empty hostring).


Forms Builder uses tnsnames.ora found in it's directory, not the one present in the database server's directory.

Ensure the tnsnames.ora contents in Forms builder's folder (present in networkadmin folder of your Forms builder installation path) is the same as the tnsnames.ora present in the networkadmin folder of your database installation path.

You can also force a path to TNS_ADMIN variable and places tnsnames.ora to that path mentioned in TNS_ADMIN so that the tnsnames.ora present in this path is picked


Which SQL*Plus client are you using?

afaik - Oracle stopped distributing the SQL*Plus client and now distribute something called SQL*Plus Instant Client. If you are using the latter then the correct format of the connect string is as follows:

sqlplus hr/your_password@//mymachine.mydomain:port/MYDB

For anything else - also check your registry for your TNS_ADMIN entry. This should be populated with the path to you tnsnames.ora

链接地址: http://www.djcxy.com/p/36930.html

上一篇: 00600,连接表仅限于5个表

下一篇: Oracle sql * plus和表单构建