Where's the database stored?

Comments

8 comments

  • Adam Ruth

    George,

    The database is named "%ProgramData%\Admin Arsenal\PDQ Inventory\Database.db".  There are some other files in there which are temporary or for diagnostic uses, but this one file contains all of the inventory.

    http://documentation.adminarsenal.com/PDQInventory/1.1.2.0/data_files.htm

    0
    Comment actions Permalink
  • George B

    Oh, ok, found it!  I was looking under my current user's Program Data folder, but it was under "All Users".  Weird.

    Might want to show that in the interface or something.  Is there a database repair feature?  I didn't see one.  I know how these things can get corrupted sometimes.

    0
    Comment actions Permalink
  • Adam Ruth

    George,

    It's under All Users because the background service needs to access it, and it can run as a different user.  We have it on our roadmap to show the database in the interface, as well as allow it to be easily moved and maintained. 

    SQLite, which is the database engine we use, doesn't have a separate repair function, if any repairs need to be done it performs them automatically.  There is a kind of manual, last ditch repair which can be done (creating a new file and extracting any usable data from the corrupted file) which we may include in a future version.

    0
    Comment actions Permalink
  • George B

    Ah, ok, that make sense.  Not a problem.  That's awesome that it repairs automatically.  No muss no fuss!

    0
    Comment actions Permalink
  • Eduardo Trevino Jr.

    I have pdq deploy and invetory on a server 1.04TB. f: drive.

    but databases or  on c: drive that has 40gigs, and running out of space.

    is there a way to move it to the larger partition rather than resizing c:???

    0
    Comment actions Permalink
  • Adam Ruth

    The location of the database can be changed by adding an entry into the registry.  The key for PDQ Inventory is:

    HKEY_LOCAL_MACHINE\SOFTWARE\Admin Arsenal\PDQ Inventory\Settings\Database

    This key won't exist by default, so it will need to be created.  Inside the key add a string value called FileName which is the full path to the database file.  I've attached an example .reg file that sets the database to "F:\Admin Arsenal\PDQ Inventory\Database.db".  PDQ Deploy is the same, just replace PDQ Deploy in the key.

    To make the change take effect follow these steps:

    1. Close the console.
    2. Stop the PDQInventory service.
    3. Copy the database directory to the new location. It is currently located at "%ProgramData%\Admin Arsenal\PDQ Inventory".
    4. Create the above registry key and value pointing to the new database file.
    5. Restart the console.

     

    0
    Comment actions Permalink
  • Kenneth

    Hello Adam,

    I'm encountering a simular issue on the server that is used here but it's not the database that is becoming to large but the folder: C:\ProgramData\Admin Arsenal\PDQ Inventory\Scans that is causing the C-drive to run out of disk space.

    It's consuming 10GB out of 35GB total available. They have already reduced the number of days to keep from 14 till 10 days but that doesn't seem to be enough and the number of deploys on targets will increase significantly in the upcoming weeks.

    Is there a way that we can change the default location of the scan files like you did with the DB?

    Kr,

    Kenneth

    0
    Comment actions Permalink
  • Cezary R

    Hi Adam

    I tried to add REG KEY as

    [HKEY_LOCAL_MACHINE\SOFTWARE\Admin Arsenal\PDQ Inventory\Settings]
    "Database"="\"C:\\tmp\\PDQ\\Database.db\""

    but it doesn't seems to work. Could you correct me, what's wrong?

    Cezary

    0
    Comment actions Permalink

Please sign in to leave a comment.