Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Connecting to Oracle via Microsoft Query fails

Posted on 2013-06-07
4
Medium Priority
?
1,944 Views
Last Modified: 2013-07-30
I am trying to connect to Oracle via Excel 2013 and MS Query Oracle ODBC. I am using the same username, password ans service name that is working just fine from the same pc with PL/SQL Developer, but when I try to connect I get an error message:

ORA-12560: TNS:protocol adapter error - Driver's SQLSetConnectAttr failed

WHat is causing this? In my c:\oracle directory I have a subdirectory orant11 (version 11?).

My sqlnet.ora file in the network\admin-folder looks like this:
# SQLNET.ORA Network Configuration File: c:\oracle\orant11\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.

NAMES.DEFAULT_DOMAIN = xxx.no

SQLNET.AUTHENTICATION_SERVICES= (NONE)

NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)

Open in new window


and the tnsnames.ora file in the same folder looks like this (ip and service names changed for security reasons):

# TNSNAMES.ORA Network Configuration File: c:\oracle\orant11\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
MYAPP.XXX.NO = 
  (DESCRIPTION= 
    (ADDRESS_LIST= 
      (ADDRESS= 
        (PROTOCOL=TCP) 
        (Host=99.9.249.99) 
        (Port=1541) 
      ) 
    ) 
    (CONNECT_DATA= 
      (SERVICE_NAME=MYAPP) 
    ) 
  ) 

Open in new window


Can you please help?

Thx!
0
Comment
Question by:IverErling
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 

Author Comment

by:IverErling
ID: 39228310
I have found a different way to connect that worked fine right away:

1. Goto Data-pane in Excel.
2. Click on 'From other data sources'
3. Click From wizard for database connection' (just above Microsoft Query)
4. Select 'Other/advanced'
5. Click 'Next'
6. Select 'Oracle provider for OLE DB
7. Input the datasource ip:port/sid
8. Input username and password
9. Click test connection
10. SUCCESS!
0
 

Author Comment

by:IverErling
ID: 39228331
However, the method I outlined above doesn't seem to allow me to use queries, it only transfers entire tables. Which can be useful at times, but I am typically using tables with hundreds of thousands of rows, and hence it is not ideal. So the best would be to get the ODBC connection to work.
0
 
LVL 38

Accepted Solution

by:
Geert Gruwez earned 1000 total points
ID: 39228868
oracle client contains different dlls and methods for connecting to a database

restart the oracle client installer
check custom install
and add the odbc/ole db provider options

that should fix the excel problem

sql developer connects with oci component
excel with ole db/odbc component
0
 

Author Closing Comment

by:IverErling
ID: 39366510
Couldn't really get it to work problerly. Have dropped it for now.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question