Connection String Format
The basic SQLite connection string format:Connection Examples
- Local File
- In-Memory
- Read-Only
- Advanced
Adding a SQLite Connection
Interactive Mode
- Name: Enter a friendly name (e.g., “LocalDB”, “TestDB”)
- Type: Select “SQLite”
- Connection String: Enter your connection string
Supported Features
Connection Management - Add, test, list, and remove connections
Schema Exploration - List tables and view table structures
Table Browsing - View table data with pagination
Query Execution - Run custom SQL queries interactively
Data Export - Export tables to CSV or JSON formats
File Path Handling
Cross-Platform Paths
- Linux/macOS
- Windows
SQLite-Specific Tips
Performance Optimization
Enable WAL Mode
Enable WAL Mode
WAL (Write-Ahead Logging) mode improves concurrency and performance:Run this query once after creating your database using:
Optimize VACUUM
Optimize VACUUM
Reclaim unused space and optimize the database:Run periodically to maintain optimal performance:
Analyze Statistics
Analyze Statistics
Update query optimizer statistics:Run after significant data changes:
Common Workflows
- Create & Populate
- Explore Existing
- Query & Analyze
Troubleshooting
Database file not found
Database file not found
Error:
unable to open database fileSolutions:- Verify the file path is correct (check spelling and case)
- Use absolute paths to avoid confusion
- Ensure parent directory exists
- Check file permissions (must be readable)
Permission denied
Permission denied
Error:
attempt to write a readonly databaseSolutions:- Check file permissions:
chmod 664 myapp.db - Check directory permissions (SQLite needs write access to the directory)
- Ensure you’re not accessing a read-only filesystem
Database is locked
Database is locked
Error:
database is lockedSolutions:- Close other applications accessing the database
- Wait for long-running queries to complete
- Enable WAL mode for better concurrency
- Check for stale lock files (
.db-shm,.db-wal)
Corrupted database
Corrupted database
Error:
database disk image is malformedSolutions:- Try to recover with
.recovercommand in sqlite3 - Restore from backup if available
- Check disk space and filesystem integrity
Best Practices
Use absolute paths in production to avoid ambiguity
Enable WAL mode for better concurrency
Run VACUUM periodically to optimize storage
Regular backups - simply copy the
.db fileForeign keys - explicitly enable if your schema uses them
Working with Commands
SQLite works with all Queryly commands:Command Reference
See the complete command reference for all available options
Next Steps
Schema Exploration
Learn how to explore database schemas
Data Operations
Browse and query table data
Providers Overview
Compare all database providers
Connection Management
Manage your database connections