A "[7050] Open repository 'RepositoryName' failed: Cannot open database requested in login 'DatabaseName'. Login fails." Error Occurs.

September 16, 2005 | KB: 1011016
Server (MSDE) 7, Server (MSSQL) 7

Summary

When you attempt to start Laserfiche Server, register a repository, or create a repository, you may receive the following error in your lfs.log when starting up your server or registering a repository:

    [7050] Open repository 'RepositoryName' failed: Cannot open database requested in login 'DatabaseName'. Login fails.

Note: This error message is found in the lfs.log file, which is an error log generated by the Laserfiche Server. The lfs.log file is found in the installation folder for your Laserfiche Server. By default, this folder is located at C:\Program Files\Laserfiche\Server.

Cause

This error occurs when the Laserfiche Server service cannot locate or connect to the specified database. Here are two common causes for why the server might not be able to connect to the database:

  • The database is not correctly attached to the SQL server. See Resolution 1.
  • The Laserfiche Server service does not have rights to access the SQL server, or the authentication information provided for the SQL server is incorrect. See Resolution 2.

Resolution 1

The database must be attached to the SQL server. If the database is not attached, you will need to attach it.

To attach a database to SQL Server

  1. See the following article for instructions on determining whether the database is attached:

    1011019 HOW TO: List All Attached Microsoft SQL Server Databases.

  2. If your database is not listed as attached, see the following article for instructions on attaching your database:

    1011003 HOW TO: Attaching and Detaching a Microsoft SQL Server Database.

  3. If your database is an MSDE or MSSQL:PE database, you must be sure to attach all expansion databases as well as the main database. See the following article for instructions on confirming that all expansion databases are correctly attached:

    1011022 HOW TO: Attaching Expansion Databases to MSDE or SQL Server Personal Edition.

Resolution 2

If you choose to use SQL Server Authentication to log in to the SQL server when creating or registering your repository, confirm that your SQL server user name and password are correct. For more information on SQL server security, see the following MSDN article:
Administering SQL Server: Creating Security Accounts

If you choose to use Windows Authentication to log in to the SQL server when creating or registering your repository, the Laserfiche Server 7.x service must be logged in as a Windows user who has rights to the Microsoft SQL server.

To configure security for the Laserfiche Server 7.x using Windows Authentication

  • If Microsoft SQL Server and the Laserfiche Server are on the same machine, then no additional configuration is required. The Local System account, which is assigned to the Laserfiche Server 7.x service by default, has sufficient rights to Microsoft SQL Server.
  • If Microsoft SQL Server is hosted on a computer other than the one on which Laserfiche Server 7.x runs, you will need to change the log in settings for the Laserfiche Server 7.x service. The Laserfiche Server 7.x service will need to be assigned a domain account with rights to Microsoft SQL Server. The following procedure indicates how to change the log in settings for the Laserfiche Server 7.x service:
    1. From the Start menu, select Control Panel.
    2. Open Administrative Tools.
    3. Open Services.
    4. Select the Laserfiche Server 7.x service.
    5. From the Action menu, select Properties.
    6. Click the Log On tab.
    7. Select the This account option.
    8. In This account option, type the Windows domain account that the Laserfiche Server 7.x service will use to access Microsoft SQL Server. Keep in mind that this account must have rights to the SQL database associated with the Laserfiche repository.
    9. Click OK.
    10. From the Action tab, select Restart.