SQL Server 2008 R2 installation manual

Original link: http://www.cnblogs.com/iamasqldba/archive/2013/05/01/3052855.html

summary

SQL Server2008 R2 installation is installed into the client's server.

Before installing the server, we need to check the settings of server environment that is checked before installation; after installation, we must also make the appropriate configuration for SQL Server 2008 R2;

When the end, before and after the installation, we do not need to configure it to only install the SQL Server 2008 R2 client.

This document is for enterprises to install SQL Server 2008 R2 in the guidance document. Must be installed when 2008 R2, either Enterprise Edition, Standard Edition, English, Chinese version of the installation of SQL Server, can be executed according to the document.

The first chapter before installation environment check

Before installation, check the following:

A. Make sure the server is arranged inside the network.

B. Install Service Pack verified and security patch does not affect SQL Server.

C. Database file to hold the disk partition need to use NTFS.

D. Critical data files using hardware RAID.

E. That no other applications and services, in addition to the standard install server software licenses.

F. The system comes with a firewall needs to close.

G. SQLServer version selected, if the number of physical servers less CPU 8, the system installed SQL Server 2008 R2 Enterprise Edition; physical CPU number greater than eight to install 2008 R2 Data Center Edition SQL Server. ( Versions maximum number of processors supported by SQL Server )

Description: In principle we are in Windows Server 2008 R2 Enterprise installed on SQL Server 2008 R2 Enterprise ; in Windows Server 2008 R2 Datacenter install SQL Server 2008 R2 Datacenter .

H. The installer automatically detects and selects the appropriate installer (32-bit or 64-bit).

Method: Start à Run ... -> msinfo32 can view the server operating system information

I. See extended and correctly configure the memory 32 the operating system (if memory> = 4G), and 64 the bit need not be configured .

Method: Set / 3GB or the / PAE in the BOOT.INI;

To do: My Computer Properties --à Advanced tab -à Startup and Recovery -> Edit (shown below)

clip_image002

Figure: View of the operating system BOOT.INI

BOOT.INI increase / PAE follows:

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="WindowsServer 2003, Standard" /fastdetect /NoExecute=OptOut /PAE

Note : 32-bit server, according to the memory size required to set / 3GB / PAE

² If the memory is 4G, only open / 3GB

² If the memory is greater than 4G, only open / PAE

² above for the server 32, 64 need not be configured.

Chapter II server-side installation

1. Navigate to the desired installation SqlServer version of the installation directory. (Note Select the corresponding version)

2. Run the setup file, if there is .NET Framework 3.5 SP1 installation dialog box, click "OK" to accept the .NET Framework 3.5 SP1 License Agreement. ( This installation process takes a few minutes )

clip_image004

3. In the SQL Server Installation Center interface, to create a new installation of SQL Server, click the "New installation or add features to an existing installation" .

clip_image006

4. Wait for the detection to proceed with installation all through.

clip_image008

The product key.

clip_image010

6. Accept the license agreement and continue to the next step.

clip_image012

7. Install support files, click 'Install'.

clip_image014

8. In the mounting support interface rule checking, whether all detected by the note, the reason to check does not pass, the system comes with a firewall needs to close.

clip_image016

9. role in the installation screen, select " SQL Server Feature Installation ."

clip_image018

10. In the component mounting selection interface, according to individual requirements of the components selected to install

11. This detecting step is properly installed, by clicking the next without passing through the check reason, then click 'Re-run'.

clip_image020

12. The first time you install the default instance, only when installing multiple instances specified instance name.

Sql Server and Sql Server Agent service startup account to be manually configured. Information to be modified according to individual needs. ( Http://support.microsoft.com/kb/918483 )

13. 设置排序规则及勾选Accent-sensitive项,其它保持默认即可.注意不要选择大小写敏感项(case-sentitive),设定值如下所示(特殊情况,根据实际要求,进行设定)(英文版操作系统需特别注意

clip_image023clip_image021clip_image025

14. 在数据库引擎配置界面

(1)帐号配置属性页:认证模式可按个人需求进行更改,同时设定sa密码;点击‘Add’按钮手工设置SQL Server的系统管理员帐号,这里指定为‘Administrators 系统管理员组’成员

(2)数据目录属性页:检查各安装目录位置

clip_image027

(3)文件流属性页:不选择

clip_image029

若需要可在安装完毕后,在SQL Server的属性页中设置。

clip_image031

15. 以上都设置好后,一路Next ;

clip_image033

clip_image035

16. 下面的路径是安装配置文件及安装日志文件的存放路径,点击‘Install’开始安装

clip_image037

17. 等待安装,此时需要等待一段时间

clip_image039

18. 见到如下提示表示SQL Server 2008 R2安装成功。

clip_image041

第三章 服务器端安装后的配置

在安装完Sql Server 2008 R2的服务器端,我们还需对其进行配置。根据公司的要求作如下配置:

1. 只启用TCP/IP和Shared Memory网络协议访问数据库。

clip_image043

2. 为SQL Server的命名实例分配静态TCP/IP端口(注意更改后,需重启SQL服务使其生效)

clip_image045

3. 禁用SQL Server VSS Writer服务

方法:运行-输入services.msc,回车即可打开服务管理窗口,在其中找到SQL Server VSS Writer服务,停止该服务,并将其设为禁用。

4. 开通数据库管理员用户,开启强密码策略。

clip_image047

图:启用强密码

clip_image049

图:开通数据库超级管理员用户

5. 给SqlServer配置最大可使用内存

n 内存建议配置值:

根据主机内存的大小,对照如下表格配置SqlServe最大可使用内存:

物理内存

max server memory (MB)

4GB

(物理内存-1.5)*1024

8GB

(物理内存-2)*1024

16G

(物理内存-3)*1024

32G

(物理内存-4)*1024

64G

(物理内存-6)*1024

128G

(物理内存-12)*1024

注意:物理内存通过XP_MSVER取得

n 可通过以下脚本配置SqlServer最大可使用内存:

--先开启show advanced options

sp_configure 'show advanced options',1

go

--使设置生效

Reconfigure

go

--更改max server memory的值

sp_configure 'max server memory', [最大内存数量(MB)] --注意换算为MB

go

--使设置生效

reconfigure

go

6. 同样采用sp_configure配置其它项 (sp_configure 后执行一下reconfigure)

--配置awe enabled(仅32位系统需要配置,64位系统中不用配置)

sp_configure 'awe enabled',1

go

--使设置生效

Reconfigure

go

--启用Xp_cmdshell功能

sp_configure 'xp_cmdshell',1

go

--使设置生效

Reconfigure

go

--启用NO COUNT 选项

sp_configure 'user options',512

go

--使设置生效

Reconfigure

go

--配置最大并行度

sp_configure 'max degree of parallelism',1

go

--使设置生效

RECONFIGURE

go

7. 建立数据存放目录及备份存放目录 (尽量不要放在同一分区)

8. 配置model系统库

将Model数据库的数据文件和日志文件修改为自增长:按10%增长.

9. 配置tempdb

n 尽可能将tempdb更改到与非安装分区;

n 为tempdb建多个数据文件,文件个数与CPU的个数相同(采用select cpu_count from sys.dm_os_sys_info可获得cpu数量),并且仅第一个数据文件和日志文件开启自增长,其余数据文件关闭自增长。

如cpu数量为8:则分为1个主文件.mdf和7个附加文件.ndf

注意:如更更改了TEMPDB数据存放位置,则需重启SQL SERVER服务使之生效。重启后需手动删除数据库安装目录下的不再使用的TEMPDB数据文件。

参考脚本:

USE master;

GO

ALTER DATABASE tempdb

MODIFY FILE (NAME = N'tempdev',FILENAME = 'D:\SqlData\tempdb.mdf',SIZE = 512MB,FILEGROWTH = 256MB)

GO

ALTER DATABASE tempdb

MODIFY FILE (NAME = N'templog',FILENAME = 'D:\SqlData\templog.ldf',SIZE = 512MB,FILEGROWTH = 256MB)

GO

--数据文件个数取CPU的数量,查看cpu数量:select cpu_count from sys.dm_os_sys_info

ALTER DATABASE tempdb

ADD FILE (NAME = N'tempdev1',FILENAME = 'D:\SqlData\tempdb1.ndf',SIZE = 512MB,FILEGROWTH = 0) TO FILEGROUP [PRIMARY]

GO

ALTER DATABASE tempdb

ADD FILE (NAME = N'tempdev2',FILENAME = 'D:\SqlData\tempdb2.ndf',SIZE = 512MB,FILEGROWTH = 0) TO FILEGROUP [PRIMARY]

GO

ALTER DATABASE tempdb

ADD FILE (NAME = N'tempdev3',FILENAME = 'D:\SqlData\tempdb3.ndf',SIZE = 512MB,FILEGROWTH = 0) TO FILEGROUP [PRIMARY]

GO

ALTER DATABASE tempdb

ADD FILE (NAME = N'tempdev4',FILENAME = 'D:\SqlData\tempdb4.ndf',SIZE = 512MB,FILEGROWTH = 0) TO FILEGROUP [PRIMARY]

GO

ALTER DATABASE tempdb

ADD FILE (NAME = N'tempdev5',FILENAME = 'D:\SqlData\tempdb5.ndf',SIZE = 512MB,FILEGROWTH = 0) TO FILEGROUP [PRIMARY]

GO

ALTER DATABASE tempdb

ADD FILE (NAME = N'tempdev6',FILENAME = 'D:\SqlData\tempdb6.ndf',SIZE = 512MB,FILEGROWTH = 0) TO FILEGROUP [PRIMARY]

GO

ALTER DATABASE tempdb

ADD FILE (NAME = N'tempdev7',FILENAME = 'D:\SqlData\tempdb7.ndf',SIZE = 512MB,FILEGROWTH = 0) TO FILEGROUP [PRIMARY]

GO

10. SQLServer安装完成后需要在MSDB上执行Performance DashBoard 所需脚本。

安装脚本如下: clip_image051(双击打开后服务器端执行)

第四章 客户端的安装

下面为在win7(64位)上安装Sql Server 2008 R2的客户端步骤:

双击setup.exe开始安装

1. 在客户机上运行setup文件,若没有安装.net 3.5 sp1框架,则会提示安装,点击“确定”

clip_image053

选择接受许可协议,点击安装

clip_image055

2. 等待几分钟

clip_image057

3. 安装完成

clip_image059

4. 等安装完成后会提示需要重启计算机,点击“确定”后重启计算机。

clip_image061

5. 再次运行setup文件,在SQL Server安装中心界面中,单击“全新安装或向现有安装添加功能”

clip_image063

6. 检测通过后,点击“OK”

clip_image065

7. 安装支持文件

clip_image067

8. 完成后点next进入下一步

clip_image069

9. 输入产品密钥

clip_image071

10. 接受许可协议,点击“Next”

clip_image073

11. 在安装角色界面,选择“SQL Server 功能安装

clip_image075

12. 在选择组件安装界面,根据个人需求选择组件,在已安装有SQL Server 2005客户端的计算机上将无法更改安装路径

13. 以上都设置好后,一路Next即可完成客户端的安装.

clip_image077

14. 见到此界面表示安装成功。

clip_image079

15. 提示需重启计算机,重启计算机即可

clip_image081

附录 A:SQL Server 2008 R2相关内容URL地址

序号

内 容

URL地址

1

SQL SERVER 2008 R2的硬件、软件环境要求及支持信息

http://technet.microsoft.com/zh-cn/library/ms143506.aspx

2

SQL SERVER 2008 R2的版本及各自的功能差异

http://technet.microsoft.com/zh-cn/library/cc645993.aspx

3

SQL SERVER 2008 R2提供哪些服务组件,各自的功能情况

http://technet.microsoft.com/zh-cn/library/ms144275.aspx

4

SQL SERVER 2008 R2内存管理

http://technet.microsoft.com/zh-cn/library/ms143685.aspx
http://technet.microsoft.com/zh-cn/library/cc280359.aspx

5

sp_configure的新增配置及变化

http://technet.microsoft.com/zh-cn/library/ms189631.aspx
http://technet.microsoft.com/zh-cn/library/ms189631.aspx

6

系统权限的变化

http://technet.microsoft.com/zh-cn/library/cc281849.aspx

7

虚拟内存配置

http://technet.microsoft.com/zh-cn/library/ms187877.aspx

8

内存锁定页配置

http://technet.microsoft.com/zh-cn/library/ms190730.aspx
http://technet.microsoft.com/zh-cn/library/ms179301.aspx

9

awe配置

http://technet.microsoft.com/zh-cn/library/ms190731.aspx

10

TempDB配置

http://technet.microsoft.com/zh-cn/library/ms175527.aspx

11

DAC channel connection

http://technet.microsoft.com/zh-cn/library/ms189595.aspx

Reproduced in: https: //www.cnblogs.com/iamasqldba/archive/2013/05/01/3052855.html

Guess you like

Origin blog.csdn.net/weixin_30662011/article/details/94947434