注意下面的参数必须要指定的: /q:完全没有界面 /qs:有界面,界面只是作为显示进度的用途 /IACCEPTSQLSERVERLICENSETERMS:接受许可条款 /PID:产品密钥 指定 SQL Server 版本的产品密钥。如果未指定此参数,则将使用 Evaluation。 马上进行安装 安装需要
注意下面的参数必须要指定的:
/q:完全没有界面
/qs:有界面,界面只是作为显示进度的用途
/IACCEPTSQLSERVERLICENSETERMS:接受许可条款
/PID:产品密钥 指定 SQL Server 版本的产品密钥。如果未指定此参数,则将使用 Evaluation。
马上进行安装
安装需要等待一段时间,这时候你就可以继续安装其他的服务器了
经过漫长的等待,SQLSERVER2008R2安装好了
安装好后,有几个地方需要关注的:
(1)已经开启混合验证:使用sa登录SSMS
(2)Windows登录用户的用户名是不是 当前计算机名\administrator
(3)sqlserver、 sql agent、 sql browser 这些服务的启动帐号,是否设置正确,这些服务是否已经启动
关于权限:
sqlserver服务如果不是localsystem,是没有读取磁盘文件的权限的
sqlserver服务如果不是networkservice,是没有读取网络文件的权限的
客户要求一般都是只需要设置sqlserver服务启动帐号和 sql agent启动帐号为localsystem就可以了
(1)和(2)我们打开SSMS
登录进去之后禁用sa
(3)我们打开服务管理器
更改sqlserver和sql agent的启动帐号为localsystem,并且重启sqlserver
SQLSERVER2008R2安装完毕
静默安装SQLSERVER补丁
打开cmd,打开SQLSERVER补丁所在文件夹,我的SQLSERVER补丁就放在安装文件夹同一个文件夹下面
把补丁拖进去cmd里面,然后把下面这些参数复制进去
<span>/</span>allinstances <span>/</span>quiet <span>/</span>IACCEPTSQLSERVERLICENSETERMS
或者使用下面的参数
<span>/</span>instancename<span>=</span>"MSSQLSERVER" <span>/</span>quiet <span>/</span>IACCEPTSQLSERVERLICENSETERMS
一个指定实例名,一个不指定,我使用的是不指定实例名,就是使用/allinstances
具体参数的含义和有哪些参数可以参考这篇文章:Installing SQL Server Service Pack Silently
我在测试的时候发现 ,指定/reportonly参数会报错,不知道怎么回事
如果不指定许可条款也会报错
summary.txt文件的路径:
C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log
summary.txt文件的内容
<span>Overall summary: Final result: 已通过,但需要重新引导,请查看日志了解详细信息 </span><span>Exit</span> code (<span>Decimal</span>): <span>3010</span> <span>Exit</span><span> message: 已通过,但需要重新引导,请查看日志了解详细信息 Start time: </span><span>2014</span><span>-</span><span>01</span><span>-</span><span>10</span> <span>09</span>:<span>46</span>:<span>26</span> <span>End</span> time: <span>2014</span><span>-</span><span>01</span><span>-</span><span>10</span> <span>10</span>:<span>07</span>:<span>47</span><span> Requested action: Patch Instance MSSQLSERVER overall summary: Final result: 已通过,但需要重新引导,请查看日志了解详细信息 </span><span>Exit</span> code (<span>Decimal</span>): <span>3010</span> <span>Exit</span><span> message: 已通过,但需要重新引导,请查看日志了解详细信息 Start time: </span><span>2014</span><span>-</span><span>01</span><span>-</span><span>10</span> <span>09</span>:<span>48</span>:<span>18</span> <span>End</span> time: <span>2014</span><span>-</span><span>01</span><span>-</span><span>10</span> <span>10</span>:<span>06</span>:<span>06</span><span> Requested action: Patch Machine Properties: Machine name: PC0107VLX Machine processor </span><span>count</span>: <span>2</span><span> OS version: Windows XP OS service pack: Service Pack </span><span>3</span><span> OS region: 中华人民共和国 OS language: 中文(中华人民共和国) OS architecture: x86 Process architecture: </span><span>32</span><span> 位 OS </span><span>clustered</span><span>: 否 Product features discovered: Product Instance Instance ID Feature Language Edition Version </span><span>Clustered</span><span> Sql Server </span><span>2008</span> R2 MSSQLSERVER MSSQL10_50.MSSQLSERVER 数据库引擎服务 <span>1033</span> Enterprise Edition <span>10.50</span>.<span>1600.1</span><span> 否 Sql Server </span><span>2008</span> R2 MSSQLSERVER MSSQL10_50.MSSQLSERVER 数据库引擎服务 <span>2052</span> Enterprise Edition <span>10.50</span>.<span>1600.1</span><span> 否 Sql Server </span><span>2008</span> R2 管理工具 <span>-</span> 基本 <span>2052</span> Enterprise Edition <span>10.50</span>.<span>1600.1</span><span> 否 Sql Server </span><span>2008</span> R2 管理工具 <span>-</span> 完整 <span>2052</span> Enterprise Edition <span>10.50</span>.<span>1600.1</span><span> 否 Sql Server </span><span>2008</span> R2 客户端工具连接 <span>2052</span> Enterprise Edition <span>10.50</span>.<span>1600.1</span><span> 否 Sql Server </span><span>2008</span> R2 客户端工具向后兼容性 <span>2052</span> Enterprise Edition <span>10.50</span>.<span>1600.1</span><span> 否 Sql Server </span><span>2008</span> R2 客户端工具 SDK <span>2052</span> Enterprise Edition <span>10.50</span>.<span>1600.1</span><span> 否 Sql Server </span><span>2008</span> R2 Integration Services <span>2052</span> Enterprise Edition <span>10.50</span>.<span>1600.1</span><span> 否 Package properties: Description: SQL Server </span><span>Database</span> Services <span>2008</span><span> R2 ProductName: SQL2008 Type: RTM Version: </span><span>10</span><span> SPLevel: </span><span>2</span><span> KBArticle: KB2630458 KBArticleHyperlink: http:</span><span>//</span>support.microsoft.com<span>/</span>?kbid<span>=</span><span>2630458</span><span> PatchType: SP AssociatedHotfixBuild: </span><span>0</span><span> Platform: x86 PatchLevel: </span><span>10.52</span>.<span>4000.0</span><span> ProductVersion: </span><span>10.50</span>.<span>1600.1</span><span> GDRReservedRange: </span><span>10.0</span>.<span>1000.0</span>:<span>10.0</span>.<span>1099.0</span>;<span>10.0</span>.<span>3000.0</span>:<span>10.0</span>.<span>3099.0</span><span> PackageName: SQLServer2008R2</span><span>-</span>KB2630458<span>-</span><span>x86.exe Installation location: d:\7efd0a85864c6db1c3180186cd5959\x86\setup\ Updated product edition: Instance Edition MSSQLSERVER ENTERPRISE 用户输入设置: ACTION: Patch ALLINSTANCES: True CLUSTERPASSIVE: False CONFIGURATIONFILE: ENU: False FARMACCOUNT: </span><span>空<span>></span><span> FARMADMINPORT: </span><span>0</span><span> FARMPASSWORD: </span><span>*****</span><span> HELP: False INDICATEPROGRESS: False INSTANCEID: </span><span>空<span>></span><span> INSTANCENAME: </span><span>空<span>></span><span> PASSPHRASE: </span><span>*****</span><span> QUIET: True QUIETSIMPLE: False UIMODE: Normal X86: False Rules </span><span>with</span><span> failures: Global rules: There are no scenario</span><span>-</span><span>specific rules. Rules report </span><span>file</span>: C:\Program Files\Microsoft SQL Server\<span>100</span>\Setup Bootstrap\<span>Log</span>\20140110_<span>094621</span>\SystemConfigurationCheck_Report.htm</span></span></span>View Code
《SQLSERVER2012实施与管理实战指南》中介绍到,summary.txt文件记录了SQL补丁,sqlserver安装情况,其他组件安装情况的大概内容
按照年月日,组件来划分日志文件夹,详细可以查看《SQLSERVER2012实施与管理实战指南》
开始安装补丁
刚开始安装的时候,你会以为SQLSERVER补丁没有在安装,实际上安装程序已经在运行了
你需要打开任务管理器,查看补丁的安装情况
过了一会儿会弹出一个窗口,这才开始正式开始,一开始的时候实际上就是GUI界面安装过程中的下一步下一步
出现下面窗口才表示补丁正式开始安装
上面的这个路径是补丁文件的解压缩路径
在安装完补丁之后,你可以打开D盘看一下有没有这个文件夹7efd0a85864c6db1c31380186cd5959
如果有你可以把他删除掉,实际上补丁的安装跟一般的应用程序的安装是一样的,从exe压缩包里解压缩文件然后复制到安装路径
安装完毕之后,窗口会自动关闭,这时候你可以打开SQLSERVER配置管理器或者SSMS查看当前的版本
版本是4000,补丁安装成功