Overview | Disable Polling | Disconnect Clients | Migrate Database | Configure Polling | Configure Clients
At a high level, the migration between two database servers is a 5 step process. These steps are:
The user performing the migration will need the following capabilities:
- User administration rights on both the source and destination database server
- A Visual Casino 6 application user with the configure SIN Settings and Configure CID Settings permissions
Before performing a migration, please make sure that the destination database server meets application requirements. These requirements can be found at https://support.biometrica.com/hc/en-us/articles/360002270613-Hardware-and-Software-Requirements.
First, we must determine where polling occurs and what kind of polling is in use. To do this:
- Log in to Visual Casino 6 with a user that has Configure SIN Settings and Configure CID Settings permissions
- Select the menu Administration > System Settings > CID Settings ...
- Note the name of the CID Polling Machine
- Note if Run as a Service checkbox is checked
The name listed on this dialog box is the Windows name of the polling machine. If the Run as a Service checkbox is checked, proceed to the Disable Service Polling section. If Run as a Service is not checked, proceed to the Disable Application Polling section.
- Locate the machine listed as the Polling Machine
- Have all users quit the Visual Casino 6 application - alternatively an administrator can kill all of the application sessions for Visual Casino 6 from the Task Manager.
- Locate the machine listed as the Polling Machine
- Log in to the machine using a computer administrator account
- Run Visual Casino 6 as an Administrator (Right Click on the application and select Run as Administrator)
- Select the menu Administration > Advanced Settings
- In the tree of the dialog, under Service Settings, select Service Startup
- In the right hand window select Uninstall all services
- Close the window and exit Visual Casino 6
- Begin an SQL session on the source SQL server with a user that can manage logins and sessions
- Disable login for the VisualCasino login
- Kill all the sessions associated with the login VisualCasino
You may use the following script to complete the above steps:
ALTER LOGIN VisualCasino DISABLE
GO
DECLARE @sql NVARCHAR(MAX) = N'';
SELECT @sql += N'KILL ' + CONVERT(VARCHAR(11), session_id) + N';'
FROM sys.dm_exec_sessions
WHERE login_name = N'VisualCasino'
EXEC sys.sp_executesql @sql;
Migration of the database requires two tasks to be completed. You must first move the database from the source server to the destination server. Second, you must create the database's application user on the destination server.
Microsoft has a detailed explanation regarding how to copy a database. Their current information can be found at:
https://docs.microsoft.com/en-us/sql/relational-databases/databases/copy-databases-to-other-servers
In general, database migration can be performed either offline or online. Depending on your server load and the size of your database, please choose the approach that is best for the transaction loads on the source and destination servers.
When in doubt, offline migration (where you backup the database from the source and restore it to the destination) is recommended. The name of the new database is recommended to be VisualCasino, but can be any name you choose.
Create the Application User for the Database
- Begin an SQL session with the destination SQL server
- Create a new login named VisualCasino with the password VisualCasino
- Create a new user associated with the VisualCasino database connected to the VisualCasino login
- Add the db_owner role to the user
- Set the default database for the login to VisualCasino
You may use the following script to complete the above steps:
IF NOT EXISTS (SELECT * FROM master.dbo.syslogins WHERE [name]= N'VisualCasino')
BEGIN
CREATE LOGIN VisualCasino WITH PASSWORD = 'VisualCasino'
PRINT N'INFO : Login VisualCasino created with password.'
EXEC sp_defaultdb @loginame='VisualCasino', @defdb='VisualCasino'
PRINT N'INFO : Login VisualCasino default database set to VisualCasino.'
END
ELSE
PRINT N'WARNING: Login VisualCasino already exists.'
USE VisualCasino;
IF EXISTS (SELECT * FROM sys.database_principals WHERE [name]=N'VisualCasino')
BEGIN
DROP USER VisualCasino
PRINT N'WARNING: DB User VisualCasino removed from database VisualCasino.'
END
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE [name]=N'VisualCasino')
BEGIN
CREATE USER VisualCasino FOR LOGIN VisualCasino
PRINT N'INFO : DB User VisualCasino created for Login VisualCasino.'
EXEC sp_addrolemember N'db_owner', N'VisualCasino'
PRINT N'INFO : DB User VisualCasino granted ownership of database VisualCasino.'
END
ELSE
PRINT N'WARNING: DB User VisualCasino already exists in database VisualCasino.'
Note: your organization's minimum password requirements may prevent this script from running. You may change this password if necessary or desired, simply note any change because this password is required to configure the polling service and the clients. The password is in the 3rd line of the script. Alternatively, you can append , CHECK_POLICY=OFF
to line 3 to ignore the password requirement.
4. Configure and Enable Polling
Configuring and Enabling Polling consists of one required and one optional - but recommended - step. First, you need to create a dbinit file. This file contains the configuration information for the Visual Casino 6 application to communicate with the database. Second, you can optionally enable or re-enable the polling service.
The dbinit file is a configuration file that the application uses to connect to the database. It is not tied to any machine, so once created, it can be copied between machines to set up Visual Casino 6 clients. To create the file:
- Open Visual Casino 6
- Select Create DB Init File
- Enter the new Server\Instance name
- Enter the new Database name (default is VisualCasino)
- Enter the new Username (default is VisualCasino)
- Enter and confirm the new Password (default is VisualCasino)
- Select Save
- Choose the following local path location to save the configuration file: C:\ProgramData\VisualCasino6\
- You may name it how you choose as long as it carries the extension dbinit
- Verify the configuration works by logging into the new database - note that the most common issue here is that sometimes Instance names are not required when only one SQL instance is installed on a machine
- Copy the dbinit file to a portable or shared drive for easy import onto other workstations
While not required, using the polling service is highly recommended. By using the polling service, staff are no longer required to keep Visual Casino 6 running the polling machine at all times in order to receive data updates. To enable polling on this machine:
- Start Visual Casino 6 as an Administrator (right-click Run as Administrator)
- Log in as a Visual Casino Administrator
- Select Administration > Advanced Settings
- In the left hand tree, select Service Settings > Service Setup
- Ensure that Install SIN Service and Install CID Service are checked
- Click Install
To configure a client Visual Casino 6 machine:
- copy the saved dbinit file to the C:\ProgramData\VisualCasino6\ folder