Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

DBD::ODBC locking up SQL Server database

by wintergreen (Initiate)
on Mar 19, 2003 at 17:55 UTC ( #244401=perlquestion: print w/replies, xml ) Need Help??

wintergreen has asked for the wisdom of the Perl Monks concerning the following question:

I have a problem with a SQL Server 7 database completely locking up when doing a write using the DBD::ODBC module.

The database needs to be updated on a periodic basis from flat text files. These files are parsed and after some data munging their information is merged into the database. To do the merging, I make two connections to the database: one to read the data currently in the database for comparison to the flat file data, and one to do a database write (update, delete, or insert). I make two connections to the same database because I need the cursor open during a select while I'm updating the database. Both connections read and write to the same two tables.

Sometimes when running my script, the database completely locks up such that no connections can be made to any database running on the server, even through the MMC administration tool. The lockups occur sporadically and only at a database write statement.

I can't figure out why the database locks up. I'm not sure if the DBD::ODBC module or ODBC itself was meant to handle having two connections being used in the manner I described above. Does anyone have any suggestions on fixing or diagnosing this problem?
  • Comment on DBD::ODBC locking up SQL Server database

Replies are listed 'Best First'.
Re: DBD::ODBC locking up SQL Server database
by talexb (Canon) on Mar 19, 2003 at 18:12 UTC

    I would suggest using DBI::trace to see what's happening under the covers. Specifying a second parameter to trace will allow you to specify a separate log file -- which may be handy in tracking this down.

    --t. alex
    Life is short: get busy!
Re: DBD::ODBC locking up SQL Server database
by LD2 (Curate) on Mar 19, 2003 at 18:19 UTC
    Please show your code. It always helps, when seeing the actual problem. It may be something you've overlooked.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://244401]
Approved by talexb
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2021-04-21 06:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?