I have already set up an Oracle Database but I am facing a connectivity problem in the below manner:
sqlplus CISADM/CISADM#<IP>:1521/PSRM
sqlplus CISADM#PSRM
With the above two options I successfully connect to the database. Although, when I try to connect as:
sqlplus CISADM#<IP>:1521/PSRM
I get the following error :
ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
I can perform ping either with IP, or hostname, tnsping with IP and hostname successfully.
My tnsnames.ora file:
PSRM =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = <IP>)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PSRM)
)
)
My sqlnet.ora file:
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
I am connecting from client PC to a Database which is located in a VM. The above files are from client
Files from VM, where Database is hosted:
tnsnames.ora:
PSRM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <IP>)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PSRM)
)
)
listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <IP>)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
Any ideas?
You should run it like this :
sqlplus CISADM#\"<IP>:1521/PSRM\"
Important: The \" in the beginning and end of the server:port/service is part of the syntax.
Related
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)
)
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 am getting this error while connecting to oracle 12c from SQL Developer,
Status : Failure -Test failed: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
My tnsnames.ora file contents is:
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
) )
ORCL1 = (DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.1.10)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl.abc.com)
) )
ORCL = (DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = INT.abc.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.abc.com)
) )
My listener.ora file contents is:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\oracle\product\12.1.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\app\oracle\product\12.1.0\dbhome_1\bin\oraclr12.dll")
)
)
LISTENER = (DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = INT.abc.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
) )
I am using Service Name as 'orcl1' and Host Name as '10.10.1.10' in sql developer "Add Connection" window and getting the above error.
I am able to connect to sqlplus using cmd with proper username and password.
Any help will be appreciated.
I was able to connect to SQL Developer, once i changed my Service Name to "orcl.abc.com"
It seems like you are connecting through sqlplus using orcl. check your hostname. In tnsnames.ora you are using int. abc.cm and in listener you are using ipaddress. Try to keep both same. Change hostname in tnsnames.ora to ipaddress.
I created two databases one called test and one that is called archivio. The SID is equals to name. I also created a listener for SID test that responds on port 1521 and one for the SID archivio that should answer on port 1522.
I have verified that the services are active
the first listener works properly. The second, reported to the archivio database, does not work. I perform the test using net manager. The error message is:
the listener is not currently aware of the service requested in connect descriptor
with oracle sql developer i can connect to db archivio if i use local instead of base type connection
Other info:
windows 7 ultimate oracle 12c
LISTNER.ORA
# listener.ora Network Configuration File: C:\Program Files (x86)\Common Files\Quest Shared\instantclient-basic-windows.x64-11.2.0.4.0\listener.ora
# Generated by Oracle configuration tools.
LISTENER1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = webgate1-PC)(PORT = 1522))
)
ADR_BASE_LISTENER1 = C:\app\cirom
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = webgate1-PC)(PORT = 1521))
)
ADR_BASE_LISTENER = C:\app\cirom
ADR_BASE_LISTENER1 = C:\app\cirom
TNSNAMES.ORA
# tnsnames.ora Network Configuration File: C:\Program Files (x86)\Common Files\Quest Shared\instantclient-basic-windows.x64-11.2.0.4.0\tnsnames.ora
# Generated by Oracle configuration tools.
ARCHIVIO =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = webgate1-pc)(PORT = 1522))
)
(CONNECT_DATA =
(SERVICE_NAME = archivio)
)
)
LISTENER_TEST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
LISTENER_ARCHIVIO =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522))
TEST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = webgate1-pc)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = test)
)
)
In order to get an Oracle instance registered on a listener running on not default port (not TCP 1521) you have to configure the LOCAL_LISTENER parameter, for example:
(ADDRESS = (PROTOCOL=TCP)(HOST=hostname)(PORT=1522))
The command is:
alter system set local_listener='(ADDRESS = (PROTOCOL=TCP)(HOST=hostname)(PORT=1522))' scope=both;
Change hostname with you hostname.
Then restart you database or issue the command:
alter system register;
Giovanni
I am new to oracle, I have installed the oracle 10g with sql plus. I used sql plus yesterday but now it is giving me this error ORA-12170: TNS: Connect timeout occurred at the time of login. I am using SCOTT User for login.
I am using these credentials for login:
username: Scott
password: tiger
host: orcl
I have googled it already and tried some solution but it doesn't work :(
Here are some details about my configuration:
sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.9)(PORT = 1521))
)
)
tnsnames.ora
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.9)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
Try to ping 192.168.1.9. If that works, try
tnsping orcl
from the command line. Maybe there is a firewall that blocks your network access to the Oracle DB?