1

1) I can open database from the command line:

bash-3.2 # sqlite3 RecordingDb.sqlite
SQLite version 3.16.2 2017-01-06 16:32:41
Enter ".help" for usage hints.

sqlite> .databases
main: /db/RecordingDb.sqlite

sqlite> select * from recording limit 1;
|110|4||1423222200|1423049398|1423051200|0|0||0|100|||0|0||||1013760|1|11|4|19300||4|4|1801|||4||0|0||||20486|||

2) I can attach it from the sqlite prompt, but it doesn't work properly:

bash-3.2 # sqlite3
SQLite version 3.16.2 2017-01-06 16:32:41
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.

sqlite> attach database 'RecordingDB.sqlite' as RecordingDb;

sqlite> .databases
main: 
RecordingDb: /db/RecordingDB.sqlite

sqlite> select * from RecordingDb.recording limit 1;
Error: no such table: RecordingDb.recording

Why?

Similar question:

Working with multiple databases?

1

Linux has case sensitive file names.

       main: /db/RecordingDb.sqlite
RecordingDb: /db/RecordingDB.sqlite
                           ^

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.