我的oracle数据库存在问题,我已经搜索/尝试加载以修复以下错误,但我无法将PLSExtProc的状态更改为READY:
stream.foreachRDD { rdd =>
rdd.foreachPartition { iter =>
// make sure connection pool is set up on the executor before writing
SetupJdbc(jdbcDriver, jdbcUrl, jdbcUser, jdbcPassword)
iter.foreach { case (key, msg) =>
DB.autoCommit { implicit session =>
// the unique key for idempotency is just the text of the message itself, for example purposes
sql"insert into idem_data(msg) values (${msg})".update.apply
}
}
}
}
以下是一些可以提供帮助的信息:
Oracle对我来说是新手
lsnrctl status
lsnrctl start
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
一些变数:
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER_NAME
Version TNSLSNR for Linux: Version 10.2.0.3.0 - Production
Start Date 18-JUN-2016 14:36:33
Uptime 0 days 0 hr. 11 min. 50 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/10g/db_1/network/admin/listener.ora
Listener Log File /oracle/10g/db_1/network/log/log_file_name.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=host2.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orcl_XPT" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
LOCAL_LISTENER
$ORACLE_SID=orcl
$ORACLE_HOME=/oracle/10g/db_1/
cat listener.ora
SQL> show parameter local_listener;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string ORCL
cat tnsnames.ora
LISTENER_NAME =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = host2.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
SID_LIST_LISTENER_NAME =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/10g/db_1/)
(PROGRAM = extproc)
)
)
cat / etc / hosts
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = host1.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
非常感谢您的帮助
答案 0 :(得分:2)
这是完全正常和预期的。 listener.ora的SID_LIST部分中的每个条目都将显示为UNKNOWN状态。这只是意味着听众正在接受你的话,因为你列出了它。与那些显示READY状态的对比。这些来自数据库实例本身向监听器注册。把听众想象成酒店的前台服务员。 listener.ora的SID_LIST部分是夜班经理,将职员列入酒店客人名单。职员无法知道清单的准确性,所以状态是未知的。但是,如果一位客人走过来说“我的名字是鲍勃。如果有人要求我,我将在201室”,那就是数据库向听众注册。