Solved

sequence of sql commands to open,lock,close file

Posted on 2014-01-16
6
494 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 77

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
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…

726 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