Adi
Adi

Reputation: 35

How to connect and retrieve the data from Oracle database in ssrs reports

I am using SQL Server database for ssrs reports. Now I want to try it on Oracle database.

Please any one help me to connect Oracle database in ssrs reports to retrieve the data. By the way, I am using ssts 2012.

Upvotes: 1

Views: 1210

Answers (1)

Tomi Niemenmaa
Tomi Niemenmaa

Reputation: 650

Depending if you have tnsnames.ora configuration for the database on your client computer you might have to add this or define tns configuration on the connection string.

For example:

Data Source=(DESCRIPTION = 
   (ADDRESS_LIST =
     (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
   )
 (CONNECT_DATA =
   (SERVICE_NAME = MyServiceName)
 )

If you have tnsnames.ora you can just use the service name that is specified just as you would with ms sql server.

Also when using Oracle database when injecting parameters to your queries you have to use : instead of @ as parameter prefix. For example "select * from myTable where name like (:name)"

Upvotes: 3

Related Questions