What is an instance of SQL Server
------------
The concept of an instance of SQL Server is similar to the concept of "classes and objects". You can think of SQL Server's installer as a class, and the installation process is the process of creating objects, which are called "Instances of SQL Server"-the concept of instantiating classes in classes and objects.
Therefore, the so-called "SQL Server instance" is actually a complete SQL Server server that is installed on the computer (or, in order to differentiate itself from the concept of a hardware server, a SQL Server instance can be referred to as the SQL Server engine).
Note: the "full" SQL Server server described here means that each SQL Server instance can include all optional SQL Server components, including the database engine, Analysis Services, Reporting services, and so on. More please search what to ask
------------
On a single computer, you can install multiple SQL Server servers (that is, you can install multiple instances of SQL Server as if a class can instantiate several objects), but there is usually a maximum limit.
Each instance of SQL Server has a set of its own exclusive program files and data files, plus a set of program and data files that are shared by all instances of SQL Server.
Within each instance of SQL Server, if the instance contains components such as the database engine, Analysis Services, Reporting services, and so on, each component will have a set of executables and data files, and There is also a set of common files that are shared by all components.
To isolate the installation location for each component, each component in a given instance of SQL Server has a unique instance ID.
------------
http://hovertree.com/menu/sqlserver/
SQL Server instances are also categorized as "default instance" and "named instance".
① default instance: A SQL Server instance that uses the default name at installation is called the default instance, also known as an unnamed instance (Unnamed Instance).
There is at most one default instance on a computer, or there can be no default instance.
The default instance name is the same as the computer name.
If you modify the computer name, the default instance name changes with the computer name, in other words, the default instance name is always equal to the computer name!
To connect to the default instance, the client does not need to specify the instance name, but only the computer name (that is, the network name of the hardware server).
In general, if you are connecting to a native SQL Server default instance, you can use:
Computer name, (local) [note must be enclosed], "localhost", "127.0.0.1", ".", "Native IP address".
② Command instance: A SQL Server instance that uses a custom name at installation, called a named instance (Named Instance).
If you want to access the command instance, you must access it by using the computer's network name/named instance name method.
------------
Http://www.cnblogs.com/roucheng/p/daimashi.html
To view the installed SQL SERVER Instance name method
1. Start menu-------SQL Server Configuration Manager---------SQL Server service, where you can see the installed instance name.
2. Registration Form,
Key Catalog
Key_local_machine/software/microsoft/microsoft SQL Server
Key Name
InstalledInstances
3. Through system services,
View the service named SQL SERVER (instance name). The service name for the default instance is SQL SERVER (MSSQLSERVER).
4.
DECLARE @Table Table (instancename sysname NULL)
Insert @Table EXEC sys.xp_cmdshell ' SQLCMD-LC '
--left (@ @serverName, CHARINDEX ('/', @ @serverName + '/')-1) instead of the name of the machine, according to the example naming rules
SELECT * from @Table WHERE instancename as Left (@ @serverName, CHARINDEX ('/', @ @serverName + '/')-1) + '% '
How to change the SQL instance name
-------------------------------------------------------------------------------------------
The process of renaming a server is straightforward. All you need to do is rename the server, just as you would normally rename Windows NT or Windows Server. Restart the computer, and then the system gives an error message: "The installation file is corrupted, or the identity of the package is unknown." It looks scary. But in fact you just need to rerun the Setup program for SQL Server and you will be prompted to "upgrade to the current version". Click Yes and the installer will soon be over. It's not actually re-installed, just the option to reset the server name. Then we need to run some stored procedures to reset the server name so that some functions in SQL Server, such as functions related to replication, can work effectively.
We switched to the demo computer, which will be our last demonstration. Turn off some of the applications you just started. To the "My Computer" property, go to the "Network labeling" property and change the name of this computer. We changed the name of this computer to "Win2ksql" and clicked OK. Then you are prompted to restart your computer. OK, restart.
After restarting, we go back to the login screen. As we have just mentioned, there is a hint that "the installation file is corrupted, or the package ID is unknown."
We now need to log on to the server, go to the directory of the SQL Server installation files, and then rerun the Setup program.
Now let's run the installer to the directory of the SQL Server installation files. NT has a hint that the SQL Server service is not functioning properly. It will take a while for the installer to continue.
Windows NT prompts that the service control failed. Now that the installer is ready to proceed, the installer asks where to install the program. We choose to install locally. Then, search for installed components. The following installer asks if you want to upgrade to Standard Edition. This tip looks strange, but that's what we want now. Click Yes,sql Server to update some server settings. Now that it's finished, we'll go back and start the SQL Server service.
Open Query Ananlyzer, and we'll load the last script. Go to the Script directory and open the script called "Rename SQL". If we open the sysservers table now, we will find that it still points to the original server name. We need to remove this server first and then add it to allow the sysservers table to reflect the new server name. Now let's run the script, delete the original server, and then add it. Now we've successfully changed the name of the server.
--Open the switch to modify the system table
EXEC sp_configure ' allow updates ', 1 RECONFIGURE with OVERRIDE
Update Master: sysservers set srvname= ' new server name ', datasource= ' new server name ', srvnetname= ' new server name ' where srvname= ' old server name '
--Close the switch to modify the system table
EXEC sp_configure ' allow updates ', 0 RECONFIGURE with OVERRIDE
Go
Http://www.cnblogs.com/roucheng/p/texiao.html
SQL Server Instance Resolution