I am a new one who started to use Oracle Database and faced the problem during installation the last verstion of Oracle XE 11g
x64 to the Microsoft Windows 7 x64 Enterprise.
During installation were not any errors and Windows Services (OracleXETNSListener
and OracleServiceXE
) were successfully created and started.
However, when I try to get the list of available databases I receive an error
ORA-01034: ORACLE not available
For some reason the XE database was not created into %ORACLE_BASE%\oradata\XE
.
The content of my listener.ora with localhost:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
I fixed tnsnames.ora by setting localhost IP address:
XE =
(DESCRIPTION =
(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 = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
sqlnet.ora contains both services:
SQLNET.AUTHENTICATION_SERVICES = (NONE;NTS)
The log file from '%ORACLE_HOME%\server\log\myhost\client' contains this error:
Oracle Database 11g Clusterware Release 11.2.0.2.0 – Production
Copyright 1996, 2010 Oracle. All rights reserved. 2016-01-20
19:51:43.920: [ default][5096]ut_read_reg:2:ocr registry key
SOFTWARE\Oracle\olr cannot be opened. error 2 [
CLSE][5096]clse_get_crs_home: Error retrieving OLR configuration [0]
[Error opening olr registry key. Не удается найти указанный файл. ]
How can I find what goes wrong and fix the problem?
Best Answer
After struggling with this problem for almost a week I found a solution, how to make XE database available from this source. It is in Russian, I provide the solution right here in English.
Install the last version of Oracle XE 11gR2 from the Oracle site to the default location
c:\oraclexe
with default password admin. If not default, then you should edit scripts below (paths and pwd) before use them.Run cmd command line under administrator privileges and use it until the end of reconfiguration. First of all, set environment variables for your DB:
Delete the XE database by command:
Delete
PWDXE.ORA file
:Copy
init.ora
from%ORACLE_HOME%\config\scripts
to%ORACLE_HOME%\database
, instead of existing, rename it toinitXE.ora
and add the configuration below:From the previous cmd line with admin previleges run the command to create Oracle services and file
%ORACLE_HOME%\database\PWDXE.ORA
:Run commands below to stop Windows Oracle XE services, delete them and additional XE files:
Create two files into one directory:
createXE.cmd
createXE.sql
Run createdXE.cmd from command line with admin privileges.
Done.