Solved

sequence of sql commands to open,lock,close file

Posted on 2014-01-16
6
478 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Trigger usage 2 68
Set Warning Thresholds on Database mirroring 4 48
Steps to produce a data strategy 5 49
How do uses indexes to maximize MySQL Searches 14 25
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

770 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