Go: What is an instance of SQL Server

Source: Internet
Author: User

Ext.: http://blog.csdn.net/liuliuyushun/article/details/4215233

SQL Server Instance

--------------------------------------------------------------------------------------

The so-called "SQL instance" is actually the SQL Server engine, and each instance of the SQL Server database engine has a system and user database that is not shared with other instances.
On a single computer, you can install more than one SQL Server, and each SQL Server can be understood as an instance.
Instances are also classified as "default instance" and "named instance", which is the default instance if the first SQL Server is installed on a single computer and the naming setting remains the default.
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.

[The computer name can be modified, but it has no effect on the default instance after modification, that is, the default instance changes with the computer name]
So, the name of the default instance is the same as the computer name, not "local", but generally, if you want to access the default SQL Server instance on this computer, use the machine name, (local), localhost, 127.0.0.1,. , the native IP address, can achieve the same purpose. However, if you want to access a non-native SQL Server, you must use the computer/instance name method.

How do I see how many SQL instances are installed on my machine?

------------------------------------------------------------------------------------------

Start---Run, enter services.msc, return.
In the list of services, find the beginning of MSSQLSERVER, there are several, just a few instances.

How to change the SQL instance name

-------------------------------------------------------------------------------------------

Here is a method found from the Internet, a little more complex, after installation must pay attention to, or bring a lot of trouble. But the renaming method is also very important and should be mastered.

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

About the coexistence of SQL2000 with 2005.

Since the relationship between the two is not understood at first (and is not fully understood by now), the installation should be named with different instance names, so that there is no resource conflict and is extremely inconvenient to use.

Go: What is an instance of SQL Server

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.