Plan Academy

Plan Academy Project Controls Training & Courses

News about the PMP certification

OnlinePMCourses Online Project Management Video Courses to Build Your Project Career

Primavera P6: reduce the local DB PPMDBSQLite to speed up application execution

Hi how are you? If you have come this far you may need to speed up the execution of the Oracle Primavera P6 application.
The short guide refers to the installations with the local Spring DB PPMDBSQLite.db and to the version P6 Professional R16.2 (x64) even if this procedure can also work with other versions.
For problems relating to Oracle Server DB on the network, ask your IT administrator for support.

We come to the problem, in practice to order and to speed up P6 I have removed many projects from Primavera but the size of the DB has never decreased.
As you see below, over time I had made copies of DB and you can see how the size has always increased, although it has sometimes canceled entire years of projects.
This I think is the problem that when I copy a Project, or when I import a large one, the import process never goes to the end, it either fails or I have to shut down the program and restart.

Like other databases, sqlite does not automatically reduce the size of data files when data is deleted. At least it doesn't by default.

To solve the problem, first make a backup copy of the DB itself, close P6, and then connect to the database with the administration console, or by running the command:

sqlite3 DBNamein your case I think it is
sqlite3 PPMDBSQLite.db

Once connected, the command must be launched
VACUUM;
which compresses the datafile
Eventually you exit the console with the command
.q

Unfortunately you probably don't have that command available on your PC, the sqlite3 command derives from a stand alone sqlite installation that is outside the P6 spring installation that has the DB driver already inside it.

So I installed the package:
sqlite-tools-win32-x86-3290000.zip
(1.71 MiB) A bundle of command-line tools for managing SQLite database files, including the command-line shell program, the sqldiff.exeprogram, and the sqlite3_analyzer.exe program.
(sha1: f009ff42b8c22886675005e3e57c94d62bca12b3)

From the site
https://www.sqlite.org/download.html

AC: \ Users \ ofgod> cd \ Users \ ofgod \ Downloads

C: \ Users \ ofgod \ Downloads> cd sqlite-tools-win32-x86-3290000

C: \ Users \ ofgod \ Downloads \ sqlite-tools-win32-x86-3290000> sqlite3.exe \ TEMP \ PPMDBSQLite.db
SQLite version 3.29.0 2019-07-10 17:32:03
Enter ".help" for usage hints.
sqlite> VACUUM;
sqlite>
sqlite>
sqlite> .q

C: \ Users \ ofgod \ Downloads \ sqlite-tools-win32-x86-3290000>

Now the file is almost half the size and I hope the indexes have also been rebuilt.

Now P6 works better and is as fast as the first empty installation of the same application.

Good job, remember before doing this export and empty older projects from P6,

Close P6

Make a backup copy of PMDBSQLite.db

Launch sqlite3 and then the internal commands remembering the; after the statemend VACUUM.

good job

ADD

en_GBEnglish