什么是 SQL Server 实例?

什么是 SQL Server 实例?

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

答案1

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

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

url 可能会帮助你

答案2

SQL 服务器实例 数据库引擎实例是作为操作系统服务运行的 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 代理服务关联的注册表项区分版本和发行版。4. 网络连接地址,以便应用程序可以连接到特定实例。

相关内容