在安装11.2软件包之后Slackware分配尝试配置为
sudo /etc/rc.d/rc.oracle-xe configure
CloneRmanRestore.log很好,在cloneDBCreation.log中有一些错误
...
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=black)(PORT=1521))'
...
我的主机名-i和主机名-f给
127.0.0.1
和
black
结果。
tnsping black:1521 is OK.
这是listener.ora,tnsname.ora和$ {ORACLE_HOME} /config/scripts/init.ora
# SID_LIST_LOCAL_LISTENER =
# (SID_LIST =
# (SID_DESC =
# (SID_NAME = PLSExtProc)
# (ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe)
# (PROGRAM = extproc)
# )
# )
# use LOCAL_LISTENER instead default LISTENER
LOCAL_LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
# (ADDRESS = (PROTOCOL = TCP)(HOST = black)(PORT = 1521))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
的tnsname.ora
XE =
(DESCRIPTION =
# (ADDRESS = (PROTOCOL = TCP)(HOST = black)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
INIT.ORA
...
*.local_listener="(ADDRESS = (PROTOCOL=TCP) (HOST=127.0.0.1) (PORT=1521))"
local_listener="(ADDRESS = (PROTOCOL=TCP) (HOST=127.0.0.1) (PORT=1521))"
我在默认设置中尝试过静态侦听器,然后通过在listener.ora中注释并将默认LISTENER重新定义为LOCAL_LISTENER来尝试动态服务注册。应用
lsnrctl status LOCAL_LISTENER
配置失败后
...
------------------------
Alias LOCAL_LISTENER
Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
...
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "XE" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
The command completed successfully
请帮助解决问题。
答案 0 :(得分:0)
尝试以下有助于解决问题的步骤。
- 以sysdba身份登录
$sqlplu / as sysdba
- 从当前spfile创建pfile
SQL>create pfile='/home/oracle/mypfile.ora' from spfile;
- 保留备份副本仅供参考。
$cp /home/oracle/mypfile.ora /home/oracle/mypfile.ora.backup
现在,打开新创建的pfile /home/oracle/mypfile.ora并删除local_listenr ='listener_'并保存。
- 关闭数据库
SQL>Shutdown
- 使用新pfile启动数据库
SQL>startup nomount pfile='/home/oracle/mypfile.ora'
- 从pfile
创建服务器spfileSQL>create spfile from pfile;
- 关闭数据库,如果已经处于关闭状态,那就没关系。
SQL>Shutdown
- 启动数据库。
SQL>startup