The first contact sql2008 compared to 05 is still quite big
How to open "remote connection" in configuration is the most difficult to find on the internet most of the day information is still foggy
Refer to the numerous information on the internet combined with my actual experience to collate the following steps
SQL Server 2008 does not allow remote connections by default, the SA account is disabled by default, and if you want to connect to SQL Server 2008 on a remote server with SSMs locally, you need to do two parts of the configuration:
1,sql Server Management Studio Express (SSMS)
2,sql Server Config Manager/sql Server Configuration Manager (abbreviated SSCM)
There are two points to note:
1,2005 's surface area Configurator was changed in 2008.
2, some settings take effect need to restart SQL Server
Step 1: Open SSMs, connect to the database as Windows, log in, right-select Properties
Step 2: On the left, select "Security" and select "SQL Server and Windows authentication mode" on the right to enable hybrid login mode
Step 3: Select "Connect", check "Allow remote connection to this server", then click "OK"
Step 4: Expand "Security", "Login name", "sa", right-select "Properties"
Step 5: On the left, select "General", select "SQL Server Authentication" on the right and set the password
Step 6: Select "Status", select "Enable" and click "OK"
Step 7: Right click on the database Select "Facet"
Step 8: Set the "remoteaccessenabled" property to "True" and click "OK"
Step 9: Now that SSMs is set up, exit first, and then log in with SA, success means that the SA account is enabled
Step 10: Start configuring SSCM below, check SQL Server service on the left, and make sure that SQL Server on the right and SQL Server Browser are running
Step 11: Start-->microsoft SQL Server 2008--> Configuration tool-->sql Server Configuration Manager-- SQL Server Network configuration --
Mssqserver protocol--see if the TCP/IP protocol starts, if start, right-click on the menu Point "Properties", select "IP Address" in the IP Address page menu, "IP1" and "IP2" in "TCP port" is 1433, "enabled" changed to "yes" Ipall TCP port changed to (1433)
Special Reminder If you have more than one instance installed, pay attention to whichever one you use. If the TCP port for the two instance of Ipall is 1433, one of them will fail to start.
Step 12:
Start-->microsoft SQL Server 2008--> Configuration tool-->sql Server Configuration Manager--SQL Native Client 10.0 configuration--Clients protocol-->TCP/IP
Select "Properties" in the TCP/IP right-click menu to confirm that "default port" is 1433, "enabled" is "yes"
After the above operation is complete, restart SQL Server in the SQL Server service.
You should be able to use it at this time, but still have to confirm the firewall.
Open the firewall settings. The SQLServr.exe (C:\Program Files\Microsoft SQL Server\mssql10. Sqlexpress\mssql\binn\sqlservr.exe) is added to the Allowed list.
Note Whether port 1433 is open
stringStr_conn ="Data source=localhost;initial catalog=zhf;integrated security=true"; SqlConnection Conn=NewSqlConnection (Str_conn); Conn. Open (); stringName ="I"; stringStr_sql ="Select uname from Tuser where uname like '%"+ name +"% '"; SqlDataAdapter Dr=NewSqlDataAdapter (STR_SQL, Conn); DataSet DS=NewDataSet (); Dr. Fill (DS); intr = ds. tables[0]. Rows.Count; if(R >0) {Response.Write ("<script>alert (' KSKJF ') </script>"); }
Basic Combat Skills--------SQL 2008 How to configure remote connections