ODBC connection from Windows 7 64 Bit Machine to Sql Server 2005 with 64 Bit Odbc driver

Answered ODBC connection from Windows 7 64 Bit Machine to Sql Server 2005 with 64 Bit Odbc driver

  • 2. července 2012 12:52
     
     

    Hi,

    First of all, I have read all the questions forum regarding topics coming around this topic.

    My problem is that

    1. I'm using 64 Bit Application on Window 7 - 64 Bit machine and I wish to make ODBC connection to connect to MS SQL server 2005   running on 32 Bit remote machine.

    2. Development environment is MS Visual Studio 2005 on VC++ with 64 Bit components.

    2. My application works just fine If I use my applications 32 bit version on same  Window 7 - 64 Bit machine.

    3. I have tried C:\windows\odbcad32.exe and C:\windows\syswow64\odbcad32.exe also for creating system DSN's.

    4. Telnet is enabled on Windows 7 -  64 Bit machine and firewall is not blocking my SQL server connection.

    5. Remote connectivity is enabled on SQL server machine.

    Can someone tell that why my ODBC connection fails with same parameters on Windows 7 - 64 Bit machine and at the same time it works just fine if I use my application's Windows 7 - 32 Bit version build??

Všechny reakce

  • 4. července 2012 5:24
     
     Odpovědět

    For such situations , I do forecast there is an alias configured for native client component  32 bit rather than that 64 bit one, thereby I do recommend to work out the below :

    Open Computer Management >>>Services +Applications >>>SQL Server Configuration Manager>> you will find 2 SQL Server native client components , one for 32 bit and the other one is the default ( 64 bit)

    >>You can clone the same alias (If exists) within 32 bit component to that one 64 bit or even it doesn't exists , you can work out to boost network connectivity performance by cutting off the time consumed in estimating the appropriate network protocols as follows:

    Alias>>>Add> select TCP/IP protocol from left panel >>put the connection string within Server name command box>> and assign the appropriate alias (Might be the same as server name)>>>>mark out dynamic port to be static like 1433 according to your used SQL port 

    Kindly work out it and let me know your feedback if still persist or not to be able to jump to other assumptions


    Shehap (DB Consultant/DB Architect) Think More deeply of DB Stress Stabilities

  • 4. července 2012 6:22
    Moderátor
     
     

    Hi Sachin,

    Thanks for your post!

    What’s the ODBC driver you use to connect SQL Server? (name, version) What’s the error you received when the connection failed?

    Please provide the information above for us to detect the problem.


    Best Regards,
    Iric
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • 3. srpna 2012 5:40
     
     Odpovědět

    Hi Iric and Shehap,

    Thanks for the replies and sorry for belated response.

    My problem got solved by making following registry changes.

    HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\(Your DSN NAME) and key

    from Driver = %WINDIR%\system32\sqlsrv32.dll

    to      Driver = C:\WINDOWS\system32\sqlsrv32.dll

    Thanks everybody,

    Regards,

    Sachin Saitwal