In. Net development, we often use SQL server and Microsoft SQL Server is actually quite good, and its developer (developer version) is also free for users to use, but during the installation process, especially when there is no new installation of the previous version, there are often many problems. In this article, I will reproduce the whole installation process in detail and give solutions to the problems. Only for the first installation of the same machine, if there is previous installation, this tutorial may not be applicable, and it is recommended to close the windows firewall before installation.
1、 Download from official website
Can open directly BaiduMicrosoft official websiteChoose the middle developer version to meet the learning needs. The developer version is fully functional and free.
2、 Install SQL server instance
Right click the downloaded EXE file to run as an administrator; here we choose Custom installation.
Media files are installed on Disk C by default. You can also choose to put them on other disks.
After installation, enter the new page to start the formal installation process, and select on the leftinstallword,Click [new SQL server independent installation or add new features to existing installation]
There is no need to change the version and the product key. Next.
Accept the agreement and tick to continue.
After the next security check, security check will appear firewall warning, ignore OK. Move on to the next step.
Select the functions you need. It is not recommended to select all of them. Many functions are not available for the time being. Required: database engine service, and SQL replication.
Select the default instance, and then next
Select mixed mode and set password. At this time, the user name is SA, and click add current user to add user (the password here is more important and will be used frequently later)
Add users, and then next
3Download management tool SQL Server Management Studio (SSMS)
Previously, we installed the instance of SQL Server 2019. Only the instance is not enough. Finally, we need to install the instance in theMicrosoft official websiteDownload and installSSMSManage the data.
IV. installationManagement tool SQL Server Management Studio (SSMS)
After downloading, right-click the EXE file and use theAdministrator identityOpen it,The default location can also be changed, and then click Install
Find Microsoft SQL Server Management Studio, click and open.
Enter the server name [it will be brought out directly. If not, you can enter a solid dot (.)], enter the user name (SA by default) and password (the password set in the previous section will be used here);
You can also directly choose to use the windows built-in account to log in. If you only use the database on this computer, this method is recommended.
At this point, SQL Server 2019 is successfully installed.
5、 Common problems and Solutions
1. Failed to restart the computer. If you encounter this problem, run here to enter the registry.
In “HKEY”_ LOCAL_ On the right, find “pendingfilerenameoperations”, delete “pendingfilerenameoperations”, and return to rerun the setup program.
2. An error occurred when using SSMS (SQL Server Management Studio) to connect to SQL Server database:
Open computer management servicechoiceSQL Server (MSSqlServer), right click to start.
The following paste some of the key point screenshots, if you encounter related error can refer to.
Open SQL Server Configuration Manager, click the triangle in front of SQL server network configuration, select sqlexpress protocol, and check whether TCP / IP status is enabled. If it is disabled, right-click TCP / IP option and select enable, as shown in the following figure:
Then right click the TCP / IP option, select properties, select IP address, pull to the bottom, you can see ipall, TCP port is 1433 (SQL Server default port), and click OK.
Then select the client protocol under the SQL Navite client 10.0 configuration, and ensure that TCP / IP status is enabled, as shown in the following figure:
Right click TCP / IP and select properties. You can see that the default port is 1433. As shown in the figure below:
Finally, restart the service to ensure that the modification takes effect. Select SQL Server under the SQL Server service, right-click to select restart, and restart the service, as shown in the following figure:
At this point, the problem is solved.