Task 2.4.4(b): Recover Data Database, SQL Server Alternative
Note: It is recommended that you contact badgertracs@wi.dot.gov to help you assess your agency’s situation. There may be less drastic options available depending on the extent of the damage.
Purpose: Recreate the TraCS Data database when it is destroyed beyond repair and no backups exist.
Requirements: TraCS Installation files, access to field unit with TraCS mobile installed.
In SQL Server Management Studio (SSMS)
Create the tracs_Data database.
USE master GO CREATE DATABASE tracs_Data GO use tracs_Data GO DECLARE @sql1 VARCHAR(1000) SELECT @sql1='ALTER DATABASE '+quotename(db_name())+' SET ALLOW_SNAPSHOT_ISOLATION ON ALTER DATABASE '+quotename(db_name())+' SET SINGLE_USER WITH ROLLBACK IMMEDIATE ALTER DATABASE '+quotename(db_name())+' SET read_committed_snapshot ON ALTER DATABASE '+quotename(db_name())+' SET MULTI_USER' exec(@sql1)
Make sure to give your agencies TraCS SQL user owner rights to the database.
Run the BTDBData distribution file. (This adds state access levels.)
Remove the Distribution Data. xml file
Navigate to C:\ProgramData\TraCS\Settings
Delete DistributionData.xml
In the configuration manager, select the update tab.
Click the run distribution button.
Navigate to the C:\ProgramData\TraCS\Distribution\Templates folder
Select BTDBData.dist.exml
Perform a database sync.
In the configuration manager, select the utilities tab.
Click the Database Sync button.
In SQL Server Management Studio (SSMS), create the tables to store the form data in the tracs_data database by running the “Delta” SQL script. The script will be in the TraCS network folder under the DBData\SQLScripts folder. The name of the script takes the form of <Timestamp>Delta.sql. If there is more than one “Delta” script present, run the one with the most current timestamp.
Add Comment