PCLaw Backups: Step by Step Procedure for CTREE Databases

PCLaw Backups: Step by Step Procedure for CTREE Databases

The following instructions will take you through each step required to create a Universal Database backup of PC Law data.

Below are the high-level steps.  You can click on a topic, or scroll through the entire article for step by step instructions. 

1. Verify Data Integrity

First, ask all other users in your firm to exit PC law.

Log into PC Law and select Tools > Verify Data Integrity.



Check all the options and then click OK:



If other users in your firm did not exit PC law, you may have a prompt asking them to exit.

2. Locate the PC Law Data

To find out where the PC Law data exists, find a PC Law shortcut, right-click on it, and choose "Open File Location".



Repeat this process until you are in a location similar to the following.  Then double-click on the LOCALDATA folder.

 

Open the PCLaw.cf file:


And you will see the following relevant locations:


 

Navigate to that location.

WARNING:  All users must exit PCLAW before proceeding otherwise you will not be able to take a complete backup as database tables that are in use will not be added to the archive.

If you need a comprehensive backup, create a ZIP file of everything in that location.

If you only need practice management data, go into the Data subfolder and create a ZIP of just the DynData and StatData files:



3. Copy the PC Law data to your computer

After you have created the archive (zip file) of your data, copy it to a working folder on your Migration Workstation and extract the data.

4. Create a Table List

PCLaw uses the FAIRCOM CTREE database format.

The following PowerShell script generates a table list which you can then use to connect to FAIRCON ODBC. 

  1. $ROOT = "D:\ServerFolders\Company\PCLaw\DATA"
  2. $OutputFileName = "$ROOT\PCLAW.DB.txt"

  3. $Folders = @(
  4. "$ROOT\dyndata",
  5. "$ROOT\statdata"
  6. )

  7. $Files = $Folders `
  8. | Where-Object { [System.IO.Directory]::Exists($_) } `
  9. | Get-ChildItem -Filter *.dat `
  10. | Where-Object { $_.Name -inotlike "TTE*" } # Ignore temporary tables

  11. $Files

  12. $Lines = $Files `
  13. | ForEach-Object { [System.IO.Path]::GetFileNameWithoutExtension($_.FullName) + " " + $_.FullName }

  14. [System.IO.File]::WriteAllLines($OutputFileName, $Lines)

Each CTREE-based application stores its data files in different locations so you will need to refer to each application individually, however, the table list will be a regular text file that will have content similar to the following:

  1. TABLENAME001 E:\DATA\SOMEPATH\TABLENAME001.DAT
  2. TABLENAME002 E:\DATA\SOMEPATH\TABLENAME002.DAT

The table list must use absolute paths to the data files.  If your table list does not have absolute paths, update it so that it does.

5. Install the CTREE Drivers

Download and extract the appropriate CTREE drivers.  Then run the Setup.exe file that is contained in the CTREE Drivers folder.

PCLaw Version
CTREE Driver Version
PCLaw v14.7
FairCom CTREE v3.18


6. Create a System DSN

The CTREE ODBC Drivers are 32-bit drivers and as such, can only be used by 32-bit applications.

After you successfully install the CTREE Drivers the 32-bit ODBC dialog window shown below will automatically open so you can configure an ODBC connection to your PC Law data using the CTREE drivers you just installed.

You can also manually open this dialog by searching ODBC 32-bit from your start menu.



Then add a new System DNS:



And select the FairCom 32-bit ODBC Driver:



Below is an example of the proper settings for a PC Law database.

Data Source Name (aka "DSN")

This is the ODBC name you want for your database.  Any name will do.

Script Name

This is the filename (without the path) of the table list file you created earlier.  Just make sure that if you open that file, you see content similar to what was described in Step #2.

Data Dictionary Path

This is the path (without the file name) of the table list you created.

Alignment

Alignment must be set to 1 Byte for a PC Law database.  That setting can be found by clicking the Options button noted by the green arrow above.

 

7. Convert the Database to MSSQL

You can now use the 32-bit version of Full Convert by Spectral Core to convert this database from ODBC to SQL Server.

Click New database copy project.



Select ODBC as the Source database type.

DSN will be the Data Source Name (aka "DSN") you used in step 6 when you created the System DSN.



Click Next

Select your target database.  You can also type (local) for the Server name.



When you click Next you will receive a warning (shown below) if the database name you selected doesn't already exist on your chosen SQL Server.  You can click Yes to create it now.  If the database already exists you won't see this warning.



IMPORTANT

There are some additional configuration options we must select prior to starting our copy.

Move the toggle to Project overview and click the PROJECT OVERVIEW button.



You will see something like this as Full Convert analyzes your source table.



On the next screen click Project options from the left menu.



Scroll down until you see this section and type the values shown below in the Data types box.

  1. tinyint = bigint
  2. smallint = bigint
  3. int=bigint



Once done, click the Back button on the top left.

Look through the list of tables on this screen.  If you see any in red as shown below then you have a table defined that has 0 columns.  These will prevent you from beginning the copy process.



Click the Edit button for each table with a red warning next to it to confirm that there truly are zero columns defined.  Then click the checkbox to the left of the table name to indicate to Full Convert to skip those tables.

You are now ready to begin converting the PC Law data to MSSQL.  Click the Copy your database button near the top left.



8. Create Universal Database backup

Launch Universal Migrator and click Backup



Select PC Law from the Backup utility list.


There are two database selections you must make.

Shown in red below is where you select the name of the Universal database you are going to create.

Shown in green is where you will select the PC Law database you've created in steps 1-6


Select what data you wish to backup.

If you're backing up custom field definitions you will need to fill in the StatData folder shown in green above.  This will be the full path to where your StatData folder is located.  It may look something like.

A:\MIGRATION\LEGACY_PCLaw_TestDb5\DATA\STATDATA

If you're backing up documents you will need to provide the Document Root Path.  This is where you want UM to cache the documents locally on your Migration Workstation.

You're now ready to click Next and begin your PC Law backup to a Universal Database.

 

 


    • Related Articles

    • PCLaw Migrations: Creating Database Backups

      Depending on a firm's version of PC Law, their PC Law database is running with either SQL Server or CTREE. You should identify the database type and use the appropriate measures to acquire a copy of their database and their STATDATA folder. For SQL ...
    • PCLaw Backups: Generating a Table List

      The following instructions will help you create a table list from PCLaw. Locate the PC Law Data To find out where the PC Law data exists, find a PC Law shortcut, right-click on it, and choose "Open File Location". Repeat this process until you are in ...
    • PCLaw Backups: Full Convert Options

      When using Full Convert to convert a PC Law database from a FairCom CTree data store to SQL, there are some additional options that must be configured. Summary Apply these Data Type Mappings tinyint=bigint smallint=bigint int=bigint Details After you ...
    • Action Step: Preparing for Data Restore

      When performing an injection into ActionStep, there are a few caveats you should be aware of. Data Validation Nuances Matter Validations All matters must be assigned a practice area prior to restoring data into the new system. Any matters that do not ...
    • Tabs3 Backups: Creating a Table List

      When connecting to TABS3, there are a few different database servers that may be used. To determine the correct database system, open the TABS3 System Configuration Utility: Then click Help > About System Config. You will then see something like this ...