SQLITE3 VACUUM, “database or disk is full”

后端 未结 3 1561
甜味超标
甜味超标 2020-11-30 12:23

I\'m trying to run the VACUUM command on my database, but I seem to run out of space:

> sqlite3 mydatabase.db \"VACUUM\"
Error: database or d         


        
3条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-30 12:49

    To allow the VACUUM command to run, change the directory for temporary files to one that has enough free space.

    SQLite's documentation says the temporary directory is (in order):

    1. whatever is set with the PRAGMA temp_store_directory command; or
    2. whatever is set with the SQLITE_TMPDIR environment variable; or
    3. whatever is set with the TMPDIR environment variable; or
    4. /var/tmp; or
    5. /usr/tmp; or
    6. /tmp; or
    7. ., the current working directory

提交回复
热议问题