When I try to connect I get error:
I disabled firewall, started the OracleServiceXE, but still get error.
When I use command lsnrctl status, I get:
lsnrctl start:
My tnsnames.ora file looks like that:
# tnsnames.ora Network Configuration File: C:\app\Coi\product\18.0.0\dbhomeXE\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.0)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
LISTENER_XE =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.8)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
Related
I'm trying to make a simple distributed database with Oracle Database 11g. I've created 2 virtual machines, both windows 7 and I've set up static ip for everyone and then I've modified the listener.ora. For exmaple the listener.ora for first VM looks like this:
I've check from my PC with ping to see if I get a reply and it works.
Then I've modified the tnsnames.ora from my PC as shown:
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)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
SERVER1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.75.131)(PORT = 1521))
(CONNECT_DATA =
(SID = XE)
)
)
SERVER2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.75.130)(PORT = 1521))
(CONNECT_DATA =
(SID = XE)
)
)
When I try to create a connection with hostname: 192.168.75.131(first VM) I'm getting the follow error: Status : Failure -Test failed: ORA-01017: invalid username/password; logon denied.
The username and password are correct.
Try to connect utilizing sqlplus on Server1 - the devops way - repeatable
C:\>set LOCAL=192.168.75.131/XE
C:\>sqlplus system/system_password
SQL>connect admin/admin_password
You can also try:
C:\>set LOCAL=localhost/XE
C:\>sqlplus system/system_password
SQL>connect admin/admin_password
Best of luck!
Is your database set to use case-sensitive passwords?
That could be the issue.
I have logged in as system user.
So I have two plugable databases
1) PDB$SEED
2) PDBORCL
Now I want to alter session and need to set the container to pdborcl . But it is giving me error like below.
SQL> ALTER SESSION SET CONTAINER = pdborcl;
ERROR:
ORA-65024: Pluggable database PDBORCL is not open.
Note: I also changed my tsnames.ora file like below
# tnsnames.ora Network Configuration File: D:\app\SgMadankar\virtual\product\12.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)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = LOCALHOST)(PORT = 1521))
(CONNECT_DATA =
(SERVICE = DEDICATED)
(SERVICE_NAME = orcl)
)
)
PDBORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdborcl)
)
)
1- You need to connect with a user with SYSDBA privilege, SYS would be good.
2- You need to open your pluggable database.
SQL> ALTER PLUGGABLE DATABASE ALL OPEN;
What I have:
1) Oracle 11R1 services on Local system
2) Oracle 12c services on other account
TNS listener run from oracle 11R1 (but also I've create one for 12c)
As a first solution I try
A12c =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.1)(PORT = 1531))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = A12c.1.1.1)
)
)
B11R1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = B11R1)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.1)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.1)(PORT = 1531))
)
)
With this configuration I could connect to 11r1 (also on 1531 port !) but nt to 12c. When I setup two listener situation was same. When I run with 12c listener I could not connect to any databases.
Will be grateful for any suggestions.
Thank you
I am trying connect the oracle database using SQL Developer tools but It showing me:
IO ERRORS: Network adapter Could Not Established The Connection
I Started the OracleXETNSListner service from service.msc: it's running.
I also used the lsnrctl start command, which couldn't start the listener either.
And one more thing: I used sqlplus command prompt: it works fine (also gets connected database)
Thanks in advance...
this is my Tnsname.ora file
my tnsname file located at C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\tnsnames.ora
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = HP-PC)(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)
)
)
I am currently running Oracle 11g on a Windows 2012 Environment.
I recently added another NIC to allow for failover, however I am not sure as to what to do with my listener.ora file and my tnsnames.ora file. Could someone offer guidance? For reference, the current IP I am using is 192.168.0.52 and the IP of the second NIC that I would like to add has the IP of 192.168.0.53.
Below is my listener.ora file:
# listener.ora Network Configuration File: D:\app\Administrator\product\11.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 = D:\app\Administrator\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.52)(PORT = 1521))
)
)
ADR_BASE_LISTENER = D:\app\Administrator
Below is my tnsnames.ora file:
# tnsnames.ora Network Configuration File: D:\app\Administrator\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.52)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.52)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
Thanks for all your help!
Well, you can specify multiple ADDRESS entries in the listener.ora:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.52)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.53)(PORT = 1521))
)
)
And in tnsnames.ora:
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.52)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.53)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
When I specify multiple addresses for listener, it listens on all interfaces listed. And when at least one address in tnsnames can be connected to -- it connects. I have 11g available for testing both on the client-side and on the server-side. I checked the documentation (Multiple Address Lists in tnsnames.ora) and it states that parameter (FAILOVER=on) can be specified in tnsnames.ora explicitly.