Link to home
Start Free TrialLog in
Avatar of SpaceLaika
SpaceLaika

asked on

ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

Howdy,

I need to develop some reports using SSRS which will connect to a Oracle instance, which is hosted on another machine, as their data source. I have downloaded and installed "Oracle Data Access Components for Windows" from http://www.oracle.com/technetwork/indexes/downloads/index.html 

 User generated image
I also created an 'New Project > Business Intelligence Projects > Report Server Project'  in SQL Server Business Intelligence Development Studio (BIDS) and have attempted to add a 'Shared Data Source', but I am receiving the error below when testing the connection:

 User generated image

I have read up on the issue and saw solutions mentioning the listener.ora & tnsnames.ora files, where additions/edits need to be made. I have done a search for both these files on my machine and do not seem to have either of them.

I have done a search for listener.ora & tnsnames.ora on the machine that hosts the Oracle instance and they are found on that machine, a few instances of each actually, can I move these files to my PC and if so which ones, i.e. see below for files found:

 User generated image
I do not have much experience with Oracle, only other databases so any help would be greatly appreciated.

Thanks,
SpaceLaika.

ASKER CERTIFIED SOLUTION
Avatar of Praveen Kumar Chandrashekatr
Praveen Kumar Chandrashekatr
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
After installing ODAC you should follow these steps on the Client.
see: http://www.oracle.com/technetwork/topics/dotnet/install112012-164342.html

1. Copy the tnsnames.ora file located in the following directory:
ORACLE_HOME\Network\Admin\Sample\
to this directory:
ORACLE_HOME\Network\Admin\

<data source alias> =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <hostname or IP>)(PORT = <port>))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = <database service name>)
)
)

data source alias = the shortcut name given to identify the connect descriptor. In the ODP.NET connection string, developers set the "Data Source" attribute to the data source alias.
hostname or IP = the database server machine's host name or IP address
port = the database server machine's port on which it listens for incoming connection requests. In general, this value is set to port "1521".
database service name = the database's global name
Avatar of SpaceLaika
SpaceLaika

ASKER

Thanks!