Hello Joanne,

Monday, May 12, 2008, 4:37:29 PM, you wrote:

JP> Hi All,
JP> We have an application in C++ is up and running all the time to
JP> insert the data into the table. At the same time we
JP> have the shell script to dump the database to file at the end of
JP> the hour as defined below in this email.
JP> The question that I have is while the application is writting
JP> data to database and at the same time the bash script is running
JP> to dump the data to the file. At this time the script dump the
JP> data to the file has the protential "database lock(Deadlocked)"
JP> because the application is writting the data to database at the
JP> time of selection. If this the case then how to check the
JP> "database lock" in the bash script.
JP> Thanks,
JP> JL
JP> #!/bin/bash
JP> .sqlite3 CommonDB < $1
JP> ...
JP> $1 is script file as defined below:
JP> ------------------------------------
JP> .output '/tmp/statsData'
JP> .mode csv
JP> select '#RemoteWX';
JP> select remoteId, remoteWXId, hostName, active, remoteWXType from 
remoteWXTable order by remoteId;
JP> select '#RemoteWX';
JP> attach database '/tmp/CompressCurHourDB' as CCHDB;
JP> select * from CCHDB.compressTable;
JP> detach database CCHDB
JP> .......................


JP> ____________________________________________
JP> sqlite-users mailing list
JP> [email protected]
JP> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Write another C++ app that does the dump and handles the busy
condition properly and run this from your scripts.

C


JP>      
JP> 
____________________________________________________________________________________
JP> Be a better friend, newshound, and 
JP> know-it-all with Yahoo! Mobile.  Try it now. 
JP> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
JP> _______________________________________________
JP> sqlite-users mailing list
JP> [email protected]
JP> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



-- 
Best regards,
 Teg                            mailto:[EMAIL PROTECTED]

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to