Support Center
Knowledgebase Contact Support
Search our knowledgebase

Configuring an existing SQL instance to host the Lansweeper database

Last updated on July 14 2015

Lansweeper data, reports and settings are stored in a database, which is hosted in either SQL Compact or SQL Server. You can let the Lansweeper installer automatically set up a SQL Compact or SQL Server installation for you. Alternatively, you can install the Lansweeper database in an existing SQL Server instance, which may be useful if you already have a centralized instance hosting other databases.

If you choose to install in an existing SQL instance, you'll need to ensure the instance is properly configured prior to running the Lansweeper installer. If your instance is not properly configured, the Lansweeper installer may be unable to access it to create and populate the Lansweeper database and you may encounter the error below.

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
SQL Server does not exist or access denied

To install the Lansweeper database in an existing SQL Server instance, do the following:

  1. Make sure your SQL instance is configured for mixed (Windows and SQL) authentication, as the Lansweeper service and web console will use a SQL user called lansweeperuser to connect to the database. You can enabled mixed authentication in SQL Server Management Studio. If SQL Server Management Studio isn’t installed on your Lansweeper server, we recommend downloading it online. (You will need to perform a search for the Management Studio that’s compatible with your particular edition and version of SQL Server.)
    checking SQL instance properties in SQL Server Management Studio
    checking SQL Server authentication in SQL Server Management Studio
    restarting SQL instance in SQL Server Management Studio
    - Right-click your SQL instance name in SQL Server Management Studio.
    - Select the Properties menu item.
    - Select the Security tab in the resulting popup.
    - Tick SQL Server and Windows Authentication mode
    - Right-click your SQL instance name and select Restart.
  2. Make sure the SQL Server and SQL Server Browser services are running at all times on the server hosting your SQL instance.
    checking SQL service properties in Windows Services
    checking SQL service startup type in Windows Services
    starting SQL service in Windows Services
    checking SQL service status in Windows Services
    - Right-click one of the services in Windows Services.
    - Select the Properties menu item.
    - Set the service's startup type to Automatic in the resulting popup and hit OK.
    - Right-click the service and select Start, if the service is not already started.
  3. If your Lansweeper service and/or web console will be hosted on a different server than the Lansweeper database, make sure your SQL instance is set up to allow remote database connections.
    checking protocols in SQL Server Configuration Manager
    checking TCP/IP properties in SQL Server Configuration Manager
    enabling TCP/IP IP addresses in SQL Server Configuration Manager
    restarting SQL service in SQL Server Configuration Manager
    - Open SQL Server Configuration Manager. There should be a shortcut in your Start menu.
    - Select the Protocols item under SQL Server Network Configuration.
    - Right-click Named Pipes and select Enable.
    - Right-click TCP/IP and select Enable.
    - Right-click TCP/IP, select Properties and ensure that connectivity is enabled for the appropriate IPs in the IP Addresses tab.
    - Right-click the SQL Server service under SQL Server Services and select Restart.
    - For SQL Server 2005, additional steps may be required to allow remote database connections. More information on allowing remote connections under SQL Server 2005 can be found in this Microsoft knowledge base article.
  4. If your Lansweeper service and/or web console will be hosted on a different server than the Lansweeper database, make sure SQL Server traffic is allowed through your firewall(s). TCP port 1433 is the most basic port used by SQL Server, though other ports are sometimes used as well. More info on allowing SQL Server traffic through firewalls can be found in this Microsoft knowledge base article.
  5. With your SQL Server and firewall configuration taken care of, follow the instructions in this article to install Lansweeper. The SQL instance name you submit in the Lansweeper installer should match what you see in SQL Server Management Studio. The installer will connect to the instance and create the lansweeperdb database. Don't try to manually create the database, as this will likely cause an installation failure.
    checking SQL instance name in SQL Server Management Studio
    submitting SQL Server instance name in Lansweeper installer
    - Within the Lansweeper installer you can replace your Lansweeper server's NetBIOS name with its IP address, e.g. 192.168.1.4\SQLEXPRESS. This may not be a good idea in DHCP enabled networks however, as IP changes will break the database connection.
    - If (and only if) your Lansweeper Server service and web console will be hosted on the same machine as the Lansweeper database, you can replace your Lansweeper server's NetBIOS name with localhost, e.g. localhost\SQLEXPRESS.