SQL Native Client - 如何确定是否安装了32位或64位?

时间:2016-01-08 13:09:36

标签: sql-server client windows-server-2012

我们在服务器上有SQL Server 2012 Native Client - 如何确定数据库客户端的版本是32位还是64位?

这对我们来说非常重要,因为应安装在特定Windows Server 上的版本必须 32位但我不确定安装了哪个版本?

4 个答案:

答案 0 :(得分:0)

您可以在主Db上使用以下查询来查找您正在运行的版本,无论是X64(64位)还是X86(32位):

SELECT @@VERSION

答案 1 :(得分:0)

尝试运行此

    /*=============================================
  File: SQL_Server_without_AWE_WOW64_check.sql

  Author: Thomas LaRock, http://thomaslarock.com/contact-me/
  http://thomaslarock.com/2013/01/how-to-determine-if-you-are-running-a-32-bit-version-of-sql-server-on-a-64-bit-os

  Summary: This script will check to see if you have an instance of SQL
        Server 32-bit running on a 64-bit O/S without AWE enabled. 

  Date: January 9th, 2013

  SQL Server Versions: SQL2005, SQL2008, SQL2008R2, SQL2012

  You may alter this code for your own purposes. You may republish
  altered code as long as you give due credit. 

  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
  OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
  LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR
  FITNESS FOR A PARTICULAR PURPOSE.

=============================================*/

WITH Bit_Version (os_bit_ver, sql_bit_ver, name, value_in_use)
AS
(
 SELECT RIGHT(SUBSTRING(@@VERSION, CHARINDEX('<', @@VERSION), 4), 2), 
 RIGHT(SUBSTRING(CONVERT(varchar,SERVERPROPERTY('Edition'))
      , CHARINDEX('(', CONVERT(varchar,SERVERPROPERTY('Edition'))), 3), 2),
 name, value_in_use
 FROM sys.configurations
 WHERE name = 'awe enabled' 
)
SELECT CASE
 WHEN os_bit_ver = '64' AND sql_bit_ver <> '64' AND value_in_use = 0 THEN 'BAD!'
 ELSE 'GOOD!'
 END AS [IsThisABadThing]
FROM Bit_Version

这不是我的,我得到它Here

答案 2 :(得分:0)

我不认为可以从SQL Server获得答案。运行客户端应用程序,打开任务管理器,找到应用程序进程并在进程名称中查找*32后缀会更简单。

答案 3 :(得分:0)

检查此键:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SLQNCLI11\InstalledVersion

source