Re: [sqlite] Clone SQLite databases

2008-08-12 Thread Dennis Cote
csabi81 wrote: > Thanks Steve, I think I am on the right way. > It is a difference between the page sizes of the two databases. I have > opened each database with Firefox SQLite Manager, and at the DB Settings I > have seen a lot of differences, such as page size, Cache size, max page > count etc.

Re: [sqlite] Clone SQLite databases

2008-08-07 Thread csabi81
I think I have DONE :) I miss one more PRAGMA to copy, the schema_version, which creates the conflict with Firefox, and results a corrupt database. Now everythings work fine. I have only one question: how can I query all the PRAGMAS? I am useing an SQLite library in Delphi, I think that I should

Re: [sqlite] Clone SQLite databases

2008-08-06 Thread csabi81
I have done again a test, its nice to work with you guys :) So, I query all the PRAGMAs from the original database, and note them, temporary on a sheet of paper; then after dooing a .dump obtain the hole schema of the database, CREATE TABLE, INDEX, INSERT stc..., saved in a file. I append from

Re: [sqlite] Clone SQLite databases

2008-08-06 Thread csabi81
Thanks Steve, I think I am on the right way. It is a difference between the page sizes of the two databases. I have opened each database with Firefox SQLite Manager, and at the DB Settings I have seen a lot of differences, such as page size, Cache size, max page count etc. How can I Copy all

Re: [sqlite] Clone SQLite databases

2008-08-06 Thread Steve Kallenborn
Could there be a different page_size, resulting in differing amounts of 'wasted' space? Check with "PRAGMA page_size;" or sqlite3_analyzer program. Thanks Steve csabi81 wrote: > I have made .dump for each database, original and clone, and saved into > separated files. Than compare them. >

Re: [sqlite] Clone SQLite databases

2008-08-06 Thread csabi81
I have made .dump for each database, original and clone, and saved into separated files. Than compare them. Differences are in INSERT INTO entries, in the clone database those entries are missing which I did not copy from the original. But the CREATE TABLE, CREATE INDEX, CREATE TRIGGER Commands

Re: [sqlite] Clone SQLite databases

2008-08-05 Thread csabi81
ndexes and > the data is there. > > How about triggers? Views etc? > > > > --- On Tue, 8/5/08, csabi81 <[EMAIL PROTECTED]> wrote: > From: csabi81 <[EMAIL PROTECTED]> > Subject: Re: [sqlite] Clone SQLite databases > To: sqlite-users@sqlite.org > Dat

Re: [sqlite] Clone SQLite databases

2008-08-05 Thread Ken
I wouldn't be too worried about the size then if you have the indexes and the data is there. How about triggers? Views etc? --- On Tue, 8/5/08, csabi81 <[EMAIL PROTECTED]> wrote: From: csabi81 <[EMAIL PROTECTED]> Subject: Re: [sqlite] Clone SQLite databases To: sqlite-users@sql

Re: [sqlite] Clone SQLite databases

2008-08-05 Thread csabi81
Yes I have Indexes in original database, but I create them in the clone, useing the SQL obtained from mastertable, as well as the TRIGGERS. Stephen Woodbridge wrote: > > csabi81 wrote: >> Hi everyone >> >> I want to clone a database: copy all data from original database to the >> destination

Re: [sqlite] Clone SQLite databases

2008-08-05 Thread Stephen Woodbridge
csabi81 wrote: > Hi everyone > > I want to clone a database: copy all data from original database to the > destination database with a condition, so not all the entries need to be > copied. I have tried the following: > Obtain SQL from mastertable and create the tables in the new database, and >

Re: [sqlite] Clone SQLite databases

2008-08-05 Thread Derrell Lipman
On Tue, Aug 5, 2008 at 10:31 AM, csabi81 <[EMAIL PROTECTED]> wrote: > > I have made the test with following results: > Useing "SELECT ALL * FROM WHERE... order by id;" on the > original > database and > "SELECT ALL * FROM order by id;" on the cloned database give me > the same results. >

Re: [sqlite] Clone SQLite databases

2008-08-05 Thread csabi81
t;   > You could use the .output command selecting the data to different files > (use an order by clause) then compare the two files. >   > HTH > > --- On Tue, 8/5/08, csabi81 <[EMAIL PROTECTED]> wrote: > > From: csabi81 <[EMAIL PROTECTED]> > Subject: R

Re: [sqlite] Clone SQLite databases

2008-08-05 Thread Ken
/08, csabi81 <[EMAIL PROTECTED]> wrote: From: csabi81 <[EMAIL PROTECTED]> Subject: Re: [sqlite] Clone SQLite databases To: sqlite-users@sqlite.org Date: Tuesday, August 5, 2008, 6:42 AM Thanks for Reply. I have tried VACUUM, nothing happens. The original database file remains t

Re: [sqlite] Clone SQLite databases

2008-08-05 Thread csabi81
Thanks for Reply. I have tried VACUUM, nothing happens. The original database file remains the same size as before. What I create in the new database are Tables, Indexes and Triggers as well. I dont know if anything escapes from me. Mihai Limbasan wrote: > > csabi81 wrote: >> Hi everyone >>

Re: [sqlite] Clone SQLite databases

2008-08-05 Thread Mihai Limbasan
csabi81 wrote: > Hi everyone > > I want to clone a database: copy all data from original database to the > destination database with a condition, so not all the entries need to be > copied. I have tried the following: > Obtain SQL from mastertable and create the tables in the new database, and >