1. Install the free learning version of ms SQL Server express edition,
Google SQL Server 2005 express to Microsoft's official website for download. About 53 m.
Http://www.microsoft.com/downloads/zh-cn/details.aspx? Familyid = 220549b5-0b07-4448-8848-dcc21314b41
Select the language version.
2. Installation. If you do not want to install 2005 express after installation, You need to delete the old version from the Add/delete program.
Command to stop the service:
sc stop mssql$sqlexpress
Select SQL Server Authentication during installation, without Windows authentication.
3. Configuration
Open "Configuration Manager" and find it in the Start menu. You can see it in the protocol section.
The server can be accessed through the 4th method (in fact, it is also a common 4th Process Communication Technology, shared memory, named pipe, TCPIP network socket,)
The most common Server Client Communication Technology is TCPIP network.
So now we start to configure the TCPIP protocol.
Configure the port number. If no port is configured, the server will randomly use the port (for security reasons, it is not easy for hackers to scan the service port)
4. Remember to restart the server.
sc stop mssql$sqlexpress sc start mssql$sqlexpress
5. Check whether the port is correct.
netstat -ab | findstr /i sqlserver.exe
6 client Tool Test Link
You can test it with the command line.
telnet 127.0.0.1 1433
Access the database using graphical express management Studio Tools
Log on to the account using the SA account and the SQL server administrator. It is equivalent to the root account of MySQL.
After logging in, select the database you want to operate on, right-click an SQL query, and enter an SQL statement to operate the database.
SQL statement:
-- Create database mydb; -- use database -- use mydb; -- create data table -- Create Table T1 (C1 int not null primary key, C2 varchar (50 )); -- insert data -- insert into T1 (C1, C2) values (1, 'Hello'); -- modify data -- Update T1 set C1 = 2; -- query data -- select * from T1; -- delete data -- delete from T1 where c1 = 1; -- delete a data table -- drop table T1; -- delete a database -- drop database mydb;