(i) Enable SQL Server authentication mode
Log on as Windows authentication after you install SQL Server R2
Right-click on the server node, select Properties, select the Security page, radio SQL Server and Windows Authentication mode
(ii) Enable user SA
Right-click on "Security", "Login name", "sa", select "Properties", select "Status" page, "Enable" on "login" and "Allow connection to Database Engine" Radio "grant"
Select the General page, set the password
(iii) Setting the IP address and port of the TCP/IP protocol
Open SQL Server Configuration Manager, select the "SQLExpress Protocol" node, right click on "TCP/IP" and select "Enable"
Right-click on "TCP/IP", select "Properties", press ENTER "TCP port" value in the dialog box
Restarting the SQL Server service
If you do not have a TCP/IP port, you will be reported as an error at logon:
A network-related instance-specific error occurred while establishing a connection to SQL Server. The server was not found or could not be accessed. Verify that the instance name is correct, and that SQL Server is configured to allow remote connections.
(PROVIDER:TCP provider, error:0-Unable to connect because the target computer is actively rejecting.) ) (Microsoft SQL Server, error: 10061)
(iv) Setting database permissions, attaching databases
If the error in the attached database, the prompt does not have the appropriate permissions, then set the database access rights as follows
SQL Server Remote connection settings