Moving the LobbyCentral database is a pretty straight-forward process.   This solution will walk you through the steps of moving the database to a new server and/or a new SQL instance. If you are not a DBA, or are unfamiliar with SQL Server, please review the terminology section before attempting the move.


Process


  1. All users must log off.
  2. Back-up databases lobbycentral and lobbycentral_chat
  3. Restore databases to new server.
  4. Reset the lobbyCentral database user account.
  5. Update the configuration files for the application and Windows service.


Terminology


Instance
Basically a SQL Server that maintains its own set of tables, configuration, etc. and is independent of others.  A single Windows server can have multiple SQL instances running.


Default Instance
The default or unnamed SQL Server instance.   To access the default instance, you use the name of the server.  i.e.  MYSERVER


Named Instance
A SQL Server instance that is accessed by using the name of the server plus the instance name.  i.e.  MYSERVER\LOBBYCENTRAL


dbo
Database Base Owner.   A permission that grants the assigned user ownership rights to the database.  The dbo can perform all operations and table maintenance on the database.


dbo_owner
The dbo role assigned to the user under Security->Logins->User Mapping


sa
System Administrator database account.  This is the default account created when the SQL instance is running in Mixed Mode.  The sa account has full permissions and can access any database.  It should only be used when performing server operations and not for application connectivity.


Mixed Mode
The mode that allows users to connect either by Windows Authentication or SQL Authentication.  A SQL instance can be changed to Mixed Mode by editing the Security properties of the server.  LobbyCentral requires Mixed Mode.


Preparing the Move

When setting up the new SQL Server, be sure that Mixed Mode is selected as the authentication method.
  1. Ensure all users have closed open tickets and logged out of LobbyCentral.
  2. Shut down all Kiosk, QMonitor, and iPad applications.
  3. Stop the LobbyCentral Windows Service.

Recovery Model

The recommended recovery model for the database is Simple.   If you choose Full Recovery, you must create a backup plan for both data and transaction log.  It is recommended to run the plan hourly to keep the transaction log truncated.


Backing up and Restoring the LobbyCentral Database

You will be backing up two databases:  lobbyCentral and lobbyCentral_chat.   If you are on a version older than 6.0, you may not have the lobbyCenral_chat database in which case, you can skip those steps.
  1. Open SQL Management Studio (2008 or higher) and connect to the lobbycentral database server.
  2. Expand databases and right click the lobbycentral database.
  3. Click Tasks, then Backup
  4. The Destination of the backup should default to Disk with a default filepath and name.   Click Remove, then Add if you want to change the backup location to a shorter path.
  5. Click OK.
  6. Repeat steps 3 and 4 for the lobbycentral_chat database.
  7. Copy the backup files to the destination server.  Note that backup files are saved on the SQL server.
  8. Disconnect from source server and connect to the destination server.
  9. Right click Databases and choose Restore Database.
  10. Under Source, select Device.
  11. Click the file browser button.
  12. Ensure the Backup media type is File then click Add.
  13. Select the backup file and click OK.
  14. Under Backup Sets to Restore, check the Restore checkbox next to the most recent backup set.
  15. Click Files in the left menu.
  16. Verify that the drive in Restore As exists on the new server.  For example, if the old server stored SQL files on the D drive, then the new server must have a D drive or you will need to change the restoration location.
  17. Click OK.
  18. Repeat steps 9 through 17 for the lobbycentral_chat database.

If the restore operation is successful, you must now reset the LobbyCentral db user account.  Do not skip this step!

Resetting the LobbyCentral DB Account
When a backup operation is performed, it also backs up the db user accounts associated with that database.   However, the db user information is stored in the master table and is not transferred to the new server.  Therefore, the user accounts become orphaned on the new server.

To fix this, you must delete the orphan account and recreate it so that it exists on the new server.
  1. Right-click Databases and choose Refresh.
  2. Expand the lobbyCentral database
  3. Expand Security, Users
  4. Delete the lobbyCentral or lobbyCentralUser account.   Make note of which name was used.
  5. At the root level of the server, expand Security, Logins.
  6. Verify that lobbyCentral or lobbyCentralUser does not exist.  If it does, delete it.
  7. Right click Logins and choose New Login.
  8. In Login Name, type in the name from step 4.
  9. Select SQL Server Authentication.
  10. Type in a strong password.
  11. Uncheck Enforce Password Policy
  12. Click User Mapping in the left menu.
  13. Check the Map box next to lobbyCentral.
  14. In Database role membership, check the box next to db_owner
  15. Repeat steps 13 and 14 for the lobbyCentral_chat database (if applicable).
  16. Click OK.

It is recommended that you verify that the database user account can connect to the database.   To do this, disconnect all servers in SQL Management Studio and click Connect.   Select the destination server and change the authentication mode to SQL.   Use the database account and password from step 8 and click Connect.

If a connection cannot be made, verify that the password has been entered correctly.  You can also reset the password under Security->Logins.

Updating the LobbyCentral Configuration Files
The final step is to update the LobbyCentral web and service configuration files to use the new database server.

The default lobbyCentral location is:
Windows 32-bit
 c:\program files\fuhr software\lobbycentral

Windows 64-bit
c:\program files(x86)\fuhr software\lobbycentral


Updating CustomerSettings.config
  1. Open lobbycentral\web\CustomerSettings.config in Notepad.
  2. Locate the dbServer property and change the value to the new server.   Important:   do not forget the instance name if it is a Named Instance.  i.e.  SERVER\INSTANCE_NAME
  3. Verify that the dbUsername matches the one used in step 8 above.
  4. Change the dbPassword to the one created for the dbUsername account.
  5. Save the file and exit.

Updating Web.config
  1. Open lobbycentral\web\Web.config in Notepad.
  2. Locate the following line: <add key="ASPNETChatControl.DAL.SqlServer.DSN" value="Data Source=OLDSERVER;Initial Catalog=lobbycentral_chat;User ID=auserid;Password=apassword"/>
    Change the value for Data Source, User ID, and Password as indicated in bold above.
  3. Save the file and exit.

Updating LobbyCentralService.exe.config
If you are using LobbyCentral version 6.1 or higher, the configuration file will be encrypted.  Click here for instructions on how to decrypt the configuration file.

  1. Open lobbycentral\server\LobbyCentralService.exe.config in Notepad.
  2. Locate the dataSource property and change the value to the new server.   Important:   do not forget the instance name if it is a Named Instance. i.e. SERVER\INSTANCE_NAME
  3. Verify that the userID matches the one used in step 8 above.
  4. Change the password to the one created for the userid account.
  5. Save the file and exit.
  6. Open Windows Services and start the LobbyCentral service.

If the service fails to start, verify that the server, username, and password in the config file are correct.  You can check the log file in lobbycentral\logs\server for the exact error.   

If the error says "could not find or connect to SQL server" it means that the dataSource name is incorrect.  If the error says "invalid login for user <username>" the username or password is incorrect.

Other Files to Update (if in use)
It will be necessary to update the configuration files for other LobbyCentral applications if they are in use.   The table below shows the configuration files associated with each application.

Mobile Handler \lobbycentral\MSP\CustomerSettings.config
API Service \lobbycentral\API Service\web\web.config
Appointment Broker \lobbycentral\Appt Broker\CustomerSettings.config