Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Microsoft ODBC for Oracle: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.

Posted on 2014-03-27
Medium Priority
Last Modified: 2014-05-30
I have got an authentification information from my Corp to connect on Oralce database through Oracle. Corp is using special script through website, which automatically download sources directly to odbcad32.exe.
I have start testing two connections:
1. Simple way: through MSAccess >> External Data linking ODBC.
*Result: Successfull. I was just need to pickup ODBC name, and just enter username & password >> and successful got a list of tables.

2. More complex way with visual studio, behind code of WindowsApplication project, either, with below code, but getting error.
*Error result: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.

            Dim cn As OdbcConnection
            cn = New OdbcConnection("Driver = {Microsoft ODBC for Oracle};Server=Siebel Analytics DIR - Prod;uid=xxxx;pwd=xxxx")
            'Dim myString As String = "Select * from TestTable"
            'Dim cmd As OdbcCommand = New OdbcCommand(myString)
        Catch ex As Exception
        End Try

Open in new window

3. I have also try with System.Data.OracleClient reference, but:
*result: obsolete technic

4. After posting this help I have found 3rd party tool, meaning Oracle solution Oracle.DataAccess references.

Please, need someone for help, as I do not have experience with Oracle connection strings.

Thanks in advance for help!
Question by:dejandejanovic
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
  • 6
  • 3
  • 2
  • +1

Author Comment

ID: 39958697
Forgot to mention:
- I have also used Orace BI ODBC Client tool, and was also successfull connect.
LVL 12

Assisted Solution

by:Praveen Kumar Chandrashekatr
Praveen Kumar Chandrashekatr earned 400 total points
ID: 39959710
Always in these type of connection there will be a problem of driver version i.e 32 bit or 64 bit drivers. So confirm that you are using the right odbc driver for connection.

here are some of the example on connection to database using odbc drivers.
LVL 83

Assisted Solution

CodeCruiser earned 400 total points
ID: 39961227
You said you have got Oracle provider for .NET so why are you using ODBC? Try with ODP and check below link for example of connection string
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Author Comment

ID: 39961480
I have try to use below code, linked posted by: praveencpk, but getting errors. Check attached printscreen.

Dim oODBCConnection As OdbcConnection
            Dim sConnString As String = _
                "Driver={Microsoft ODBC for Oracle};" & _
                "Server=Siebel Analytics DIR - Prod;" & _
                "Uid=xxxx;" & _
            oODBCConnection = New Odbc.OdbcConnection(sConnString)

Open in new window


Author Comment

ID: 39961512
I have already try with ODP, but major problem is error:
"ORA-12154: TNS:could not resolve the connect identifier specified."

But, I have also found this connection string standard. But I have not idea what shouldI put for HOST, or PORT?

I have add printscreen of my company ODBC connection, which I already describe in question that I do not have problem connecting using MSAccess, or Oracle Client.
If you have experience, can you show me by printscreen if those information can be entered into connection string?

User Id=myUsername;Password=myPassword;

Open in new window

LVL 35

Assisted Solution

sarabande earned 1200 total points
ID: 40074720
ORA-12154: TNS:could not resolve the connect identifier specified.
generally, any oracle connection can be done only with valid TNS entries. these entries are stored in a text file named tnsnames.ora

The tnsnames.ora can be found (normally) below a folder like \oracle\product\10.2.0\client_1\network\admin . the folder was created when you install the oracle client on your windows machine. the way to go is to get an oracle client which fits to the oracle db you want to connect to. if the db is at a local server, you could/should use the client that comes with the server. you also should install the odbc client from the oracle setup if available. in any case when you installed the oracle client you would get an assistant where you could configure the client access and which would write a correct entry to the tnsnames.ora. you also should provide or have environment variables for TNS_ADMIN (path to tnsnames.ora) and ORACLE_HOME (path to oracle client).

see for detailed information how to setup a working environment on windows platform for accessing oracle db.

if you installed an odbc driver from oracle (actually, I never had success when using a microsoft oracle odbc driver), then you should be able to add a new "datasource" using the odbc applet in system settings (or run odbcad32.exe) which then could be used for odbc connection string.

LVL 12

Expert Comment

by:Praveen Kumar Chandrashekatr
ID: 40080497
dejandejanovic can you share the extract error while you do the config using the above post i.e 39961480

Author Comment

ID: 40080554
Sure, will do today, latest tomorrow. I was busy this days, and could not review last messages.

Author Comment

ID: 40083266
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
LVL 35

Assisted Solution

sarabande earned 1200 total points
ID: 40083351
type WIN+R and enter odbcad32. then define a datasource in the system dsn tab using the oracle odbc driver.

if the datasource is well-defined you could use it in the odbc connection string for connecting to the oracle db.


Author Comment

ID: 40085578
Well, I have already post 39961480, a picture of ODBC driver under. You can check it.
LVL 35

Accepted Solution

sarabande earned 1200 total points
ID: 40085599
the applet shown in the image is an oracle server applet. as far as I seen from your previous posts you try to use a Microsoft odbc driver for oracle from a client and not from a server.

that hardly fits together.

I strongly would recommend to install an oracle client with oracle odbc driver at your windows client. then use the wizard that came with that client to create a windows datasource for odbc based on the oracle odbc driver. is also would recommend to use a single word without spaces, dashes, slashes, dots as datasource name. if the datasource is made properly, your connect string would need only the datasource name (and username and password if not already configured in the datasource). see

for more details.

note, it is also possible to create a datasource by connect string on the fly but this is much more difficult and success depends on a properly oracle and odbc environment as well.


Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to recover a database from a user managed backup

721 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