TimeBase Repair Shop is an application for diagnosing and fixing database problems.
Repair Shop identifies a wide range of issues, ranging from tune-up recommendations to potential database corruption.
After issues have been identified, the user can proceed with recommended resolutions.
QuantServerHome must be stopped before running TimeBase Repair Shop .
See How To Instruction for additional information about TimeBase repair
Start TimeBase Repair Shop by clicking on the desktop shortcut
- In QuantServer Architect highlight the Storage block
- Right-click to open context menu
- Click TimeBase Repair Shop to open Repair Shop console
You can also run
tbrep script form the QuantServer\bin to open a Repair Shop console.
Opening a TimeBase Folder
On start-up, Repair Shop immediately prompts the user to select and open a TimeBase folder.
Typically, the TimeBase folder is a sub-folder of QuantServer home, called
tickdb. Other folders at this level are called config, logs and services. The TimeBase folder is identified in the Open dialog by a “database” icon.
After you open a TimeBase folder, you will see the database icon in the main area of the window. This mode is called Database Tree Mode. However, right after opening a database you only see one node in the tree.
This is because the Repair Shop does not scan database structure automatically.
If you want to diagnose and/or repair the entire database, there is no need to scan the structure separately.
Note that the database root node is pre-selected. You can proceed directly with the
Full Scan command.
However, if you would like to troubleshoot only a part of database structure, you will need to click the
Scan Structure command in order to display all database components.
Scan Structure command will put the Repair Shop in
Task Mode, which is described below.
After the structure scan is completed, select Return, and you will return to the Database Tree Mode, with the full structure of the database now visible in the tree.
The five levels of the database tree represent (see attached picture for reference):
- At the root level, the entire logical database instance.
- Under the root, the database folder, or a number of folders, if the database has been distributed to multiple locations.
- Under the database folder, one or more physical stream folders.
- Under the stream folder, the logical stream object.
- And, finally, under the stream object, a number of M-Files (each occupying a pair of physical files)
Scanning for Problems
Not only does the database tree give you visual representation of the database structure, but, more importantly, it allows you to select a subset of the database, such as a stream, or an M-File, or any combination of streams and M-Files, to be diagnosed and repaired.
For example, you may have a multi-terabyte database, but you only want to diagnose one particular stream, which you suspect is having problems, or requires tuning.
In that case:
- Open the database
- Click Scan Structure
- Address any issues diagnosed during the scan
- Select the desired stream in the tree
- Proceed with Full Scan
After you click
Full Scan, the Repair Shop enters so-called
In Task Mode, the top portion of the window represents a list of executing tasks, while at the bottom is a list of diagnostics and optional reports.
You can interrupt the process at any time by clicking the
At the end of a perfect diagnostic run, all tasks are green, and there are no warnings in the diagnostic window.
You can re-run the diagnostic process after it completes, or return to the Database Tree Mode.
If there are any issues detected, you will see diagnostics in the bottom list.
Click on any diagnostic to obtain detailed information in the detail pane to the right of the list.
Some diagnostics will have resolutions displayed in the
Action column, and some will not.
This is normal. A single effect or combination of effects can produce multiple diagnostics, but only one will carry a repair action. For example, in the attached picture, the Missing Index diagnostic is not associated with a resolution, but is immediately followed by an Unindexed Data message, carrying the Rebuild index action.
To proceed with repairing TimeBase, click the
Resolve button after carefully reviewing the suggested actions.
Alternatively, you can restore the database from backup, fix issues manually.
For example, when the Repair Shop finds an unrecognized file in the database folders, it suggests the removal of the file. If you recognize a valuable file that has been accidentally stored into the TimeBase folder, you might want to intervene manually and move it out, rather than having the tool proceed with removing the file.
When you click
Resolve, the task list is re-initialized with new tasks, corresponding to the resolution actions. The tasks are executed, and any additional issues are again diagnosed. You cannot re-run resolution tasks, because they modify data. After the resolution process has completed, you can return to the Database Tree Mode and either exit the tool, or re-scan the database to make sure it is completely clean.
Scan and Repair Options
There are a few options to the right of the command buttons on the tool bar, which control the diagnostic and repair process:
Full Scan command is strictly read-only and does not modify anything. However, if desired, you can check the
Rebuild Indexes box and the Repair Shop will automatically rebuild all indexes in the process of scanning data.
The cost of rebuilding indexes is fairly small, if the data has to be scanned anyway.
You should only check this option when you suspect massive problems with index files, or when so suggested by a customer support representative.
Checking this option will cause the Repair Shop to immediately execute all suggested resolutions.
You should check this option only if you expect the scan process to take a long time and you are absolutely certain that you will want to execute all repair options suggested by the Repair Shop.
Check Message Content
Checking this option will cause validate message content, check message fields for incorrect encoding and constraint violations.
Pay attention, that this function does not repair messages and can be used for diagnostics only.
Checking this option will cause reports to be generated for every M-File, detailing the time range, number of messages, some index characteristics, and more.
When this option is checked, an additional tab appears in the lower part of the Task Mode view - see attached picture for reference.