I have a table in my sqlite3 database that stores 1001 float numbers in 1001 columns. I wish to dump the database to ascii format for backup purposes, and I expect the ".dump" function will create a snapshot of the database.

However, I didn't find any rows of data in the table after restoration. When I inspect the dump file, I didn't find any INSERT commands.

Did I miss any arguments in the ".dump" command to dump the database successfully?

Here's the minimal sql command to construct the database (command.sql):

   |CREATE TABLE trace1001_constructs (
        id INTEGER NOT NULL,
        tr0000 FLOAT,
        tr0001 FLOAT,
        tr0002 FLOAT,
        ......(and so on).....
        tr0999 FLOAT,
        tr1000 FLOAT,
        PRIMARY KEY (id));
   INSERT INTO trace1001_constructs(id) VALUES (1);
   |

This is the command I intend to generate the file dump (dump.sql) from linux shell:

   $ rm -f database.sqlite
   $ sqlite3 database.sqlite < command.sql
   $ sqlite3 database.sqlite ".dump" > dump.sql


I don't think SQLITE_MAX_COLUMNS is the limiting factor, as I only have 1002 columns in the above table. I don't think SQLITE_MAX_SQL_LENGTH is the limiting factor either, as the CREATE TABLE command is present in the file dump.sql, which should be much longer than the INSERT command.


||
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to