none
Sql Native client :/ RRS feed

  • Question

  • Hello SQL community , first of all thanks you to take the time to read my post :) .

    Si I've a problem with IIS , with my php script :

    function dbOpen($dbName) {
    			if (!$this->sqlLink) {
    				include_once("$this->config");
    				global $shardDbName;
    				global $accountDbName;
    				global $accountDbPWD;
    				global $mssql_server;
    				$db = array("Database"=>"$dbName", "UID"=>"$accountDbName", "PWD"=>"$accountDbPWD");
    				$this->mssql_server = $mssql_server;
    				$this->sqlLink = sqlsrv_connect($mssql_server, $db);
    				if (!$this->sqlLink) {
    					edie(print_r(sqlsrv_errors(), true));
    				}
    				
    				return;
    			} else {
    				exit;
    			}
    		}

    And I've this error :

    Array ( [0] => Array ( [0] => IMSSP [SQLSTATE] => IMSSP [1] => -49 [code] => -49 [2] => This extension requires the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712 [message] => This extension requires the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712 ) [1] => Array ( [0] => IM002 [SQLSTATE] => IM002 [1] => 0 [code] => 0 [2] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified [message] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified ) ) 

    I've IIS 7 , SQL Server 2008 R2 Developper.

    When I try to install SQl native Client 2012 I've an error :

    http://upload.gaming-box.net/pictures//1357002984.png

    Thanks for you help ;)


    • Edited by Mixizi Tuesday, January 1, 2013 2:25 AM
    Tuesday, January 1, 2013 1:16 AM

All replies

  • Hi Mixizi,

    Are you using a 32-bit operating system? If so, please download Microsoft SQL Server 2008 R2 Native Client for x86. If you are using a 64-bit operating system, please go to “Programs and Features” to check whether there is a installed program named Microsoft SQL Server 2008 R2 Native Client, if so, please remove it and install Microsoft SQL Server 2008 R2 Native Client for x64. For your convenience, I listed the download links below:

    Microsoft SQL Server 2008 R2 Native Client for x86
    http://go.microsoft.com/fwlink/?LinkID=188400&clcid=0x409

    Microsoft SQL Server 2008 R2 Native Client for x64
    http://go.microsoft.com/fwlink/?LinkID=188401&clcid=0x409


    Allen Li
    TechNet Community Support

    Wednesday, January 2, 2013 2:48 AM
    Moderator
  • @Allen - that's not quite right, SQLSRV 3.0 requires SQL Server 2012 Native Client.

    @Mixizi - please check the Windows Event Log to try to find out why the installer failed for SQL Server Native Client.  Once you have installed it, I think the PHP driver will work...  make sure you select the correct version for your OS which is probably x64 (64 bit), but could be x86 (32 bit).  Here is a link: SQL 2012 Native Clients.


    Rob


    • Edited by Robert Johnson Thursday, January 3, 2013 12:08 PM irrelevant
    Wednesday, January 2, 2013 10:23 AM
  • Hello , thanks you for you answer.

    So first of all , I've try the Alien Li idea , didn't work at all :/

    And then Robert, I've try your php code that didn't change anything but thanks you for the correctif.

    I've try the x64 and x86 and only x64 work with the error , always the error so I check the log and there is :

    Beginning a Windows Installer transaction: C:\Users\Administrator\Downloads\sqlncli.msi. Client Process Id: 15800.

    Product: Microsoft SQL Server 2012 Native Client  -- Installation failed.

    Windows Installer installed the product. Product Name: Microsoft SQL Server 2012 Native Client . Product Version: 11.0.2100.60. Product Language: 1033. Installation success or error status: 1603.

    Thursday, January 3, 2013 4:14 AM
  • I deleted the hints about your code from my earlier post, it was marked as unrelated, but obviously befuddled the answer.

    Did you run the Native Client 2012 X64 installer as an administrator?  You might need to right click, and 'run as'. 

    If it still doesn't work, you have to ask a different forum: SQL Server Data Access


    Rob

    Thursday, January 3, 2013 12:13 PM
  • Yes , I've run it with X64 as Admin and didn't work :/ ..

    Anyways , thanks you for your fast reply  :)

    Friday, January 4, 2013 3:09 AM
  • Hi, what’s your Windows version? Please refer to the following link to make sure that the system meets the requiements.

    http://www.microsoft.com/en-us/download/details.aspx?id=29065


    Allen Li
    TechNet Community Support

    Wednesday, January 9, 2013 9:04 AM
    Moderator