36.3 Attach a Database (.mdf & .ldf files)
Attach a Database (.mdf & .ldf files)
In some cases a backup is not available but the data from the old/crashed PC is retrievable. We can attach the actual database file as opposed to ‘restoring’ it. The location of these files is most often found in ‘C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data’. You will need to copy two files for both databases, namely ‘JTime.mdf ‘, ‘JTime_log.ldf ‘, ‘JT_Supp.mdf’ and ‘JT_Supp_log.ldf’ to the same location on the new PC. If these files already exist you will need to stop SQL services before pasting the new files over the existing files.
Attach the Database
The following steps are done using ‘Microsoft SQL Server Management Studio Express’ found by clicking ‘Start’, ‘Programs’, and ‘Microsoft SQL Server’.
Right click Databases, select ‘Attach’.
Click ‘Add’ then browse for the .mdf file, highlight it and click ‘OK’. The file should be in ‘C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data’ or a similar path depending on SQL Server version.
Click ‘OK’ again on the ‘Attach’ window.
Related Articles
36.1 Manual Restore of Database
Manual Restore of Database In the event of data loss (e.g. stolen PC, malware, HDD failure etc), a restore from a previous backup will be necessary. This process will overwrite all information on the current database e.g. employees’ details, ...
36.2 Restore with .bak file
Restore with .bak file This restore method requires .bak files to be located in a folder on a local drive. It will not restore from a network location. Sometimes it is also necessary for the file to be located in a folder (C:\backup\restorefile.bak) ...
34.1 Backups
Backups There is an option to automatically perform a backup on a daily basis when the user logs out of the system. The Device Engine, if running, can also be configured to perform a daily backup at a set time every day. It can be configured to keep ...
29.1 Import and Re-Import of Clockings
Import and Re-Import of Clockings To import clockings manually (import immediately, not waiting for the device engine to import on its schedule), you can click on ‘Action’ then ‘Import Clockings’ from the menu bar, then click on ‘Import’. The system ...
11.8 Engine
Engine The Engine is a standalone part of Jarrison Time that should always be running. It only runs on one designated machine, as a service. The JT Engine processes device tasks using multi-threading. This means that by default it processes groups of ...