什么是SQL Server实例?


14

当我安装SQL Server 2008 Express时,它会提示我创建一个实例,如果没有,则中止。然后,我在SQL Server Services的Sql Server配置管理器中的条目中看到该信息。什么是SQL Server实例?

Answers:


22

SQL Server实例是完整的SQL Server,您可以在一台计算机上安装许多实例,但只能有1个默认实例。

SQL Server实例具有服务器文件,数据库和安全凭据的自己的副本。

这个网址可能对您有帮助


可以同时运行多个实例吗?
2009年

1
是的,一次可以运行多个实例。您只需要为安装的每个实例(以及文件系统路径)使用唯一的名称
韦恩(Wayne

4
您甚至可以有一个实例为SQL 2000,而另一个实例为SQL 2005。具有多个实例的最大难题是内存管理,如果使用默认设置,则所有实例将尝试声明所有内存,最好明确限制每个实例的最大内存。
SqlACID,2009年

5
SQL 2000支持16个实例。SQL 2005和SQL 2008每台计算机最多支持50个实例。您可以在同一台计算机上运行SQL 2000和SQL 2005,或者在同一台计算机上运行SQL 2005和SQL 2008。但是,您不能在同一台计算机上运行SQL 2000和SQL 2008。
mrdenny

1
请注意,并非所有SQL Server服务都是“实例感知”或多实例的。例如,每个Windows主机仅安装一次Integration Services。这些实例包括可能由应用程序安装的Express实例。
史蒂夫·琼斯

2

SQL SERVER实例 数据库引擎的实例是作为操作系统服务运行的sqlservr.exe可执行文件的副本。每个实例管理多个系统数据库和一个或多个用户数据库。每台计算机可以独立于其他实例运行数据库引擎的多个实例。

SQL Server由三个主要部分组成:1.引擎,由一些Windows服务启动的软件,执行查找,排序和其他操作;2.元数据,例如master和msdb系统数据库;3.存储数据的用户数据库。

The master database contains the information that the engine reads when it starts up. It includes such things as security settings, file locations, sort orders, and database locations. The msdb database contains the information used by the SQL Server Agent program and information about maintenance plans. Yet another system database, called model, is the "template" from which other databases are created. Finally, the tempdb database is the "scratch" area that the engine software uses. This format holds true for all versions of SQL Server, although other control mechanisms are also implemented as Dynamic Link Libraries, or DLL’s.

This means that a single installation of SQL Server has only one set of certain data, such as server-level security credentials, scheduling information, temporary files and other meta-data.

Beginning with SQL Server 2000, you can run multiple copies of the software, using what Microsoft calls Instances. Instances share a few files between them, mostly dealing with client tools. This allows you to have two different system administrators (sa accounts) and other server-level security on the same hardware. So if you have different security needs, say running more than one company with different administrators, you can install multiple copies of SQL Server on the same hardware.

Another advantage is that since some of the files that run the Instance are duplicated, you can apply service packs separately to each Instance. That way you can host several applications on the same hardware that require different service pack levels.

实例还允许您使用产品的多个版本甚至版本。您可以随时安装实例,即使在安装SQL Server并运行一段时间后也是如此。因此,对于实例(无双关语),您可以在同一硬件上安装SQL Server 2005 Express Edition,SQL Server 2005 Enterprise Edition,SQL Server 2008 Standard Edition和SQL Server 2008 R2 Developer Edition。

If a connection request specifies only the name of the computer only, then connection is made to the default instance. A named instance is one where you specify an instance name when installing the instance. A connection request must specify both the computer name and instance name in order to connect to the instance. The computer name and instance name are specified in the format computer_name\instance_name.

实例主要适用于数据库引擎及其支持组件,不适用于客户端工具。当您安装多个实例时,每个实例都具有唯一的一组:1.系统和用户数据库。2. SQL Server和SQL Server代理服务。对于默认实例,服务的名称保留为MSSQLServer和SQLServerAgent。对于命名实例,服务的名称更改为MSSQL $ instancename和SQLAgent $ instancename,从而可以独立于服务器上的其他实例启动和停止它们。使用关联的SQL Server服务启动和停止不同实例的数据库引擎。SQL Server代理服务为数据库引擎的关联实例管理计划的事件。3。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.