Scripts for creating blank databases
Command Centre Databases (SQL) › Creating blank ones using scripts (8.20 and above)
This page answers
Where are the create-database scripts on 8.20+ install media?
How do you run them with sqlcmd?
Why do the clients error afterward, and how do you fix the thumbprint?
Note: On a live site, detach and back up the existing databases before proceeding.
The 8.20+ install media no longer contains blank versions of CCFTCentral and CCFTEvent. Instead there are two SQL scripts that create them, on the install media under:
\Utilities\Database scriptsCreateCentralDatabase.sql: createsCCFTCentralCreateEventDatabase.sql: createsCCFTEvents
The scripts cannot be run directly. They can be opened and executed in SSMS, but SSMS may not be installed on the CC server, so they can also be applied with sqlcmd from the command line. Log in as a local admin (or launch CMD as admin) and run:
sqlcmd -S CCserverName\instanceName -i SQLscriptLocation
Note: In the command above the
-Sswitch is uppercase and the-iswitch is lowercase. The switches are case-sensitive and affect how the command runs.
This creates and attaches the databases to the GALLAGHER instance. The database files are saved in the SQL program-files folder, which depends on the SQL version. For a default CC 8.20 install using x64 SQL 2017:
You could leave the databases there, but then detaching/attaching from CCFTServiceManager would no longer work and you would need SSMS. To move them to the default Gallagher data folder:
Stop the Command Centre services.
Use
CCFTServiceManagerto detach the databases.Copy the databases from the SQL program-files data folder (above).
Paste them into the Gallagher data folder:
C:\Program Files (x86)\Gallagher\Command Centre\DataUse
CCFTServiceManagerto attach the databases.Apply a new recovery code to the databases (see below).
Start the Command Centre services.
Regenerating the thumbprint
At this point the services start, but launching the clients gives an error:

The server thumbprint in the client config files no longer matches the thumbprint in the new blank databases, so the clients are no longer trusted by the server. To resolve:
Launch
CCFTRecoveryCode.exeand choose Generate a new code for this system.Use
CCFTServiceManagerto start the services.
Replacing the event database only
If you are only restoring CCFTEvent, the procedure is the same but run CreateEventDatabase.sql only, copy/replace CCFTEvent only, attach, and start services. No new recovery code is needed in this case; the clients should connect once the services start for the first time.
🔗 Related
Databases - Attaching blank ones to 8.20 and above. Reusing blank databases from previous version media.
Databases - Detaching and Reattaching. The detach/attach tooling.
Last updated
Was this helpful?
