今天遇到一个案例,在使用命令修改一个测试服务器(SQL Server 2014标准版)的服务器排序规则时,遇到了下面错误信息

(具体账号信息脱敏处理,随机生成一个账号密码)

The Windows account sa does not exist and cannot be provisioned as a SQL Server system administrator

c:\SQLServer_12.0_Full>Setup /QUIET /ACTION=REBUILDDATABASE  /INSTANCENAME=MSSQL

SERVER /SQLSYSADMINACCOUNTS=sa   /SAPWD=Sa!y#456  /SQLCOLLATION=Chinese_PRC_CI_AS

Microsoft (R) SQL Server 2014 12.00.5000.00

Copyright (c) Microsoft Corporation.  All rights reserved.

The following error occurred:

The Windows account sa does not exist and cannot be provisioned as a SQL Server

system administrator.

Error result: -2061893626

Result facility code: 1306

Result error code: 6

Please review the summary.txt log for further details

后面折腾了很久后,发现这种写法居然是错误的,由于自己在动手之前参考了自己以前写的MS SQL 排序规则总结这篇博文,结果发现自己一些不严谨/错误的地方把自己也给坑了。希望不要把别人也坑了!!!时间太久远了,怎么也想不起当初怎么造就了这样一个错误, 总之,那篇博文里面确实有一个错误的地方。希望以后要引以为戒!

正确的写法为/SQLSYSADMINACCOUNTS参数后指定域账号或本机NT账号,这个可以通过查看帮助信息

c:\SQLServer_12.0_Full>Setup /QUIET /ACTION=REBUILDDATABASE  /INSTANCENAME=MSSQLSERVER

/SQLSYSADMINACCOUNTS=azrnt18\azrnt18    /SAPWD="Sa!y#456" /SQLCOLLATION=Chinese_PRC_CI_AS

Microsoft (R) SQL Server 2014 12.00.5000.00

Copyright (c) Microsoft Corporation.  All rights reserved.

setup /? 或setup  /help查看参数信息,SQLSYSADMINACCOUNTS的介绍、解释如下所示:

SQLSYSADMINACCOUNTS    Windows account(s) to provision as SQL Server system administrators.

也就是说SQLSYSADMINACCOUNTS参数后指定的是有SQL Server管理员权限的Windows账号,由于最上面最上面指定参数的值为sa,所以才会一直报这个错误。

  1. c:\SQLServer_12.0_Full>setup /help

  1. Microsoft (R) SQL Server 2014 12.00.5000.00

  1. Copyright (c) Microsoft Corporation.  All rights reserved.

  1.  

  1. Usage:

  1. setup.exe /[option]={value} /[option]={value} ...

  1.  

  1. Options:

  1. ACTION                       Specifies a Setup work flow, like INSTALL,

  1.                               UNINSTALL, or UPGRADE. This is a required

  1.                               parameter.

  1. ADDCURRENTUSERASSQLADMIN     Provision current user as a Database Engine

  1.                               system administrator for %SQL_PRODUCT_SHORT_NAME%

  1.                               Express.

  1. AGTDOMAINGROUP               Either domain user name or system account

  1. AGTSVCACCOUNT                Either domain user name or system account

  1. AGTSVCPASSWORD               Password for domain user name. Not required for

  1.                               system account

  1. AGTSVCSTARTUPTYPE            Startup type for the SQL Server Agent service.

  1.                               Supported values are Manual, Automatic or

  1.                               Disabled.

  1. ALLINSTANCES                 Specifies that all instances are to be included

  1.                               in the Setup operation. This parameter is

  1.                               supported only when applying a patch.

  1. ALLOWUPGRADEFORSSRSSHAREPOIN

  1.                               RSInputSettings_AllowUpgradeForSSRSSharePointMode_

  1. Description

  1. ASBACKUPDIR                  The location for the Analysis Services backup

  1.                               files.

  1. ASCOLLATION                  The collation used by Analysis Services.

  1. ASCONFIGDIR                  The location for the Analysis Services

  1.                               configuration files.

  1. ASDATADIR                    The location for the Analysis Services data

  1.                               files.

  1. ASLOGDIR                     The location for the Analysis Services log files.

  1. ASPROVIDERMSOLAP             Specifies if the MSOLAP provider can run in

  1.                               process.

  1. ASSERVERMODE                 Specifies the server mode of the Analysis

  1.                               Services instance. Valid values are

  1.                               MULTIDIMENSIONAL and TABULAR. The default value

  1.                               is MULTIDIMENSIONAL.

  1. ASSVCACCOUNT                 The account used by the Analysis Services

  1.                               service.

  1. ASSVCPASSWORD                The password for the Analysis Services service

  1.                               account.

  1. ASSVCSTARTUPTYPE             Controls the service startup type setting for the

  1.                               service.

  1. ASSYSADMINACCOUNTS           Specifies the list of administrator accounts to

  1.                               provision.

  1. ASTEMPDIR                    The location for the Analysis Services temporary

  1.                               files.

  1. BROWSERSVCSTARTUPTYPE        Startup type for Browser Service.

  1. CLTCTLRNAME                  The computer name that the client communicates

  1.                               with for the Distributed Replay Controller

  1.                               service.

  1. CLTRESULTDIR                 The result directory for the Distributed Replay

  1.                               Client service.

  1. CLTSTARTUPTYPE               The startup type for the Distributed Replay

  1.                               Client service.

  1. CLTSVCACCOUNT                The account used by the Distributed Replay Client

  1.                               service.

  1. CLTSVCPASSWORD               The password for the Distributed Replay Client

  1.                               service account.

  1. CLTWORKINGDIR                The working directory for the Distributed Replay

  1.                               Client service.

  1. CLUSTERPASSIVE               Specifies that SQL Server Setup should not manage

  1.                               the SQL Server services. This option should be

  1.                               used only in a non-Microsoft cluster environment.

  1. COMMFABRICENCRYPTION         MATRIXCOMMMESSAGEPROTECTION {0,1}

  1. COMMFABRICNETWORKLEVEL       MATRIXCOMMNETWORKISOLATION {0,1}

  1. COMMFABRICPORT               MATRIXCOMMPORT <port>

  1. CONFIGURATIONFILE            Specifies the configuration file to be used for

  1.                               Setup.

  1. CONFIRMIPDEPENDENCYCHANGE    Indicates that the change in IP address resource

  1.                               dependency type for the SQL Server multi-subnet

  1.                               failover cluster is accepted.

  1. CTLRSTARTUPTYPE              The startup type for the Distributed Replay

  1.                               Controller service.

  1. CTLRSVCACCOUNT               The account used by the Distributed Replay

  1.                               Controller service.

  1. CTLRSVCPASSWORD              The password for the Distributed Replay

  1.                               Controller service account.

  1. CTLRUSERS                    The Windows account(s) used to grant permission

  1.                               to the Distributed Replay Controller service.

  1. ENABLERANU                   Set to "1" to enable RANU for SQL Server Express.

  1. ENU                          Use the /ENU parameter to install the English

  1.                               version of SQL Server on your localized Windows

  1.                               operating system.

  1. ERRORREPORTING               Specify if errors can be reported to Microsoft to

  1.                               improve future SQL Server releases. Specify 1 or

  1.                               True to enable and 0 or False to disable this

  1.                               feature.

  1. FAILOVERCLUSTERDISKS         Specifies a cluster shared disk to associate with

  1.                               the SQL Server failover cluster instance.

  1. FAILOVERCLUSTERGROUP         Specifies the name of the cluster group for the

  1.                               SQL Server failover cluster instance.

  1. FAILOVERCLUSTERIPADDRESSES   Specifies an encoded IP address. The encodings

  1.                               are semicolon-delimited (;), and follow the

  1.                               format <IP Type>;<address>;<network name>;<subnet

  1.                               mask>. Supported IP types include DHCP, IPV4, and

  1.                               IPV6.

  1. FAILOVERCLUSTERNETWORKNAME   Specifies the name of the SQ LServer failover

  1.                               cluster instance.  This name is the network name

  1.                               that is used to connect to SQL Server services.

  1. FAILOVERCLUSTERROLLOWNERSHIP Specifies whether the upgraded nodes should take

  1.                               ownership of the failover instance group or not.

  1.                               Use 0 to retain ownership in the legacy nodes, 1

  1.                               to make the upgraded nodes take ownership, or 2

  1.                               to let SQL Server Setup decide when to move

  1.                               ownership.

  1. FEATURES                     Specifies features to install, uninstall, or

  1.                               upgrade. The list of top-level features include

  1.                               SQL, AS, RS, IS, MDS, and Tools. The SQL feature

  1.                               will install the Database Engine, Replication,

  1.                               Full-Text, and Data Quality Services (DQS)

  1.                               server. The Tools feature will install Management

  1.                               Tools, Books online components, SQL Server Data

  1.                               Tools, and other shared components.

  1. FILESTREAMLEVEL              Level to enable FILESTREAM feature at (0, 1, 2 or

  1.                               3).

  1. FILESTREAMSHARENAME          Name of Windows share to be created for

  1.                               FILESTREAM File I/O.

  1. FTSVCACCOUNT                 User account for Full-text Filter Daemon Host.

  1. FTSVCPASSWORD                User password for Full-text Filter Daemon Host

  1.                               account.

  1. FTUPGRADEOPTION              Full-text catalog upgrade option.

  1. HELP                         Displays the command line parameters usage

  1. IACCEPTSQLSERVERLICENSETERMS By specifying this parameter and accepting the

  1.                               SQL Server license terms, you acknowledge that

  1.                               you have read and understood the terms of use.

  1. INDICATEPROGRESS             Specifies that the detailed Setup log should be

  1.                               piped to the console.

  1. INSTALLSHAREDDIR             Specify the root installation directory for

  1.                               shared components.  This directory remains

  1.                               unchanged after shared components are already

  1.                               installed.

  1. INSTALLSHAREDWOWDIR          Specify the root installation directory for the

  1.                               WOW64 shared components.  This directory remains

  1.                               unchanged after WOW64 shared components are

  1.                               already installed.

  1. INSTALLSQLDATADIR            The Database Engine root data directory.

  1. INSTANCEDIR                  Specify the instance root directory.

  1. INSTANCEID                   Specify the Instance ID for the SQL Server

  1.                               features you have specified. SQL Server directory

  1.                               structure, registry structure, and service names

  1.                               will incorporate the instance ID of the SQL

  1.                               Server instance.

  1. INSTANCENAME                 Specify a default or named instance. MSSQLSERVER

  1.                               is the default instance for non-Express editions

  1.                               and SQLExpress for Express editions. This

  1.                               parameter is required when installing the SQL

  1.                               Server Database Engine (SQL), Analysis Services

  1.                               (AS), or Reporting Services (RS).

  1. ISSVCACCOUNT                 Either domain user name or system account.

  1. ISSVCPASSWORD                Password for domain user.

  1. ISSVCSTARTUPTYPE             Automatic, Manual or Disabled.

  1. MATRIXCMBRICKCOMMPORT        MATRIXCMBRICKCOMMPORT portNumber

  1. MATRIXCMSERVERNAME           MATRIXCMSERVERNAME hostName\instanceName

  1. MATRIXNAME                   MATRIXNAME=<name>

  1. NPENABLED                    Specify 0 to disable or 1 to enable the Named

  1.                               Pipes protocol.

  1. PID                          Specify the SQL Server product key to configure

  1.                               which edition you would like to use.

  1. QUIET                        Setup will not display any user interface.

  1. QUIETSIMPLE                  Setup will display progress only, without any

  1.                               user interaction.

  1. ROLE                         Detailed help for command line argument ROLE has

  1.                               not been defined yet.

  1. RSCATALOGSERVERINSTANCENAME  The SQL Server server for the report server

  1.                               catalog database.

  1. RSINSTALLMODE                RSInputSettings_RSInstallMode_Description

  1. RSSHPINSTALLMODE             RSInputSettings_RSInstallMode_Description

  1. RSSVCACCOUNT                 Specify the service account of the report server.

  1.                               This value is required. If you omit this value,

  1.                               Setup will use the default built-in account for

  1.                               the current operating system (either

  1.                               NetworkService or LocalSystem). If you specify a

  1.                               domain user account, the domain must be under 254

  1.                               characters and the user name must be under 20

  1.                               characters. The account name cannot contain the

  1.                               following characters:

  1.                               " / \ [ ] : ; | = , + * ? < >

  1. RSSVCPASSWORD                Specify a strong password for the account. A

  1.                               strong password is at least 8 characters and

  1.                               includes a combination of upper and lower case

  1.                               alphanumeric characters and at least one symbol

  1.                               character. Avoid spelling an actual word or name

  1.                               that might be listed in a dictionary.

  1. RSSVCSTARTUPTYPE             Specifies the startup mode for the Report Server

  1.                               service. Valid values include Manual, Automatic,

  1.                               and Disabled. The default value for StartupType

  1.                               is Manual, where the server is started when a

  1.                               request is received.

  1. RSUPGRADEDATABASEACCOUNT     RSInputSettings_RSInstallMode_Description

  1. RSUPGRADEPASSWORD            RSInputSettings_RSInstallMode_Description

  1. RULES                        Specifies the list of rule IDs or rule group IDs

  1.                               to run.

  1. SAPWD                        Password for SQL Server sa account.

  1. SECURITYMODE                 The default is Windows Authentication. Use "SQL"

  1.                               for Mixed Mode Authentication.

  1. SQLBACKUPDIR                 Default directory for the Database Engine backup

  1.                               files.

  1. SQLCOLLATION                 Specifies a Windows collation or an SQL collation

  1.                               to use for the Database Engine.

  1. SQLSVCACCOUNT                Account for SQL Server service: Domain\User or

  1.                               system account.

  1. SQLSVCPASSWORD               A SQL Server service password is required only

  1.                               for a domain account.

  1. SQLSVCSTARTUPTYPE            Startup type for the SQL Server service.

  1. SQLSYSADMINACCOUNTS          Windows account(s) to provision as SQL Server

  1.                               system administrators.

  1. SQLTEMPDBDIR                 Directory for Database Engine TempDB files.

  1. SQLTEMPDBLOGDIR              Directory for the Database Engine TempDB log

  1.                               files.

  1. SQLUSERDBDIR                 Default directory for the Database Engine user

  1.                               databases.

  1. SQLUSERDBLOGDIR              Default directory for the Database Engine user

  1.                               database logs.

  1. SQMREPORTING                 Specify that SQL Server feature usage data can be

  1.                               collected and sent to Microsoft. Specify 1 or

  1.                               True to enable and 0 or False to disable this

  1.                               feature.

  1. TCPENABLED                   Specify 0 to disable or 1 to enable the TCP/IP

  1.                               protocol.

  1. UIMODE                       Parameter that controls the user interface

  1.                               behavior. Valid values are Normal for the full

  1.                               UI,AutoAdvance for a simplied UI, and

  1.                               EnableUIOnServerCore for bypassing Server Core

  1.                               setup GUI block.

  1. UpdateEnabled                Specify whether SQL Server Setup should discover

  1.                               and include product updates. The valid values are

  1.                               True and False or 1 and 0. By default SQL Server

  1.                               Setup will include updates that are found.

  1. UpdateSource                 Specify the location where SQL Server Setup will

  1.                               obtain product updates. The valid values are "MU"

  1.                               to search Microsoft Update, a valid folder path,

  1.                               a relative path such as .\MyUpdates or a UNC

  1.                               share. By default SQL Server Setup will search

  1.                               Microsoft Update or a Windows Update service

  1.                               through the Window Server Update Services.

  1. USEMICROSOFTUPDATE           If this parameter is provided, then this computer

  1.                               will use Microsoft Update to check for updates.

  1. X86                          Specifies that Setup should install into WOW64.

  1.                               This command line argument is not supported on an

  1.                               IA64 or a 32-bit system.

  1.  

  1. Full unattended installation example, showing all required parameters:

  1.  

  1.  

  1. setup.exe /Q /IACCEPTSQLSERVERLICENSETERMS /ACTION=install /PID=<validpid> /FEAT

  1. URES=SQL,AS,RS,IS,Tools

  1. /INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT="MyDomain\MyAccount"

  1. /SQLSVCPASSWORD="************" /SQLSYSADMINACCOUNTS="MyDomain\MyAccount "

  1. /AGTSVCACCOUNT="MyDomain\MyAccount" /AGTSVCPASSWORD="************"

  1. /ASSVCACCOUNT="MyDomain\MyAccount" /ASSVCPASSWORD="************"

  1. /RSSVCACCOUNT="MyDomain\MyAccount" /RSSVCPASSWORD="************"

  1. /ISSVCAccount="MyDomain\MyAccount" /ISSVCPASSWORD="************"

  1. /ASSYSADMINACCOUNTS="MyDomain\MyAccount"

  1.  

  1. Press any key to exit...

The Windows account sa does not exist and cannot be provisioned as a SQL Server system administrator的更多相关文章

  1. Migrating Oracle on UNIX to SQL Server on Windows

    Appendices Published: April 27, 2005 On This Page Appendix A: SQL Server for Oracle Professionals Ap ...

  2. SQL Server 2005中更改sa的用户名和密码

    修改数据库SA账号名称的代码如下:  代码如下: Alter LOGIN sa DISABLE Alter LOGIN sa WITH NAME = [systemAccount] "sys ...

  3. SQL Server SA 最佳实践(也许不仅仅是翻译)

    老实说,本文主要部分是翻译的,并且由于英语水平的问题,我没有完全翻译,有些我觉得不重要的就跳过了,目前看来应该八九不离十,或者说不会影响最终效果,对于英语水平好的读者,可以自行查看原文.但这一年里面我 ...

  4. 解决 SQL Server 所有帐号无 sysadmin 权限,且未启用 SQL Server 身份验证,sa 帐号也未启用的问题

    解决 未启用 SQL Server 身份验证 的问题: 1. 运行 regedit,进入注册表编辑器 2. 打开:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Micro ...

  5. SQL Server 2008开启sa账户以及如何用JDBC进行连接

    做实验需要用Java与SQL Server连接,因为使用的 SQL 2008 Express Edition 是基于 Visual Studio2010 安装包安装时一起安装的,所以为了方便数据库的操 ...

  6. 将SQL Server账户对应到Windows系统账户

    应用场景举例: SQL Server账户要访问外部资源,例如所拥有的Job要访问文件系统,而此文件系统需要Windows账户才有权限. 步骤: 1.       服务器新建凭据(Credentials ...

  7. 如何将SQL Server运行到Windows Azure上

    从2012年6月6日开始,Windows Azure上一些强大的新功能现在可用于预览,包括新的Windows Azure虚拟机(VM).其中有关Windows Azure虚拟机最强大的一件事是他们利用 ...

  8. Windows XP系统安装SQL Server 2005(开发版)图解

    转自Windows XP系统安装SQL Server 2005(开发版)图解 安装前提:由于有些从网上的下载的项目需要导入SQL Server 2005的数据文件,因此,今天便安装了这个数据库,我的系 ...

  9. 配置Windows 防火墙,允许SQL Server的远程连接

    在运行SQL Server的服务器上,我们要找到哪些是SQL Server正在侦听的端口,并将其添加到Windows防火墙的入站例外. 首先,我们需要添加 SQL Server 服务侦听 Window ...

随机推荐

  1. Java在已存在的pdf文件中生成文字和图片--基础

    自我总结,有什么不足之处请告知,感激不尽!下一次总结pdf模板映射生成报表(应对多变的pdf报表需求,数据提供和报表生成解耦). 目的:在给定的pdf模板上生成报表,就需要知道最基本的操作:文字添加, ...

  2. 使用hexo搭建个人博客

    安装前提 node.js git 如果缺少以上条件,则前往相应的官网下载安装即可.. 安装hexo $ npm install hexo-cli -g 待安装完成后,执行相关命令查看hexo的信息. ...

  3. 安装 cgilib 0.5

    下载软件包下载链接:http://pan.baidu.com/s/1gdzOiVT 解包tar zxvf cgilib-0.5.tar.gzcd cgilib-0.5 makecp libcgi.a ...

  4. 第一个 HTML5Plus 移动应用

    什么是 HTML5Plus 移动应用 HTML5 Plus移动App,简称5+App,是一种基于HTML.JS.CSS编写的运行于手机端的App,这种App可以通过扩展的JS API任意调用手机的原生 ...

  5. java签名与验签

    基本概念: 加密解密 加密:发送方利用接收方的公钥对要发送的明文进行加密. 解密:接收方利用自己的私钥进行解密. 公钥和私钥配对的,用公钥加密的文件,只有对应的私钥才能解密.当然也可以反过来,用私钥加 ...

  6. webrtc初探之一对一的连接过程(一)

    说明,我研究的是muan-khan的一个github项目,针对的是chrome对chrome,也就是pc对pc的一对一,一对多通话,感兴趣的可以继续往下看. github地址:https://gith ...

  7. bzoj 4826: [Hnoi2017]影魔 [主席树 单调栈]

    4826: [Hnoi2017]影魔 题意:一个排列,点对\((i,j)\),\(p=max(i+1,j-1)\),若\(p<a_i,a_j\)贡献p1,若\(p\)在\(a_1,a_2\)之间 ...

  8. BZOJ 3040: 最短路(road) [Dijkstra + pb_ds]

    3040: 最短路(road) Time Limit: 60 Sec  Memory Limit: 200 MBSubmit: 2476  Solved: 814[Submit][Status][Di ...

  9. python3加密解密模块 cryptography

    cryptography 的目标是成为"人类易于使用的密码学包cryptography for humans",就像 requests 是"人类易于使用的 HTTP 库H ...

  10. zabbix 网络模板自动发现端口时,过滤掉某些特定规则的端口,减少item的方法

    1.需求描述        默认情况下Zabbix 模板 中网络接口自动发现接口时,会产生很多item,有时候会有我们不需要的一些接口,这时候需要过滤掉他们.        比如我有一台运行kvm的服 ...