SQL SERVER INSTANCE
An instance of the Database Engine is a copy of the sqlservr.exe executable that runs as an operating system service. Each instance manages several system databases and one or more user databases. Each computer can run multiple instances of the Database Engine independently of other instances.
SQL Server is composed of three main parts:
1. An engine, which is the software started by a few Windows services that performs lookups, sorts, and other actions;
2. Meta-data such as the master and msdb system databases;
3. User databases where data is stored.
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.
Instances also allow you to work with multiple versions and even editions of the product. You can install Instances at any time, even after SQL Server is installed and running for some time. So for Instance (no pun intended), you can install SQL Server 2005 Express Edition, SQL Server 2005 Enterprise Edition, SQL Server 2008 Standard Edition and SQL Server 2008 R2 Developer Edition, all on the same hardware.
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_nameinstance_name.
Instances apply primarily to the database engine and its supporting components, not to the client tools.
When you install multiple instances, each instance gets a unique set of:
1. System and user databases.
2. The SQL Server and SQL Server Agent services. For default instances, the names of the services remain MSSQLServer and SQLServerAgent. For named instances, the names of the services are changed to MSSQL$instancename and SQLAgent$instancename, allowing them to be started and stopped independently of the other instances on the server. The database engines for the different instances are started and stopped using the associated SQL Server service. The SQL Server Agent services manage scheduled events for the associated instances of the database engine.
3. The registry keys associated with the database engine and the SQL Server and SQL Server Agent services separate versions and releases..
4. Network connection addresses so that applications can connect to specific instances.