Common Pervasive PSQL Issues and Solutions
1. Database Connection Failures
Applications fail to connect to the Pervasive PSQL database.
Root Causes:
- Incorrect ODBC or JDBC configuration.
- Network connectivity issues preventing database access.
- Authentication or user permission errors.
Solution:
Verify ODBC settings using the Pervasive Control Center:
odbcad32.exe
Check the database service status:
net start psqlwge
Ensure firewall rules allow Pervasive database traffic:
netsh advfirewall firewall add rule name="Pervasive PSQL" dir=in action=allow program="C:\Program Files\PSQL\bin\psqlwge.exe" enable=yes
2. Database Corruption and Data Integrity Issues
Corrupt database files result in data loss or transaction failures.
Root Causes:
- Unexpected system shutdowns leading to incomplete transactions.
- Improper database file access or unauthorized modifications.
- Storage failures causing physical file corruption.
Solution:
Use the Pervasive Rebuild Utility to fix corrupted files:
rebuild /o mydatabase.dta
Check database consistency using Pervasive Database Check Utility:
dbcheck -c mydatabase.dta
Enable transaction durability to prevent corruption:
btrieve.cfg → TransactionDurability = ON
3. Slow Query Performance
Database queries take longer than expected to execute.
Root Causes:
- Missing or unoptimized indexes.
- Excessive locking due to concurrent transactions.
- Fragmented database files reducing read efficiency.
Solution:
Analyze query performance using the Pervasive Query Plan tool:
SELECT * FROM MyTable WHERE column = 'value'
Create indexes to optimize frequent queries:
CREATE INDEX idx_column ON MyTable(column);
Rebuild fragmented database files to improve performance:
rebuild /f mydatabase.dta
4. Licensing and Activation Errors
Database access is restricted due to licensing issues.
Root Causes:
- Expired or missing PSQL license key.
- Too many concurrent users exceeding license limits.
- Hardware changes affecting license validation.
Solution:
Check the current licensing status:
psqllic -list
Re-activate the license using PSQL License Administrator:
psqllic -activate key-XXXXX-XXXXX-XXXXX
Ensure proper licensing limits are set for concurrent users.
5. Backup and Restore Failures
Backup processes fail, or restored databases are incomplete.
Root Causes:
- Insufficient disk space for backup operations.
- Permissions preventing access to backup files.
- Backup taken while active transactions were incomplete.
Solution:
Use Pervasive Backup Agent to perform a safe backup:
psqlbackup -b mydatabase.bak
Ensure the database is in a consistent state before backup:
dbcheck -c mydatabase.dta
Restore the database safely:
psqlbackup -r mydatabase.bak
Best Practices for Pervasive PSQL Management
- Regularly monitor database health using the Pervasive Control Center.
- Enable transaction durability to prevent corruption.
- Use indexing to optimize query performance.
- Ensure proper licensing limits and avoid exceeding user thresholds.
- Schedule automated backups to prevent data loss.
Conclusion
By troubleshooting connection failures, database corruption, slow query performance, licensing issues, and backup failures, administrators can maintain a stable and efficient Pervasive PSQL environment. Implementing best practices ensures database reliability and performance.
FAQs
1. Why is my Pervasive PSQL database connection failing?
Check ODBC settings, verify network connectivity, and ensure database services are running.
2. How do I fix a corrupted PSQL database?
Use the Pervasive Rebuild Utility and Database Check Utility to repair and verify data integrity.
3. Why is my PSQL database running slowly?
Analyze query plans, create indexes for frequent queries, and rebuild fragmented database files.
4. How do I resolve PSQL licensing errors?
Verify active licenses, re-activate using the PSQL License Administrator, and ensure concurrent users do not exceed limits.
5. What is the best way to back up and restore PSQL databases?
Use the Pervasive Backup Agent, ensure data consistency before backup, and restore using the psqlbackup
command.