sqlite: attached database doesn't work properly 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&gt; .databases
main: /db/RecordingDb.sqlite

sqlite&gt; 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&gt; attach database 'RecordingDB.sqlite' as RecordingDb;

sqlite&gt; .databases
main: 
RecordingDb: /db/RecordingDB.sqlite

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


Why?

Similar question:

Working with multiple databases?
Linux has case sensitive file names.


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