That error unfortunately means that the database has been damaged which is usually caused by a computer crash/powercut while the database was active although it can also be caused by faulty hardware. To attempt to fix it you can try a 'Full Cache Rebuild' via 'Database -> Database Management -> Rebuild Cache'. Be prepared for this to take a considerable amount of time if you have a large database, so you'll want to run it when you're not using PokerTracker 4 for a while (such as overnight maybe). Make sure that your computer does not power itself off or go to sleep while it's running or you will need to run it again from the start.
Alternatively you can reimport from the original hand history files into a new database using 'Play Poker -> Get Hands From Disk'. By default PokerTracker 4 moves your files to your 'Processed' folder which you can access via the 'File -> Open User Data Folder' menu option. Depending on the number of hands you have this import may take some time. You therefore would want to schedule this to start at the most convenient time. In other words I would not start this import if you have important poker sessions coming up as you cannot import manually and use PokerTracker 4 on live tables at the same time. If required you can break the import up into smaller chunks/folders.
If you do not have all your original hand history files on then you can
export them from the current database and export/import your manual player/hand notes if you have them (Database -> Notes). Also if you have a number of tournaments with manually entered results then exporting those tournaments will create summary files containing the manual results so they can be imported into a new database.