When Remote Programming Software opens, a secure connection is made to the database which is located in an instance of SQL. If the connection to SQL is not successful or the database is not accessible, the Database connection failed error will display (see figure 1).
Figure 1 Database connection failed error
Figure 2 Three common causes for the database connection failure
Figure 3 System Configuration Page
1. Failure to connect to the SQL Server. Details displays:
“A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. (Provider: SQL Network Interfaces, error: 26 – Error Locating Server\Instance Specified).”
In this case the connection to the SQL Server has failed causing the database connection to fail. Press OK and return to the Database Settings page. Troubleshoot using the following steps;
Figure 6 Verify the Service is running and Startup is Automatic
2. Failure to open the database. Details will display;
“Cannot open database “[database name]” requested by the login. The login failed. Login failed for user ‘sa’”.
In this case the database failed to open after the connection was made to SQL. Press OK and return to the Database Settings page. Troubleshoot using the following steps;
Figure 7 Install with Administrator Privileges
3. Failure to authenticate the user: Details will display;
“Login failed for user sa”.
In this case the RPS uses SQL Server Authentication to authenticate the database connection, using the user/password entered in Database Settings. The problem may be caused by an incorrect password or one which doesn’t meet domain restrictions for complex passwords. Press OK and return to the Database Settings page. Troubleshoot using the following steps;
Download and install Microsoft SQL Server Management Studio (SSMS).
Figure 8 Download SSMS
Figure 9 Welcome to install screen
Figure 10 Select Restart
Figure 11 Open Management Studio
Figure 12 Log in using Windows Authentication
Figure 13 Object Explorer
Figure 14 Object Explorer Security expanded
Figure 15 Object Explorer Logins Expanded
Figure 16 Login Properties sa password
Note that the overall settings in Microsoft SQL go beyond the scope of this article. The assistance of a qualified SQL administrator may be needed when the steps in this article have not resolved the "Database Connection Failed" error.