Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Table getting locked.

Author  Topic 

admin001
Posting Yak Master

166 Posts

Posted - 2004-02-27 : 06:15:29
Hi ,

I am having a strange problem here on my SQL 2000 box . I checked that 3 of my tables are getting locked after certain records are referenced by the application , maybe say first 100 records in those tables .

We initially checked that application could be the issue , but later I checked that when we try to execute queries on the SQL server on those tables , the queries do not get executed .

It displays some status -2 along with few other data . I have not really not come across like this before . Need your advise on the above or any thoughts to resolve the above .

Many thanks .

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-02-27 : 12:39:40
You haven't provided enough information. When you say locked, what kind of lock is on the table? What kind of queries are they? -2 isn't enough information, please explain what you mean by this.

Tara
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-02-27 : 13:27:45
This is kind of kewl. Can you send us the exact message of the error and the info Tara asked for. Also, do you get the error when you run the queries from Query Analyzer, or were you trying to run the task in DTS?

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

admin001
Posting Yak Master

166 Posts

Posted - 2004-03-01 : 02:54:07
Hi ,

Thanks for your reply . To check again , i executed sp_who command in the QA after i noticed that the application is no longer functioning .

SP_WHO listed all the processess running on the server , and i saw that some of the process activities were locked .

The results displayed by sp_who had status as blocked with blk id as -2 .
Do I have kill the process everytime to release the locked tables ?

Thanks once again.

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-03-01 : 12:23:07
No you don't have to KILL the process to unlock the tables. You need to figure out what the spid is doing, the spid that is blocking everyone. You can run this to determine it:

DBCC INPUTBUFFER(spidNo)

Tara
Go to Top of Page

admin001
Posting Yak Master

166 Posts

Posted - 2004-03-02 : 00:11:00
Thanks Tara , will check that out .
Go to Top of Page
   

- Advertisement -