11
Aug
06

Oracle 10g instant client – Hard to make it work

Oracle 10g works fine with oracle 8i clients. SQL plus, toad, they connect fine using the oracle 8i client.

But there are some reasons why it’s a good idea to move to Oracle 10g client.

1) Oracle 10g has an instant client which is very light 254 KB compared to 259MB for the runtime client.
2) Oracle 8i is getting a bit old and won’t be supported anymore.

3) It’s good to have some homogeneity in the IT parc. (at least for Oracle,not for printers but that’s another history)

So, I’ve been testing the instant client a bit because I found it cool.

It install just the basic to connect using TNS or ODBC. It doesn’t install any tools of its own. It means that when you install that client you might have some tools or application of your own to work with.

Things to know when Installing 10g instant client

1) After installing the Oracle 10g instant client, a new environment variable must be created.

Go to control panel> system> advanced tab> Environment variable.

Create a new system variable called TNS_ADMIN.

In the Value field, put the path where your tnsnames.ora and sqlnet.ora will be located.

Note: If you already have a folder called like that from Oracle forms for example, just point to that folder. It makes less work for future maintenance.

2) Very often, if not all the time, after installing the client, I tried to create my first Oracle 10g ODBC.But I got the following error message:

“The setup routines for the Oracle in instantclient10_2 ODBC Driver could not be loaded due to system error code 126″

followed by:

“Could not load the setup or translator library”

Well it’s an error, let’s check Metalink to see what they say about it.

Brilliant! They describe the error exactly as I have it.

Here is the article. You will need a metalink login to get it.

What Oracle say

Cause

This error may occur for the following two reasons.

1. There is not a mfc71.dll and msvcrt.dll located on the pc that the Instant Client is installed on.

2. The directory that mfc71.dll and msvcrt.dll is in is not included in the path environment variable.

and

Solution

To implement the solution, please execute the following steps:

1. Find the mfc71.dll and msvcrt.dll if it on your pc and include the directory in which it is in in the path variable. It is normally found in the C:\WINDOWS\system32 directory. Or copy mfc71.dll and msvcrt.dll to the directory where the instant client is installed.

2. If you have installed the full Oracle Client and ODBC Drivers for version 10.2.0.1 both mfc71.dll and msvcrt.dll are located in the ORACLE_HOME\bin directory

It couldn’t be that easy


Ok. First of all I check if the two dlls are on my test computer. I check ORACLE_HOME\bin

None of them are in it. So it seems the instant client doesn’t install a couple of required dlls. But apparently windows should have it.

If it is, there are 2 solutions:

a) Modify the “path” variable in Control Panel>System>advance tab> environment variable> system variable and add the path where the dll should be. Logically it’s C:\windows\system32.

b) Copy the dlls from C:\windows\system32 to the location specify in the “path” environment described at point a)

OK let’s copy them: I found msvcrt.dll but there was no mfc71.dll in system32. I’m using Windows XP. I’ve tried with Windows 2000 too.

I had a runtime client installed on my computer to manage oracle. I decide to copy them from the bin folder on my computer and into the location specified in “path” on the test computer.

I have to admit at that point that I thought it would work. Well it didn’t.

I finally cleaned up the instant client installation 254KB and installed the runtime client 259MB.

Then I wanted to create my finally working ODBC connection.

Oupsy: There’s no ODBC driver installed with the runtime client.

But this time it’s easy.

On top of that runtime client, make a new installation but this time customized, make sure to use the same home. Locate Oracle 10g ODBC and install it.

Finally, it’s possible to enjoy the new ODBC driver.

Summary

To get Oracle 10g ODBC driver installed and working on your computer:

1) Install Oracle runtime client

2) Install Oracle 10g ODBC driver on top of that using a customized installation.

About these ads

67 Responses to “Oracle 10g instant client – Hard to make it work”


  1. 1 Daniel
    September 8, 2006 at 9:20 pm

    I follow your instructions above and got “ORA-12154: TNS: could not resolve the connect identifier specified” when I tried to connect.

  2. September 9, 2006 at 7:32 am

    hi Daniel,

    I would need to know a bit more about what you have installed in order to help you.

    ORA-12154 however is a problem with your tnsnames.ora file

    If you are using instant client make sure you have specified the path in your system environment variable.

    It might also be a configuration problem inside your tnsnames.ora.

    Your configuration of Oracle runtime might be good already.

  3. 3 Jim Lawrence
    October 20, 2006 at 8:15 pm

    I went through the initial Oracle installation and followed that process up with the suggestions above and still the error “The setup routines for the Oracle in instantclient10_2 ODBC Driver could not be loaded due to system error code 126″ keeps coming up…

    TSNames placed, envronment variables set, paths adjusted, dlls positioned, ODBC drivers installed etc (even a reboot and a full registry check) have all been tried a number of times. There must be some small issues that is stopping the application from finding the dlls.

    Would virtual PC, MS windows 2003 be an issue?
    It is just no working… but at least it is consistent.

  4. October 23, 2006 at 8:50 pm

    There was one file that had been overlooking in the solution. It is apparently a 16 bit dll as it is normally stored in the windwos system directory. Th file name is ‘msvcr71.dll’. As soon as reference was provided to this file everything worked.

  5. October 24, 2006 at 4:23 am

    Hi Jim,

    thanks a lot for this information. How did you found that!

  6. 6 Karthik
    April 12, 2007 at 6:41 am

    Hi,

    My application hangs when i’m connecting to a 10g server from Windows 2003 server. The same application works fine if the application is installed in a windows 2000 server. The application is a VB application. The process involves lot of queries. Basically it creates lot of tables. The process does not fail a particular query. it is random.

    Could you please tell if there is any specific setting that needs to be done for Windows 2003.

    Thanks in advance,
    Karthik.

  7. April 12, 2007 at 11:24 am

    Hi.

    I need a little more informations first:

    1) On what platform is your server running?
    2) On what platform is your client running (even if the client is a server)
    3) What connection method are you using?
    4) Have you installed oracle 10g instant client or is it an 8i client (8i client can run with 10g DB for tns connection but not ODBC)

    let me know your answers. I’ll try to help with that.

    Thanks for posting here.

  8. 8 Raul
    August 8, 2007 at 9:04 pm

    Tnxs. Your env. variables comment comment help me. It works, so I calm me down.

  9. 9 CRACKERZ
    October 2, 2007 at 5:12 am

    HI,

    CAN YOU TELL ME WHAT TO PUT IN THE VARIABLE VALUE IN THE ENVIRONMENT VARIABLE… I FOLLOWED YOUR PROCESS BUT I CANT FIND THE TNS WHEN IM CREATING AN ODBC… THANKZ

  10. October 3, 2007 at 2:19 am

    Concerning the environment variable,

    the variable to create is:
    TNS_ADMIN
    The value is:
    the location of te tnsnames.ora (c:\oracle\product\102\network\admin for example)

  11. 11 Mukesh Shah
    December 5, 2007 at 5:49 pm

    Thank you very much. This is exactly I was looking for.

  12. April 22, 2008 at 11:43 pm

    This really helped , I am unix / linux guy not a windows guy. Thank U very much

  13. May 7, 2008 at 2:42 am

    i tried it, but still get error.. :(

  14. August 1, 2008 at 8:55 am

    Copying the missing mfc71.dll from an XP-System to the failing 2003-Machine worked for me! (msvcrt.dll was already present on 2003)

    Excellent. Saved my day!

  15. 15 Dibya mani
    August 6, 2008 at 6:54 am

    Very Thanks to this solution.

  16. 16 Pandincus
    August 14, 2008 at 1:08 pm

    “Oupsy: There’s no ODBC driver installed with the runtime client.”

    That little tidbit saved my life. Thank you, sir!

  17. 17 ruby
    September 1, 2008 at 7:34 am

    Hello Nicolas,
    I am new to oracle.I installed oracle client on my windows m/c, created an environment variable
    TNS_ADMIN = C:\oracle\product\10.2.0\client_1\NETWORK\ADMINTITLE.

    1)I am not able to ping the server from my local machine.But from other server i am able to ping the oracle server.

    2)When i am trying to test the service through NetManager i am gettig error

    The test did not succeed.
    ORA-12170: TNS:Connect timeout occurred
    There may be an error in the fields entered,
    or the server may not be ready for a connection.

    3) While testing the ODBC connection following error is thrown :

    ORA – 12170: TNS:Connection Timeout occured
    —————————
    Testing Connection
    —————————
    Unable to connect
    SQLState=S1000
    [Oracle][ODBC][Ora]ORA-12170: TNS:Connect timeout occurred

    —————————
    OK
    —————————

    Please let me know what all settings are required for making the client work. Please help me out with this.

    Thanks & Regards
    Ruby Agarwal

  18. 18 ruby
    September 30, 2008 at 3:26 pm

    I got an error that it couldn’t append to the PATH variable because it was too long, and when I tried to add an Oracle datasource :-setup routine could not be loaded due to system error code 988. Please suggest what to do ?

  19. 19 ruby
    September 30, 2008 at 3:28 pm

    Can i just install the oracle provider and will it work? Or client is also necessay?

  20. October 1, 2008 at 7:41 am

    Hi. If you want to use ODBC for Oracle, the easiest way would be to install the Oracle runtime client.

    Oracle instant client is a bit special and requires special care. If you follow the instructions above, you should be able to get it to work.

    Nico

  21. 21 Matt70
    December 12, 2008 at 7:21 pm

    I had the same issue but was trying to use the 11g instant client in a VirtualPC image of XP Pro. I skipped all the BS about the dlls as I already had tried copying those and it did nothing. What you said in the summary was the fix – thanks!

  22. 22 Gaurav Rachchh
    January 16, 2009 at 12:41 pm

    Hi ,
    We are using secure oracle 10g instant client on windows XP and using oracle 10g server enterprise edition on Linux machine.
    We are running query using VB application. But our application hangs if we keep it open for 10-15 minutes. We are facing this issue when we use oracle client on secure layer(2484). It works fine if we use oracle client without security(1521).

    What could be reason ? Any ideas…

    Thanks in advance ,
    Gaurav

  23. 23 Craig Smith
    January 30, 2009 at 10:12 pm

    I tried setting up the 11.1 instant client but was unable to get it to work with Toad 8.6. I than tried 10.2 instant client and it worked fine.

  24. 24 soniyora
    January 31, 2009 at 11:18 pm

    hi…im newbie in oracle
    i try with hard connection to oracle in win 2003 via NAVICAT ( client tools ) in the same PC (localhost) but it doesnt connect …. i have downloaded instantclient oracle
    i have extracted it in “c:\instantclient” so the result is “c:\instanclient\instantclient_10_2\….any file”
    and i have set the environment variable “PATH” like this “C:\instantclient” for instantclient
    and TNS_ADMIN “C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN” but it still not connect…” please help me…

    thanks.

  25. March 11, 2009 at 9:47 pm

    Thanks!
    Good resource!

    BTW: Could you faced with unstable connection – sporadically getting ORA-12545?

    brgds
    Janeks

  26. March 12, 2009 at 9:33 pm

    I found what is the reason, for that sporadic error:
    Despite I have in tnsnames.ora only IP addreses I need to have them also in hosts file.
    Now it just works.

  27. 27 Hermann
    March 20, 2009 at 7:49 am

    THANKS A LOT!!!!!!

    One week to find this site, now it works!

    Hermann

  28. March 25, 2009 at 8:18 pm

    Thank you very much for the adding the system variable property for having windows find the tnsnames.ora and sqlnet.ora files for the Toad log on (ORA-12154 error message). I did not think I was going to find a solution.

  29. 29 Satish
    May 28, 2009 at 7:06 pm

    Cool…I was getting ORA-12154 but when I defined the TNS_ADMIN env variable it got resolved. Thanks for posting useful details.

  30. 30 Paulo Melo
    June 3, 2009 at 10:56 am

    ODBC had error code 126 after installing “ODTwithODAC1110621.zip” (setup.exe inside, of course). Resolved by copying file mfc71.dll to client_1 directory.
    It seems this DLL is still missing in installation package.

  31. 31 jayapal
    July 1, 2009 at 2:52 pm

    Setting TNS_ADMIN resolved my “ORA-12154 error” , i think this variable is mandatory for 10G client users.

  32. 32 Carlos M
    December 1, 2009 at 9:58 pm

    you are a god send, downloaded mfc71.dll and it worked thanks man :)

  33. 33 Charles
    January 13, 2010 at 9:40 pm

    I wish more people would explain these things like you did. Great work! Fixed my problem

  34. 34 david
    March 1, 2010 at 11:49 am

    Thank you for this explanation and assistance, but
    When I download the Instant Client Package – Basic (instantclient-basic-win32-10.2.0.4.zip) it does not contain the files (mfc71.dll and msvcr71.dll and TNSNAMES.ORA) how we get it?
    Thank you again

  35. June 11, 2010 at 12:49 pm

    Very Good! Bro Thanks!!! It works for me :)

  36. 36 Gaurav Rachchh
    June 11, 2010 at 8:15 pm

    Hi All,

    Following problem got solved by applying Oracle Patch 7118478 (100% CPU) on server side.

    We are using secure oracle 10g instant client on windows XP and using oracle 10g server enterprise edition on Linux machine.
    We are running query using VB application. But our application hangs if we keep it open for 10-15 minutes. We are facing this issue when we use oracle client on secure layer(2484). It works fine if we use oracle client without security(1521).

    One more thing
    We want to use instant client by not setting TNS_ADMIN and SQL_PATH variable but by keeping “installation files and binaries which uses database” at same path.
    will it work? Can anyone provide search order for tnsnames.ora and sqlnet.ora files ?

    Thanks in advance,
    Gaurav

  37. 37 Gaurav Rachchh
    June 11, 2010 at 8:18 pm

    We want to use oracle instant client by not setting TNS_ADMIN and SQL_PATH variables but by keeping “installing files and binaries which uses database” in the same directory. Will it work? what is search order to find “tnsnames.ora” and “sqlnet.ora” files…

    Thanks in advance,
    Gaurav

  38. 38 Rohit
    September 15, 2010 at 7:25 pm

    “Create a new system variable called TNS_ADMIN.”
    That was all I had to do! Thank you so much..

  39. 39 Jackob Oram
    October 11, 2010 at 6:41 pm

    I recently came across your blog and have been reading along. I thought I would leave my first comment.
    I don’t know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.
    Thank You
    PowerBuilder Application development

  40. 40 Deidre
    November 3, 2010 at 5:17 pm

    Thanks, this article really helped me!!!!

  41. 41 Rahul
    November 24, 2010 at 7:45 pm

    Awesome! it worked!

  42. 42 Anitha
    November 26, 2010 at 5:41 pm

    Hello im trying to install oracle instant client and odbc packages
    when i extract them both have the same name
    so can any one guide how do i go about making work

  43. 43 hari
    June 27, 2011 at 11:29 am

    after windows 2003 server SP2 OS installation, I Changed my system host name .but this time it’s not connecting ORCLE hostname and CS6.5 host name. already I created TNS_ADMIN, but this error came( ORA-12154 TNS: could not resolve the connect identifier specified ).please help me how to coneect correct host name.This is my mistake (old hostname=hari-212345 but I changed new hostname=admin)..please again once help me.

  44. 44 hari
    June 27, 2011 at 11:30 am

    after windows 2003 server SP2 OS installation, I Changed my system host name .but this time it’s not connecting ORCLE hostname and CS6.5 host name. already I created TNS_ADMIN, but this error came( ORA-12154 TNS: could not resolve the connect identifier specified ).please help me how to coneect correct host name.This is my mistake (old hostname=hari-212345 but I changed new hostname=admin)..please again once help me.

  45. 45 Henry
    December 8, 2011 at 7:43 pm

    I follow the instructions but got “The setup routines for the Oracle in OracClient10g_home1 ODBC driver could not be loaded due to sytem error code 126.”

  46. April 20, 2013 at 11:35 am

    I read this paragraph fully about the difference of
    most up-to-date and previous technologies, it’s awesome article.

  47. April 23, 2013 at 1:14 pm

    There are definitely numerous particulars like that to
    take into consideration. That is a great point to carry up.
    I supply the ideas above as basic inspiration but clearly there
    are questions like the one you convey up where crucial factor will likely be working in sincere good faith.
    I don?t know if best practices have emerged around
    issues like that, but I’m sure that your job is clearly recognized as a fair game. Each girls and boys really feel the impression of just a moment’s pleasure, for the remainder of their lives.

  48. May 24, 2013 at 6:43 pm

    Dan Oh Well, if we remove hydro solar energy sources, such as massive wind
    turbines. While solar and wind investment, respectively.

  49. May 24, 2013 at 6:52 pm

    Whether consciously or unconsciously, you are told to mute that string with your strumming hand on the fret board to produce
    multiple notations and different sounds. New gig bags for trombone for 2012!
    The process is compressed into 3 minutes and annotated in a way that translates into equal opportunity.

  50. June 4, 2013 at 2:50 am

    Good site you’ve got in here.

  51. August 4, 2013 at 7:26 pm

    Hi to every body, it’s my first visit of this blog; this webpage consists of awesome and genuinely fine information designed for readers.

  52. August 5, 2013 at 2:51 pm

    hey there and thank you for your info – I have certainly picked up anything new from right here.
    I did however expertise some technical issues using this site,
    since I experienced to reload the web site many times
    previous to I could get it to load properly. I had been wondering if your hosting is OK?
    Not that I am complaining, but slow loading instances times will
    sometimes affect your placement in google and
    can damage your high-quality score if advertising and marketing with Adwords.
    Well I’m adding this RSS to my e-mail and could look out for a lot more of your respective interesting content. Ensure that you update this again very soon.

  53. 53 David Perry
    August 6, 2013 at 12:18 am

    Ok, a few errors about the latest drivers from Oracle needing MSVCR71.dll when trying to add a DSN via OBDC Administrator – The latest drivers require version 10 of the Microsoft Visual C Runtimes. You can download this from Microsoft for free… The downgrading tip only works because it only requires MSVCR71.dll… I used FileMon from Sysinternals to identify what was upsetting Windows…

  54. 54 KeiKei
    August 21, 2013 at 10:22 am

    Thanks David! We installed latest Oracle Instant Client and ODBC driver (both versions 12.1.0.1.0) and were getting this system error code 126. Downloading and installing Microsoft Visual C++ 2010 Redistributable Package (x86) from Microsoft did the trick.

  55. 55 Kaushal
    November 6, 2013 at 3:18 am

    Thank you both Nico and Jim Lawrence. I was trying to setup a the 32 bit ODBC connection to the Oracle database on a Windows Server 2008 R2. Followed Nico’s steps and then copied the msvcr71.dll to the location where the sqora32.dll is located.

  56. February 15, 2014 at 2:59 pm

    The brick and mortar casinos to perform these games slots casino at cost-free of expense.
    Since, internet websites have lots of fun here while gambling through the thrilling games of
    this site. Many individuals are suffering from
    any style for your accent and also implemented their particular put icons.

  57. August 18, 2014 at 3:50 pm

    Wonderful beat ! I wish to apprentice while you amend your site,
    how could i subscribe for a blog site? The account aided me
    a acceptable deal. I had been a little bit acquainted of this your broadcast offered bright clear concept

  58. September 7, 2014 at 1:53 am

    porn movie, porn, rough sex, hard anal, brutal rape

  59. September 10, 2014 at 5:23 pm

    Hi, I think your site might be having browser compatibility issues.
    When I look at your website in Opera, it looks fine but when opening in Internet Explorer, it has
    some overlapping. I just wanted to give you a quick
    heads up! Other then that, very good blog!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: