我用MyEclipse连接Oracle数据库的时候,遇到了ORA_12505错误!

2025-01-08 03:02:34
推荐回答(4个)
回答1:

全局数据库名为ORCL
ORACLE安装目录为/app/oracle/oracle/product/10.2.0/db_1
ssid为ORCL
其中ssid可以与全局数据库名不同,用于连接数据库用。
比如java的jdbc就会用ssid连接

回答2:

(SID_DESC =
(GLOBAL_DBNAME = ORCL) --全局数据库名
(ORACLE_HOME = /app/oracle/oracle/product/10.2.0/db_1)--数据文件所在的路径
(SID_NAME = ORCL)--数据库实例名
)

回答3:

[root@liaoxuefeng trace]# oerr ora 12505
12505, 00000, "TNS:listener does not currently know of SID given in connect descriptor"
// *Cause: The listener received a request to establish a connection to a
// database or other service. The connect descriptor received by the listener
// specified a SID for an instance (usually a database instance) that either
// has not yet dynamically registered with the listener or has not been
// statically configured for the listener. This may be a temporary condition
// such as after the listener has started, but before the database instance
// has registered with the listener.
// *Action:
// - Wait a moment and try to connect a second time.
// - Check which instances are currently known by the listener by executing:
// lsnrctl services
// - Check that the SID parameter in the connect descriptor specifies
// an instance known by the listener.
// - Check for an event in the listener.log file.
--------------------------------------------------------------------------------------------------------------------
可以用dbca命令重建listener.ora文件。

回答4:

dbca是重新创立库文件,
如果只想重新创建监听的话用netca就可以了