Oracle 10gR2 is installed under Fedora. After the installation is completed, netca is used to create a monitor. When creating, it does not use the default LISTENER and 1521 ports, but uses LISTENER_DELL and 1522 ports. The terminal displays the completion, and then in $ORACLE_HOME/network Add a tns alias under /admin/tnsnames.ora.
DELL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1522))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = dell)
)
)
After adding it, it is as follows After logging in to
sqlplus /nolog
connect scott/tiger@dell
, an error is reported, ORA-12505. It is said that the monitoring error is still very easy to solve. As a result, the monitoring is also started normally, but it is unable to log in according to @DELL. Change SID = dell to SERVER_NAME = dell in tnsnames.ora and still report ORA-12505, TNS:listener does not currently know of SID given in connect descriptor.
Then I found that there is no sqlnet.ora file in the $ORACLE_HOME/network/admin/ directory, run netca, set the naming method, and after running the sqlnet.ora file, the content is as follows:
more sqlnet.oraNAMES.DIRECTORY_PATH= (TNSNAMES)
Try to log in again, Found still the same error. So I suddenly thought that Oracle must have been using LISTENER, a listener that has not been started, to provide monitoring information to Oracle, and I did not use the default listening name to cause this error, so I added SID information to the listening file listener.ora.
LISTENER_DELL =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = avon)(PORT = 1522))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
SID_LIST_LISTENER_DELL =
(SID_LIST =
(SID_DESC) =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
)
Add SID information (see bold blue font)
SID_LIST_LISTENER_DELL =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
( SID_DESC =
(GLOBAL_DBNAME = dell)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(SID_NAME = dell)
)
)
After adding it, save and exit: wq
for testing, or an error is reported, found in tnsnames.ora I set SERVER_NAME, so I changed it to SID = dell and tested again
sqlplus /nolog
SQL> conn scott/tiger@dell
Connected.
OK, everything is normal.
ORA-12505 error
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=326990231&siteId=291194637
Recommended
Ranking