Maintaining the PDQ Inventory Database

<< Click to Display Table of Contents >>

Maintaining the PDQ Inventory Database

PDQ Inventory stores all of its data—collections/reports, computer inventory information, Active Directory information, preference settings, etc.—in an SQLite database file. The PDQ Inventory database is essential to the program function; therefore, it is recommended that you perform the following regular maintenance procedures to ensure optimal database performance:

Location of the PDQ Inventory Database

Backing Up the PDQ Inventory Database

Optimizing the Database

Restoring the Database

Location of the PDQ Inventory Database

PDQ Inventory stores its database locally (on the PDQ Inventory console computer) in %ProgramData%\Admin Arsenal\PDQ Inventory.

NOTE: %ProgramData%, was introduced in Windows Vista and used in subsequent Operating Systems (Windows 7, 8.x, 10, etc), and is a folder designed to hold application-specific (that is, not user-specific) data. By default, Windows marks this folder as hidden. Its default location is %SYSTEMDRIVE%\ProgramData. If you are running PDQ Inventory on Windows XP or 2003 (no longer supported), the default location is %SYSTEMDRIVE%\Documents and Settings\All Users\Application Data.

If your console performance is lagging during scans, you may consider moving the PDQ Inventory database to a faster disk. For information on this procedure, visit the PDQ.com Support page at https://support.pdq.com/home and click Submit a Request or email your request directly to support@pdq.com, or click Help > Submit Feedback. You can also browse the PDQ.com forums for FAQs.

Backing Up the PDQ Inventory Database

Because the PDQ Inventory database stores all collections, reports, and computer inventory information, it is highly recommended that you regularly backup the PDQ Inventory database. Since the SQLite database is a single file, this is easy to accomplish. You can setup an Automatic Backup Schedule in the Database page of Preferences. The default backup schedule is weekly on Saturdays at 10:00 PM. The default will also retain 10 compressed backups.

By default, the PDQ Inventory database is located at %ProgramData%\Admin Arsenal\PDQ Inventory\Database.db. To protect your system data, configure your backup software to regularly back up this file.

NOTE: To determine the location of the PDQ Inventory database, click Options > Preferences or press Ctrl+Comma, then select Database. The Database field displays the path and filename for the PDQ Inventory database. The backup location displays the path and filename for the backup database files.

To change the PDQ Inventory database backup defaults, perform the following:

1.Click Options > Preferences or press Ctrl+Comma, then select Database.

2.Make the appropriate changes in the Database Preferences window:

Option

Description

Enable automatic backups

Enables the PDQ Inventory automatic backups feature. This is enabled by default.

Schedule

Displays the current schedule for the automatic backup. Clicking the Edit Schedule button will open the Select Trigger window to edit the schedule. Additionally, you can click the Delete Schedule button to clear the schedule selection. The default schedule is every week on Saturday at 10:00 PM.

Note: If no schedule is selected, a backup will not be performed regardless of whether Enable automatic backups is selected. A warning at the bottom of the Automatic Backup Schedule section will notify you if this is the case.

 

Once

Schedule once in the future.

Trigger On: Date the trigger will run.

At: Time the trigger will run.

Description: (Optional) Description of the trigger.

Interval

Backs up (and repeats) at a set time interval.

Every: The interval by day, hour, and minute.

Only run during the following time frame (Optional) Enables a set time frame.

Between: The start of the time frame.

And: The end of the time frame.

Starting: Date the trigger starts.

At: Time the first trigger starts. If the optional time frame is selected, the first trigger will occur at the start of the next time frame.

Ending: (Optional) Date the trigger ends. Leaving this unchecked will allow the trigger to run indefinitely.

At: (Optional) Time the trigger ends.

Description: (Optional) Description of the trigger.

NOTE: Setting the 'Between' time later than the 'And' time will result in the trigger running overnight.

Daily

Backs up every day at the same time.

Every Day At:

Time the trigger will run.

Starting: Date the trigger starts.

Ending: (Optional) Date the trigger ends. Leaving this unchecked will allow the trigger to run indefinitely.

Description: (Optional) Description of the trigger.

Weekly

Backs up every week at the same time on selected days of the week.

Every Week On:

Day (or days) that the trigger runs.

At: Time the trigger will run.

Starting: Date the trigger starts.

Ending: (Optional) Date the trigger ends. Leaving this unchecked will allow the trigger to run indefinitely.

Description: (Optional) Description of the trigger.

Monthly

Backs up every month at the same time on selected days.

Every Month

Day of the Month: The actual day (or days) of the month (for example, 1, 12, 23, etc.). If you select the 29th, 30th, or 31st of the month, the trigger won't run in months without those days. Select Last to always run the trigger on the last day of the month.

Or

Day of the Week: The nth day of the month (for example, First Monday, Second Wednesday, Last, etc.). Different combinations of weeks and days require separate schedules (for example, the 1st Monday and the 2nd Friday). Selecting the 5th week won't run the trigger in a month without a fifth week. Select Last to always run the trigger on the last week of the month.

At: Time the trigger runs.

Starting: Date the trigger starts.

Ending: (Optional) Date that the trigger ends. Leaving this unchecked will allow the trigger to run indefinitely.

Description: (Optional) Description of the trigger.

TIP: Days of Month: If you select the 29th, 30th, or 31st of the month, the backup won't occur in months without those days. Use Last to  always deploy on the last day of the month. Can be mixed with Weeks of the Month.

TIP: Weekdays/ends of Month: Different combinations of weeks and days are not available (for example, the 1st Monday and the 2nd Friday.) Selecting the 5th day(s) won't deploy in a month without a fifth week. Use Last to always deploy on the last week of the month. Can be mixed with Days of the Month.

Backup Location

Displays the path where backup files are stored. The default location is C:\ProgramData\Admin Arsenal\PDQ Inventory\Backups. Click the Open Folder Location button to view the location of the backup.

NOTE: The backup file is named after the version of the database with the date and time the backup was performed. For example a backup of version 9 performed on March 23, 2016 at 2:32 PM will be titled PDQInventory- 9.1.0.0-16-03-23 1432.db.cab

Backups to Keep

Specifies the number of most recent backup files to keep. Setting this to 0 will save all backups. The default setting is 10.

 

Compress backups

Automatically compresses each backup to save space. This is enabled by default.

Backup Now

Backs up immediately instead of waiting for the next scheduled backup.

Last Backup

Displays the date and time of the last database backup as well as how long ago the backup was performed.

Next Backup

Displays the data and time of the next backup as well as how long until the next backup is performed.

Optimizing the Database

When PDQ Inventory deletes information from the PDQ Inventory database, it leaves empty space in the database file which takes up a few bytes. Over time, this space adds up and may impact database performance. Therefore, it is recommended that, on average, you optimize the PDQ Inventory database once a month. Optimizing the database frees up the empty space and gets rid of fragmentation.

NOTE: Optimizing the database stops the background service. Any outstanding scans will be aborted so take care to only optimize the database at appropriate times.

NOTE: PDQ Inventory automatically optimizes the database when the application is upgraded.

To optimize the PDQ Inventory database:

1.Click Options > Preferences or press Ctrl+Comma.

2.In the Preferences menu, click Database.

3.Click Optimize Database.

PDQ Inventory warns that the console and background service will be stopped, which will abort any running scans.

4.Click OK to continue.

PDQ Inventory opens a command line window to run the optimization command.

5.When the optimization completes, press Enter to close the command line window.

PDQ Inventory automatically restarts and opens the Preferences window.

6.Click Close.

RESTORING the Database

In the case of something happening to your system and you need to revert to a previous version of a database, you can restore the database through an elevated command prompt.

IMPORTANT: This does not restore PDQ Inventory to a different version, this only restores the database.

To restore the PDQ Inventory database:

1.Run cmd.exe as Administrator.

2.To view the options available when restoring the database, use the following command: PDQInventory.exe RestoreDatabase.

3.Enter the number of the database you wish to restore.

4.(Optional) To automatically restore the most recent database, use the following command: PDQInventory.exe RestoreDatabase -RestoreMostRecent. The database being overwritten will be renamed and left in the same folder.

See also

Defining System Preferences

Restore the PDQ Inventory Database

Move PDQ Inventory to Another Computer

 

 

 

 

© 2022 PDQ.com Corporation. All rights reserved.

PDQ.com is a trademark of PDQ.com Corporation. All other product and company names are the property of their respective owners.

Help Version: 19.3.350.0