Tuesday, December 22, 2009

How to enable SQL Server 2005 Express to allow remote connections for Instant Archive Viewer for OCS configuration

By default, SQL Server 2005 doesn’t allow remote connection so you have to enable it manually. If you try to connect to remote SQL Server without enable remote connection first, you’ll see one of these error messages.
“An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connection. ….
SQL Server does not allow remote connection
“Login failed for user ‘sa’. The user is not associated with a trusted SQL Server connection.
Login failed for 'sa'
To resolve these problems, you have 2 majors task. One is to enable both SQL Server and Windows authentication mode on SQL Server and the other is to allow remote connection and SQL Server Browser.
  • Check that you have allowed both SQL Server and Windows Authentication mode (If you’re not use Windows Authentication mode). For instance, user ‘sa’.
    1. Login to SQL Server using SQL Server Management Studio Express on local SQL Server with Windows Authentication user. This will use Windows account to authenticate to SQL Server.
      Login using Windows authentication mode on local
    2. In Object Explorer, right click on the instance name and select Properties.
      Open SQL Server Properties
    3. On the left, select Security and change Server authentication to SQL Server and Windows Authentication mode. If the choice is already selected, that means you have already allowed SQL Server authentication.
      Change SQL Server authentication mode
    4. There’ll be an information window shows that you need to restart SQL Server to takes effect of the changes.
      SQL Server need restart
    5. Right-click on the instance name again, select Restart to restart SQL Server service.
      Restart SQL Server Service
    6. Select Yes.
    7. Wait for service stop and start.
      Restarting SQL Server Service
    8. That’s it. You have enabled both SQL Server and Windows authentication so now you can login to SQL Server with your current Windows account or your created account.
  • Check that you have enabled remote connection on SQL Server Surface Area Configuration
    1. Open SQL Server Surface Area Configuration.
      Open SQL Server Surface Area Configuration
    2. Select Surface Area Configuration for Services and Connections.
      Open Surface Area Configuration for Services and Connections
    3. On the left side, expand your SQL Server instance -> Database Engine -> Remote Connections. On the right side, select Local and remote connections -> using both TCP/IP and named pipes.
      Allow remote connections
    4. On the left side, select SQL Server Browser -> Service.
      On the right side, if the startup type is Disable, you need to change to Automatic and click Apply and click Start button to start the service. Then, click OK.
      Start SQL Server Browser
    5. You have finished configure. Now try to login to your SQL Server from remote computer using SQL Server authentication mode.
      Login to remote SQL Server
    6. Login to SQL Server succeeded.
      Login succeeded
    7. Now try testing the Connection in Instant Archive Viewer for OCS database settings tab on the Admin Page: ...itimarchiveviews/admin/index.asp:

      • Status: Test Connection Succeeded

No comments: