昨天我重新启动了我的机器,现在我的数据库不可用了。 我第一次运行它时遇到了一些困难,因为有两个不同的Oracle DB安装。
我认为应该运行的Windows服务:
您可以看到:我无法启动OracleOraDB12Home3TNSListener服务。
我更改了文件tnsnames.ora:
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
FOOBAR=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = myurl.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = FOOBAR)
)
)
我的listener.ora是
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\OracleDB\product\12.1.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\OracleDB\product\12.1.0\dbhome_1\bin\oraclr12.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = myurl.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
我已经尝试了很多这样的事情:
sqlplus / as sysdba
和startup
但我得到了ORA-00119:系统参数LOCAL_LISTENER的规范无效 ORA-00132:语法错误或未解析的网络名称'LISTENER_FOOBAR'
alter system set local_listener='FOOBAR'; scope=spflile;
但我得到了* 第1行的错误: ORA-01034:ORACLE不可用 进程ID:0 会话ID:0序列号:0
当我检查Oracle Database12 for OracleDB12Home3:
时有人对如何帮助我有任何想法吗?
答案 0 :(得分:2)
经过长时间的调查,感谢同事的帮助,它正在努力。
总结我们如何解决它:
所以要解决我的第一个问题' OracleOraDB12Home3TNSListener无法启动'是因为我有一个新的IP。所以我在配置中更改了它(... \ NETWORK \ ADMIN ):https://community.oracle.com/thread/855326
当我尝试连接 sql developer 时(重新启动计算机后)。我有错误: ORA-01034:ORACLE不可用ORA-27101:共享内存域不存在。这意味着我的数据库没有启动(http://www.dba-oracle.com/sf_ora_01034_oracle_not_available.htm)。
所以我尝试手动启动数据库sqlplus / as sysdba
和startup
,但我总是输出:
SQL>启动 ORA-00119:系统参数LOCAL_LISTENER的规范无效 ORA-00132:语法错误或未解析的网络名称' LISTENER_FOOBAR'
要解决此问题,我尝试使用 LISTENER.ORA 和 TNSNAMES.ORA 文件:
LISTENER.ORA
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\OracleDB\product\12.1.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\OracleDB\product\12.1.0\dbhome_1\bin\oraclr12.dll")
)
(SID_DESC =
(GLOBAL_DBNAME=FOOBAR)
(ORACLE_HOME = C:\OracleDB\product\12.1.0\dbhome_1)
(SID_NAME = FOOBAR)
)
)
LISTENER_FOOBAR =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
TNSNAMES.ORA
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
FOOBAR =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = FOOBAR)
)
)
我尝试多次重启正确的Windows服务:OracleServiceFOOBAR但没有任何改变。我总是遇到同样的问题。我记得我做过pfile配置。
所以我决定改变pfile配置,例如alter system set LOCAL_LISTENER ='(ADDRESS =(PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))'范围=两者;.是的,但我不能应用任何命令行,因为数据库不会启动...
所以我创建了一个名为init.ora的pfile,其中包含* .local_listener ='(ADDRESS =(PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))'来自ORA-00119: invalid specification ORA-00132: syntax error的技巧。我在参数SQL> startup pfile=c:\oracledb\admin\XXX\pfile\init.ora
然后它正在运作。