什么是SQL Server实例?

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


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

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

This 网址可能对您有帮助


SQL SERVER INSTANCE数据库引擎的实例是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.与数据库引擎以及SQL Server和SQL Server Agent服务关联的注册表项将版本和发行版分开。4.网络连接地址,以便应用程序可以连接到特定实例。

Dhyan Mohandas