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?
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:
set ORACLE_SID=XE
set ORACLE_BASE=c:\oraclexe\app\oracle
set ORACLE_HOME=c:\oraclexe\app\oracle\product\11.2.0\server
Delete the XE database by command:
oradim -delete -sid XE
Delete PWDXE.ORA file:
del %ORACLE_HOME%\database\PWDXE.ORA
Copy init.ora from %ORACLE_HOME%\config\scripts to %ORACLE_HOME%\database, instead of existing, rename it to initXE.ora and add the configuration below:
open_cursors=300
db_name=XE
control_files=("C:\oraclexe\app\oracle\oradata\XE\control.dbf")
job_queue_processes=4
compatible=11.2.0.0.0
diagnostic_dest=C:\oraclexe\app\oracle\.
memory_target=1G
sessions=100
audit_file_dest=C:\oraclexe\app\oracle\admin\XE\adump
remote_login_passwordfile=EXCLUSIVE
dispatchers="(PROTOCOL=TCP) (SERVICE=XEXDB)"
shared_servers=4
undo_management=AUTO
undo_tablespace=UNDOTBS1
DB_RECOVERY_FILE_DEST_SIZE = 10G
DB_RECOVERY_FILE_DEST=C:\oraclexe\app\oracle\fast_recovery_area
#optional
nls_language="RUSSIAN"
nls_territory="RUSSIA"
From the previous cmd line with admin previleges run the command to create Oracle services and file %ORACLE_HOME%\database\PWDXE.ORA:
oradim -new -sid %ORACLE_SID% -intpwd admin -startmode auto -srvcstart system
Run commands below to stop Windows Oracle XE services, delete them and additional XE files:
sqlplus /nolog
connect sys/admin as sysdba;
shutdown immediate;
exit;
del %ORACLE_BASE%\oradata\XE\CONTROL.DBF
del %ORACLE_BASE%\fast_recovery_area\XE\ONLINELOG\*.LOG
Create two files into one directory:
createXE.cmd
set ORACLE_SID=XE
set NLS_LANG=AMERICAN_AMERICA.CL8MSWIN1251
set ORACLE_BASE=C:\oraclexe\app\oracle
sqlplus /nolog #createXE.sql
createXE.sql
spool %ORACLE_BASE%\admin\XE\CreateXE.log;
connect sys/admin as sysdba;
startup nomount;
CREATE DATABASE XE
LOGFILE GROUP 1 SIZE 51200K,
GROUP 2 SIZE 51200K
MAXINSTANCES 8
MAXLOGHISTORY 1
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
CHARACTER SET CL8MSWIN1251
NATIONAL CHARACTER SET AL16UTF16
DATAFILE 'c:\oraclexe\app\oracle\oradata\XE\system.dbf' SIZE 300M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE 'c:\oraclexe\app\oracle\oradata\XE\sysaux.dbf' SIZE 120M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE 'c:\oraclexe\app\oracle\oradata\XE\temp.dbf' SIZE 20M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
SMALLFILE UNDO TABLESPACE UNDOTBS1 DATAFILE 'c:\oraclexe\app\oracle\oradata\XE\undotbs1.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED;
CREATE SMALLFILE TABLESPACE USERS DATAFILE 'c:\oraclexe\app\oracle\oradata\XE\users.dbf' SIZE 300M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
-- catalog
#%ORACLE_HOME%\rdbms\admin\catalog.sql;
#%ORACLE_HOME%\rdbms\admin\catblock.sql;
#%ORACLE_HOME%\rdbms\admin\catproc.sql;
#%ORACLE_HOME%\rdbms\admin\catoctk.sql;
connect system/manager
-- sqlplus profile
#%ORACLE_HOME%\sqlplus\admin\pupbld.sql;
#%ORACLE_HOME%\sqlplus\admin\help\hlpbld.sql helpus.sql;
connect sys/admin as sysdba;
-- xdb protocol
#%ORACLE_HOME%\rdbms\admin\catqm.sql change_on_install SYSAUX TEMP NO;
#%ORACLE_HOME%\rdbms\admin\catxdbj.sql;
#%ORACLE_HOME%\rdbms\admin\catrul.sql;
-- compiling invalid objects
#%ORACLE_HOME%\rdbms\admin\utlrp.sql;
spool off;
exit;
Run createdXE.cmd from command line with admin privileges.
Done.
Related
We have Oracle 12c – installed on Windows Server 2016 and MS SQL Server 2017 – installed on Windows Server 2019.
When we try to use DB link from Oracle -> MS SQL via SELECT count(*) FROM SMSOUT#TOSIMSQLSERVER we obtain the following error:
ORA-28545: error diagnosed by Net8 when connecting to an agent
Unable to retrieve text of NETWORK/NCR message 65535
ORA-02063: preceding 2 lines from TOSIMSQLSERVER
28545. 0000 - "error diagnosed by Net8 when connecting to an agent"
*Cause: An attempt to call an external procedure or to issue SQL
to a non-Oracle system on a Heterogeneous Services database link
failed at connection initialization. The error diagnosed
by Net8 NCR software is reported separately.
*Action: Refer to the Net8 NCRO error message. If this isn't clear,
check connection administrative setup in tnsnames.ora
and listener.ora for the service associated with the
Heterogeneous Services database link being used, or with
'extproc_connection_data' for an external procedure call.
Error at Line: 1 Column: 29
The DB Link is created by CREATE DATABASE LINK TOSIMSQLSERVER CONNECT TO "oms" IDENTIFIED BY "…our_pwd…" USING 'simsqlserver';
\hs\admin\initsimsqlserver.ora:
# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC
#
# HS init parameters
#
HS_FDS_CONNECT_INFO = simsqlserver
HS_FDS_TRACE_LEVEL = OFF
\network\admin\listener.ora:
# listener.ora Network Configuration File: C:\app\oracle\product\12.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\oracle\product\12.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\app\oracle\product\12.2.0\dbhome_1\bin\oraclr12.dll")
)
(SID_DESC =
(SID_NAME = simsqlserver)
(ORACLE_HOME = C:\app\oracle\product\12.2.0\dbhome_1)
(PROGRAM = dg4odbc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle12.pds.opds.cz)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
\network\admin\tnsnames.ora:
# tnsnames.ora Network Configuration File: C:\app\oracle\product\12.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORACLE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle12.pds.opds.cz)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oracle.pds.opds.cz)
)
)
LISTENER_ORACLE =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle12.pds.opds.cz)(PORT = 1521))
simsqlserver =
(DESCRIPTION =
(ADDRESS=(PROTOCOL=TCP)(HOST=oracle12.pds.opds.cz)(PORT=1521))
(CONNECT_DATA=(SID=simsqlserver))
(HS=OK)
)
\network\admin\sqlnet.ora:
# sqlnet.ora Network Configuration File: C:\app\oracle\product\12.2.0\dbhome_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
Can somebody help me find where is the problem ? The SQL ODBC data source test is OK. Also TNSPING to simsqlserver is OK.
EDIT 11.03.2020:
Our Oracle is:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
PL/SQL Release 12.2.0.1.0 - Production
"CORE 12.2.0.1.0 Production"
TNS for 64-bit Windows: Version 12.2.0.1.0 - Production
NLSRTL Version 12.2.0.1.0 - Production
After setting HS_FDS_TRACE_LEVEL = 16 and after lsnrctl stop + lsnrctl start we have the following logs:
\oracle\diag\rdbms\oracle\oracle\trace\alert_oracle.log:
2020-03-11T13:27:40.813789+01:00
HS: Unable to establish RPC connection to HS Agent...
HS: ... Agent SID = (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle12.pds.opds.cz)(PORT=1521))(CONNECT_DATA=(SID=simsqlserver))), NCR error = 65535 Unable to retrieve text of NETWORK/NCR message 65535
HS: Unable to establish RPC connection to HS Agent...
HS: ... Agent SID = (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle12.pds.opds.cz)(PORT=1521))(CONNECT_DATA=(SID=simsqlserver))), NCR error = 65535 Unable to retrieve text of NETWORK/NCR message 65535
\oracle\diag\rdbms\oracle\oracle\alert\log.xml:
<msg time='2020-03-11T13:27:40.938+01:00' org_id='oracle' comp_id='rdbms'
type='UNKNOWN' level='16' host_id='ORACLE12'
host_addr='::1' module='SQL Developer' pid='2952'>
<txt>HS: Unable to establish RPC connection to HS Agent...
</txt>
</msg>
<msg time='2020-03-11T13:27:40.938+01:00' org_id='oracle' comp_id='rdbms'
type='UNKNOWN' level='16' host_id='ORACLE12'
host_addr='::1' module='SQL Developer' pid='2952'>
<txt>HS: ... Agent SID = (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle12.pds.opds.cz)(PORT=1521))(CONNECT_DATA=(SID=simsqlserver))), NCR error = 65535 Unable to retrieve text of NETWORK/NCR message 65535
</txt>
</msg>
Try removing the
SQLNET.AUTHENTICATION_SERVICES= (NTS)
line from sqlnet.ora. That isn't part of the specified configuration for DG4ODBC, per MOS Doc ID 1266571.1.
I am trying to create a dblink in oracle but,it is showing me error.
I have a databas orcl1 and I want to connect to another database etlsr which I created next database.
Inside this etlsr database I created a simple table name person inside sys and inserted a data.
Now,i again connect to orcl1 and wanted to connect to etlsr database but it was not happening as I tried
select * from person#ETLSR;
But it throwed me error as:
*
Error at line 1
ORA-02019: connection description for remote database not found
So,i think to create a db link so,I tried :(I tried these from orcl1)
CREATE DATABASE LINK sales
CONNECT TO sys IDENTIFIED BY ashwin
USING 'SALES';
I added in tnsname file as:
SALES =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SALES_PRD)
)
)
So,when I tried :
select * from person#SALES;
I got error:
ORA-12154: TNS:could not resolve the connect identifier specified
Why is this error coming? Is there any solution for this dblink creation? Can I also access the tables of another database without using dblinks?
Tnsnames.ora
# tnsnames.ora Network Configuration File: E:\oracle\app\AshwinPC\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
TEST=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =192.168.1.6)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
sqlnet.ora
# sqlnet.ora Network Configuration File: E:\oracle\app\AshwinPC\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
Saying that you have multiple databases on the same computer (and, possibly, some other Oracle software), note that most of them have their own TNSNAMES.ORA file. If you don't pay attention what you're doing, you might be actually using the wrong file. In order to make everything work, you'd have to maintain all those TNSNAMES.ORA files which is a tedious job.
Therefore, create a TNS_ADMIN environment variable which will point to some directory (doesn't even have to be part of the \oracle\ directories but, e.g. c:\my_ora_lib). Put one copy of TNSNAMES.ORA file in there and make sure it contains references to ALL databases you use.
Doing so, you'll make every Oracle software product use exactly this TNSNAMES.ORA file.
As of database link being created "properly" doesn't mean much. You can do it for any non-existent database, but you won't be able to use it:
SQL> create database link dbl_wrong
2 connect to asfasdfj
3 identified by asldfkj234l
4 using 'laskjfoiwe';
Database link created.
SQL> select * from dual#dbl_wrong
2 /
select * from dual#dbl_wrong
*
ERROR at line 1:
ORA-12154: TNS:could not resolve the connect identifier specified
SQL>
Therefore, make sure you used username, password and database that really exist.
I have created a DB Link into an Oracle Database, pointing to a SQL Server Database.
ODBC if properly configured for this SQL Server Database.
I have also installed Oracle Gateways for SQL Server, on the Oracle Database Server.
When I try to execute this SQL request on my Oracle database :
SELECT * FROM obbud#qualiactst
(qualiactst is my DBLink :
-- PROMPT CREATE DATABASE LINK qualiactst
CREATE DATABASE LINK qualiactst
CONNECT TO iac IDENTIFIED BY ***** USING 'RIATST';
)
the error message is displayed as below :
ORA-12154: TNS : could not resolve the connect identifier specified
I have configured the tnsname.ora file of my Oracle Database Server with this :
RIATST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = grensql2k12R2-1)(PORT = 14539))
)
(CONNECT_DATA = (SID = RIATST))
(HS=OK)
)
(but I don't really know if i have to add a non-oracle database into a tnsname.ora)
I don't understand what i have done wrong, and if some things are missing.
Can you help me ?
Thank you so much
Jeanne
It looks like you don't set up listener onto the target host (grensql2k12R2-1) or don't configure HS initialization file.
Generally, try to follow this guide. There are too many details to check every of it in one answer.
For communication with a heterogeneous MSSQL database. There are two options.
1) Use of specialized Oracle Database Gateway for SQL Server.
Configuring Oracle Database Gateway for SQL Server
2) Oracle Database Gateway for ODBC.
Configuring Oracle Database Gateway for ODBC
Simple example configure Oracle Database Gateway for SQL Server
ORACLE_HOME\dg4msql\admin\initdg4msql.ora
HS_FDS_CONNECT_INFO=host_name:port_name//database_name
ORACLE_HOME\network\admin\listener.ora
SID_LIST_LISTENER=
############# MS SQL ####################
(SID_LIST=
(SID_DESC=
(SID_NAME=dg4msql)
(ORACLE_HOME=oracle_home_directory)
(PROGRAM=dg4msql)
)
)
##########################################
Restart listener
lsnrctl stop
lsnrctl start
ORACLE_HOME\network\admin\tnsnames.ora
connect_descriptor_mssql=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=host_name_oracle_gateway_host)
(PORT=port_number_listener_1521)
)
(CONNECT_DATA=
(SID=dg4msql))
(HS=OK))
SQL> CREATE PUBLIC DATABASE LINK name_dblink CONNECT TO "user" IDENTIFIED BY "password" USING 'connect_descriptor_mssql';
SQL> SELECT * FROM DUAL#dblink;
Example from production server Oracle 11.2.0.4
/home/oracle/app/oracle/product/11.2.0/dbhome_1/dg4msql/admin/inittch7.ora
HS_FDS_CONNECT_INFO=[10.89.250.87]:1433/
/home/oracle/app/oracle/product/11.2.0/dbhome_1/dg4msql/admin/inittch7.ora
HS_FDS_CONNECT_INFO=[10.89.250.88]:1433/
/home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1525))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.89.251.242)(PORT = 1521))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ssps)
(ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = ssps)
)
(SID_DESC=
(SID_NAME=tch8)
(ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1)
(PROGRAM=dg4msql)
)
(SID_DESC=
(SID_NAME=tch7)
(ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1)
(PROGRAM=dg4msql)
)
)
ADR_BASE_LISTENER = /home/oracle/database
/home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
SSPS_1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.89.251.242)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ssps)
)
)
atch7 =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST= 10.89.251.242)(PORT=1521))
(CONNECT_DATA=(SID=tch7))
(HS=OK)
)
atch8 =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=10.89.251.242)(PORT=1521))
(CONNECT_DATA=(SID=tch8))
(HS=OK)
)
CREATE DATABASE LINK ATCH7.GIFT.KRSK.MPS
CONNECT TO "asuzm_link" IDENTIFIED BY <ENTER USER PASSWORD HERE>
USING 'atch7'
/
CREATE DATABASE LINK ATCH8.GIFT.KRSK.MPS
CONNECT TO "asuzm_link" IDENTIFIED BY <ENTER USER PASSWORD HERE>
USING 'atch8'
/
I'am trying to setup a new database on oracle 12c. I did this many times and in my opinion, there's nothing I did wrong.
Important thing - I have also 11g installation in same folder (product) so to run f.e. sqlplus or oradim for security I run from /BIN directory with ".exe" on the end.
First:
set ORACLE_SID=testdb
set LOCAL=testdb
new service - oradim.exe -new -sid %ORACLE_SID% -intpwd system -startmode M
in services.msc there's everything ok - service showed up and run.
Next: initdb.ora & tnsnames.ora-
testdb =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = testdb) //here i also try (SID = testdb)
)
)
init:
control_files = (C:\app\oracle\product\12.1.0\dbhome_1\dbs\control01.ora,
C:\app\oracle\product\12.1.0\dbhome_1\dbs\control02.ora,
C:\app\oracle\product\12.1.0\dbhome_1\dbs\control03.ora)
undo_management = auto
db_name = ora10
db_block_size = 8192
then
from cmd line with Admin rights i tried
sqlplus "/as sysdba"
sqlplus sys/system#testdb
sqlplus sys/system
sqlplus /nolog -> connect sys/system as sysdba --since local and ORACLE_SID are set
and I always get an "unkown service or sid" error.
So I checked lsnrctl.exe status and my testdb isn't there.
Why? :|
try to restart the listener and register your sid dynamically with listener.
alter system set local_listener=testdb
For the last 2 days I've been trying to configure Oracle DB 11g in Oracle Linux 6. It has successfully installed but I can't create a database.
I have created the listener and tnsnames and tried to startup the database with the following commands:
sqlplus /nolog
connect / as sysdba
startup
And I'm getting the following errors:
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=beta)(PORT=1521))'
Here my listener and tnsnames config:
listener.ora:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = orcl)
(ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/oracle)
)
)
SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
ADR_BASE_ORCL = /home/oracle/app/oracle
tnsnames.ora:
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
Any ideas?
Did you set your environment variables up per the installation instructions? In particular, you'll need ORACLE_SID, ORACLE_BASE, ORACLE_UNQNAME, ORACLE_HOME (remember that case is significant on Linux). Also, if you didn't create a database as part of the installation, you'll need to run the database creation assistant (dbca).
I only need an environment for development purposes so I've download a template VM from Oracle site's and instantiated using Virtual Box. The template is configured and it's database is running ok.
Oracle looks for the "beta" hostname, and all your settings pinpoint to localhost. Try adding an entry in
/etc/hosts
with the following line:
127.0.0.1 beta
and try starting it up again