Missing listener.ora file - oracle

I'm attempting to make a connection to an Oracle Database with Microsoft Power BI Desktop.
Originally I was getting the following error message:
"The recommended provider ('Oracle.DataAccess.Client') is not
installed. You can continue with your current provider, however it has
been deprecated and may not work properly."
I've installed Oracle Database Access Components (ODAC), specifically "64-bit ODAC 12c Release 4 (12.1.0.2.4) for Windows x64" from this link. The message no longer appears. However, I now get a second error after attempting to connect to a database (which I can connect through Oracle's SQL Developer with no issues):
Unable to connect
We encountered an error while trying to connect.
Details: "Oracle: ORA-12541: TNS:no listener"
After install, there doesn't seem to be a "listener.ora" file located in %ORACLE_HOME%\network\admin\ folder at all. I do see "sqlnet.ora" and "tsnames.ora" but nothing else. Did I install the proper application or am I missing something? I tried doing a search of the file on the computer but nothing came up. Thanks.

If you are still having the problem see this Power BI Desktop Help page.
Manage your data Source - Oracle Power BI Desktop Help
Oracle Client --> [ Oracle Listener on Database Server --> Oracle Database Username ]
The Oracle Listener is normally located on the Oracle Database Server. Each Oracle Database running on the server will register Service Names with the Oracle Listener.
Oracle database initialization parameter local_listener
local_listener (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
The local_listener is on the database server, the localhost port 1521.
The Oracle Client Networking Description Files are:
[Oracle Home Directory]\Network\Admin\sqlnet.ora
and
[Oracle Home Directory]\Network\Admin\tnsnames.ora
See the sqlnet.ora line [ NAME.DIRECTORY_PATH= (TNSNAMES, EZCONNECT) ]
Default is TNSNAMES.
TNSNAMES reads the description from the tnsnames.ora file.
Add your tnsnames description to the tnsnames.ora file. Use the CONTOSO connection description below as a guide.
Check with the Database Administrator, for HOST, PORT and the database SERVICE_NAME parameters.
Use the Oracle tnsping command to check the connection description.
tnsping CONTOSO
CONTOSO = (DESCRIPTION =
 (ADDRESS = (PROTOCOL = TCP)(HOST = oracleserver.contoso.com)(PORT = 1521))
 (CONNECT_DATA =
  (SERVER = DEDICATED)
  (SERVICE_NAME = CONTOSO)
 )
)
Please remember that this is for the Power BI Desktop.
If you plan to move your Power BI Project to a Cloud Services or to a Local Power BI reporting server, check with your Server Administrator for connection information.

Related

I install oracle client 11g on my machine .I am not give any username and password of course I am not get that window at initialisation time

How connect to the db .I am tried with the following username and passwords system/manager ,scott/tiger etc .But no luck I am still not connected to the db.And also I am getting TNS:Protocol adapter error. I am not understanding why? I also gone through the services for start/restart But there is no at least one single Oracle service file.How I am getting this oracle services as well as how I connect to the db.Please some body help me. My system operating system windows XP.. I am installing oracle client 11g on windows Xp operating system.
Oracle client is software that allows a remote computer to talk to Oracle. If you were to write a piece of software that communicated with the database, you would use the Oracle Client to facilitate that communication.
If you need oracle database in your machine you can go for Oracle database version like Express edition and Enterprise, standard edition. You can't create any database using the oracle client software.
Note : While installing oracle client(any version) it won't ask any username and password.
Steps to connect Oracle client to Oracle database
Consider your oracle server tnsname like below
ORA11 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ORA11)
)
)
Place above tnsname text into your tnsname.ora file (C:\app\oracle\product\network/admin/tnsnames.ora)
After that check your sql*plus prompt like
tnsping databasename
sample output
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=gracelan)
(PORT=1525)) (CONNECT_DATA= (SID=GRA901m)))
OK (80 msec)
connect username/password#dbname
can you please provide your tnsname ping output.
Use your server Name like tnsping orcl in cmd.exe
When ever you want to connect dbserver from dbclient we must know the username and password.That are all knows to the who install the Database server not Database client. From where ever we want to connect to the db we must and should know the username and password .i.e either from dbserver or dbclient.IN OTHER words when installing oracle client we don't enter any username and passwords.Because in client there is no database .we just connect the server db only.The password and username knows whose install DB server not client.From client we connect the server by using server username and server passwords...

Oracle client server connectivity issue

I have installed multiple oracle (homes) clients on my server including 10g and 11g . When using SQL PLUS 11G client I am getting error "TNS:protocol adapter error."
I checked TNSNAMES.ora to resolve the issue. I found that TNSNAMES.ora in the network/admin directory for 11G home is having some values which is identical to a different tnsnames.ora on a different server from which I am successfully able to connect to the server.
I also get to know about a default TNSNAMES.ora for the entire system but not sure where I can find it.
I tried tnsping orcl but got error "TNSPING is not recognized as an internal or external command".
I am new to Oracle, please help

Error while connecting to Oracle Server from Instant client through CMD prompt, but SQL Developer connects?

I am using Client provided laptop (windows XP professional 2002) and do not have administrative privileges (hence cannot st any required environment variables as well):
SQL Developer is provided and I am able to access the oracle server xaal5#:1521/ from SQL developer,
I need to use SQL LOADER to perform some heavy loading. I decided to download the instant client to see if I can save some time while my oracle client installation requests takes ages to go through approvals.
I went to the link: http://www.oracle.com/technetwork/topics/winsoft-085727.html
for Windows and downloaded the following Instant Client Downloads for Microsoft Windows (32-bit)
Version 10.2.0.4
Instant Client Package - Basic: All files required to run OCI, OCCI, and JDBC-OCI applications
Download instantclient-basic-win32-10.2.0.4.zip (34,742,358 bytes)
*Instant Client Package - SQL*Plus: Additional libraries and executable for running SQL*Plus with Instant Client
Download instantclient-sqlplus-win32-10.2.0.4.zip (725,418 bytes)
Extracted these two zip files into C:\instantclient-win32 folder, got the following files (Yes there is no SQL LOADER in it , but i decided to first set the oracle client up and then look for SQL LDR)
sqlplus.exe
oci.dll
ocijdbc10.dll
ociw32.dll
orannzsbb10.dll
oraocci10.dll
oraociei10.dll
Orasqlplusic10.dll
classes12.jar
ojdbc14.jar
glogin.sql
I Ran the following CMD prompt of windows machine:
sqlplus xaal5#:1521/SID
and got the following error :
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
I created a tnsnames.ora file with following entry:
PLMS = (DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = XXXXXX)(PORT = 1521))
(CONNECT_DATA =
(SID = sblcusdv)
))
and set up a USER VARIABLES to point to the path of tnsnames.ora file (in the Environment variables window) , as i cannot create a system variable.
$TNS_ADMIN=C:\instantclient-win32
I Ran the following CMD prompt again:
sqlplus xaal5#:1521/SID
and got the following error, again :
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
What am i doing wrong !! or is there another way to get SQL loader working on my system considering the constraints (long wait for approvals for oracle client installation).
When you use this format:
sqlplus xaal5#HOST:1521/SID
... you're using the 'easy connect' syntax, bypassing the tnsnames.ora and connecting to the service name SID - I assume you're actually using the SID from your TNS file, /sblcusdv. The SID and service name are not always the same thing, and the error indicates they are different in this environment.
To use your tnsnames.ora entry, use this syntax:
sqlplus xaal5#PLMS
That is, with the TNS alias you defined. If you don't want to use that file you need to know the service name. From the server you can use lsnrctl services to see which service names are registered, but you might not have access. If you have permissions you can do show parameters service_names from SQL*Plus (while connected via TNS), or you can query the performance views to get that information. But your account may not have access to that information either. In which case you'd need to ask your DBA. (I'm also assuming SQL Developer is connecting by SID, but it's possible it is using the service name, so you can just copy that).
sqlplus xaal5#//HOST:1521/SERVICE_NAME
You can't use SQL*Loader from the imstant client though, so you still have to wait for the full client to be installed. You might want to look at external tables as an alternative to SQL*Loader; then you could stick to instant client (or indeed SQL Developer). But you'd need to be able to get the data files into a DB-recognised directory on the server, which might haveits own issues.
You have to use the Description as stated.
sqlplus Username/Password#description
In your case:
sqlplus Username/Password#PLMS
This should be sufficient, no need to mention hostname or Port.
In case it doesn't work, check if your System variable PATH contain the oracle installation folder at first place. And when you have Oracle DB and Oracle Client installed on same machine, look if both TNSNAMES have the connection you looking for.

Connection to an Oracle Database

I recently picked up a project where I need to build some SSIS packages that extract data from a remote Oracle database and load the data into a Sql Server database. The Oracle database is an old 32-bit Oracle 8i database. The Sql Server is 64-bit Sql Server 2008R2.
I can connect to the Oracle database from an old Win XP workstation no problem. When I try and connect from the Sql Server, I can't set a handshake.
I installed The Oracle Client 11g on the Sql Server box, copied the tnsnames file from the Install\Network\Admin\Sample to Install\Network\Admin and added the entry that worked on the XP workstation. When I try and create an ODBC connection using the Oracle ODBC Drviver, I get:
*Unable to connect Sql State=08004 ORA-12154: TNS:could not resolve the connect identifier specified.*1
My guess is that the driver can't find the TNS file. Is there anything else I have to configure? I checked the exception code via duckduckgo and I could not find anything.
Thanks in advance.
OK, I found it
I had to go into the Environment variables and define the ORACLE_HOME path. Once I did that, it connected.
This post got me on the right track.
Thanks
You have to use both of either 64 bit or 32 bit as your machine configuration. Make sure your server configuration is correct.
This might help someone stuck for "identifier not resolved issue":
If you have already checked the environment variables : PATH, ORACLE_HOME, TNS_ADMIN, please give a close look to tnsnames.ora entry for the given dsn. I had not given proper indentation and it was failing because of that!
Here is the entry with accurate indentation:
<dsn> =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <server>)(PORT = <port>))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = <servicename>)
)
)
I had a similar problem where I was getting garbage in the TNS Services name list and testing the connection took forever. I found this was caused be a typo in the system environment variable setting for the TNS_ADMIN variable, where I had a space after the directory eg c:\oracle\instantclient_ (where _ is a space)
Removed and corrected the list garbage and connected straight away.
Hope this helps.
Of course you must check your TNSNAMES.ora at
C:\your_oracle_folder\app\oracle\product\11.2.0\server\network\ADMIN\TNSNAMES.ora
You should see at the top what is your system name. In my case Oracle 11g Express is "XE". Then configure your ODBC 32 or 64 bits depending on your platform:

Unable to connect to oracle with different OS user accout

I have installed Oracle on Ubuntu with OS user oracle. When I try to connect to Oracle when logged on as different OS user (other than oracle), I get error:
SQL> connect user1/user1#orcl
ORA-12154: TNS:could not resolve the connect identifier specified
However, if I don't mention Oracle SID then I don't get any error:
SQL> connect user1/user1
Connected to:
Oracle Database
SQL>
I have declared ORACLE_HOME and SID in the user profile. But it did not work. Can someone please help me to understand the issue.
In a sense you don't really have a problem; you can connect locally using the ORACLE_HOME and ORACLE_SID environment variables, which is fine.
When you use the connect user1/user1#orcl version, the orcl is not your SID; as explained in the documentation it is an 'Oracle Net connect identifier'.
connect_identifier
An Oracle Net connect identifier. The exact syntax depends on the
Oracle Net configuration. For more information, refer to the Oracle
Net manual or contact your DBA. SQL*Plus does not prompt for a service
name, but uses your default database if you do not include a connect
identifier.
So you are connecting over a network connection, even though its to the same host, rather than internally using IPC. You don't even need to have ORACLE_SID set when you do that, because that is used for IPC and isn't part of the network connection.
Now, the connect identifier may well actually be the same string as your SID, but it doesn't have to be. Usually when you're using a single term like orcl you're using a 'net service name' which is defined in your tnsnames.ora file. (Depending on how the naming methods are configured in your sqlnet.ora, which determines how the connect identifier is resolved; but this is still the most common configuration I think).
The Oracle Net configuration can be configured using the netca configuration assistant, as the oracle user, though you can create a private tnsnames.ora to override that.
See the Oracle Net admin guide for more about how connectivity works and is configured, and the SQL*Plus user guide for a shorter version.
In order for your user1/user1#orcl connection to work you would need a tnsnames.ora entry looking something like:
orcl =
(DESCRIPTION =
(ADDRESS = (PROTOCOL=tcp)(HOST=my_host)(PORT=1521))
(CONNECT_DATA = (SERVICE_NAME = orcl)))
... where my_host is the DNS name or IP address of your Oracle server, and 1521 is the port the listener is configured to run on. (The listener has to be running for you to be able to connect this way, too). The SERVICE_NAME is not necessarily the same as your SID either, but depends on the database configuration; the lsnrctl status command will show what service names are available.
The ORA-12154 error is telling you that you either don't have a tnsnames.ora file at all, or that it doesn't contain an entry for the alias orcl.
As #a_horse_with_no_name points out, there are other forms of connect identifier, and you don't necessarily need a tnsnames.ora file for a network connection; the options are explained here. I've just focused on the one you were trying to use. You don't necessarily need to use any of them though since you are able to connect locally.

Resources