Solved

sequence of sql commands to open,lock,close file

Posted on 2014-01-16
6
453 Views
Last Modified: 2014-01-31
I am looking for a sequence of SQL  commands that will do three things
open a file
lock some range
close the file

I am writing a script and want to run this sequence infinitely to catch some leak in my server code.
What set of SQL commands can cause the above sequence to occur
0
Comment
Question by:perlperl
6 Comments
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39785762
What database are you using?
0
 

Author Comment

by:perlperl
ID: 39785768
sqllite
0
 
LVL 59

Accepted Solution

by:
Kevin Cross earned 300 total points
ID: 39786048
Are you running transactions?
Here are some notes on locking http://www.sqlite.org/lockingv3.html
As listed in the documentation, INSERT, UPDATE, DELETE usually lock rows; however, note the comment on EXCLUSIVE lock because of full memory cache.

.open command with a file name will close the current database and open the one in specified file; however, in most cases, people usually start SQLite with the database to open:
sqlite <file/database name>

Open in new window

0
 

Author Comment

by:perlperl
ID: 39788363
nope. I am running it from a perl script.
probably i need to connect to datable, insert/delete some rows and close the db connection
0
 
LVL 28

Expert Comment

by:FishMonger
ID: 39789723
You may want to add some debugging code with the help of one or more of the "leak" related modules.

CPAN search for "leak" modules
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now