首先我要说的是,我并不是一个真正的初学者,但绝不是专家。我在Oracle Enterprise Linux ver 7机器上安装了Oracle 12c企业版。 从终端窗口启动Linux一直很好:
[oracle@oradev ~]$ sqlplus /nolog
SQL> conn SYS as SYSDBA
Enter password: xxxxx`
SQL> startup
[oracle@oradev ~]$lsnrctl start
一切都很好。我在VMware®Workstation12 Pro,12.5.0 build-4352439上运行此功能。我最近更新了VMware ...现在,当我到达时 启动我得到:
SQL> startup
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=oradev.attlocal.net)(PORT=1522))'
SQL>
请指教?
答案 0 :(得分:2)
确保您的主机名在local_listener
参数的值中是正确的。
我的主机名如下:
[oracle @ ora12c admin] $ hostname ora12c.dba.com
转到$ORACLE_HOME/network/admin/
目录。
然后在tnsnames.ora
文件中创建TNS条目,如下所示指向监听器(在我的情况下为LISTNER_ORACDB
)。
[oracle@ora12c admin]$ vi tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/12.1.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORACDB =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora12c.dba.com)(PORT = 1522))
ORACDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora12c.dba.com)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oracdb)
)
)
接下来,
[oracle@ora12c admin]$ sqlplus / as sysdba
SQL> alter system set local_listener='LISTENER_ORACDB';