Category Archives: Databases - Page 4

PSQL v11 error 7313: “Product key is already activated on a different machine”

For me this happened when one of my customers computers died with HD-failure. Since it was an old machine we decided to replace it with a new one. When I then tried to use the license key from the old computer on the new one I got this error.

The solution: 

Send an email to: dbcic@pervasive.com

with the following information:

  • What happened – why you need to deactivate the key
  • Who you are – name and company
  • The license key

I got an answer after just two hours where they said that they had deactivated the key. I then tried to use the key again and it worked!

 

UI bug in Pervasive Control Center (v11) on Win 7

So you installed PSQL v11 on a Windows 7 machine and now you can not create new databases due to missing options in the “New Database” window? Does it look like the screen below?

PCC New Database Pane

PCC New Database Pane

Ah we have all been there 🙂 This is due to a bug in Eclipse (which runs the PCC). There is no fix but there is a workaround:

  1. Go to Tools and click om “32-bit ODBC Administrator”
  2. Choose the “System DSN” tab and click “Add”
  3. As a “New Datasource” choose “Pervasive ODBC Engine Interface”
  4. In the “Pervasive ODBC Engine DSN Setup” click on “Create” in the “Database” section
  5. Give the database a name, set “Dictionary Location” to your DDF files and “Add” the path/s to your database files
  6. Now press “OK” to save your new database (you can now press “Test” in the “Pervasive ODBC Engine DSN Setup” to see that everything is working)
  7. Restart PCC and your new database should now turn up in the left tree view

SQLite check integrity and fix common problems

Every now and then you need to check the integrity of an SQLite database. The command for this is:

sqlite>PRAGMA integrity_check;

This will either report the problems or just return “ok”

If it does report problems one solution I always try first is to do an export/import of the database:

>sqlite3 database.db
sqlite>.output backup.db
sqlite>.dump
sqlite>.quit

>sqlite3 database_fixed.db
sqlite>.read backup.db
sqlite>.quit

>mv database_fixed.db database.db

This usually fix many of the common problems like “disk image is malformed” and “database is locked”

Tested on OSX 10.6.8 and SQLite v3.7.6 (MacPorts)