Friday, February 17, 2012

Database Lock! Urgent Please!

Hello folks!
I'm with two locks on a database and I can't access others databases too, except the master.

I've tryed to kill the lock, but I didn't have sucess.

Please help me!!!
Cheers!
Rafael

SPID DBID OBJID INDID TYPE MODE STATUS
9 5 0 0 DB S GRANT
9 5 0 0 DB X GRANT
51 1 85575343 0 TAB IS GRANTWhat are the spids doing?

Are they yours?

Are you blocking yourself?

Did you look at sp_lock?|||Yes, this spid 9 is me.
But I'm not getting access. I've already disconected.
Take a look on the screenshot|||What do you mean when you say that you can't access other databases?|||I mean that I can't.

When I try to access a database via Entreprise, Query Analyser, etc..
like USE DB_Emplacamentos, DB_Cadastro, whatever, any database on server, my command or my screen keeps trying to connect to the database for the enternity.

I dunno why this is happing. I saw my SQL Server Logs and some erros like this was found:

* Using dynamic lock allocation. [500] Lock Blocks, [1000] Lock Owner Blocks.
* Skipping startup of clean database id 6
* Skipping startup of clean database id 7
* Skipping startup of clean database id 8
* Skipping startup of clean database id 9
* Skipping startup of clean database id 10
* Analysis of database 'DB_Emplacamentos' (5) is 3% complete (approximately 1726 more seconds)

Man, I'm thinking to reinstall the instance of SQL Server and try to restore the database. It is really, really strange.

Cheers!
Rafael|||OK. This looks like SQL 2000. If that is the case, then SPID 9 is not you. Any spid under 50 is a system process. It appears you have just rebooted this machine, and have the "long transaction blues". DB_Emplacamentos will need 20 minutes for just the analysis portion of recovery. Rolling forward, and rolling back could take a bit of time, too. This can happen when you do a lot of re-indexing, then reboot the server (only index creation statements and page allocations, and not all the page changes are recorded in the logs), or if you have an immense transaction that was halfway done when you rebooted. Out of curiosity, how but is DB_Emplacamentos?|||Oh, I imagine you are getting login errors something like "Can not open default database"?|||This database name is like DB_CarIDs.
I have a table with aprox. 45 million rows. It's a little bit big.LOL
The datafiles are around 20GB.

Well, I'll leave the database trying to restabish until tomorrow. If not, I'll start the McGiver's process of reastabilish a 20GB backup.LOL

Thank's for your help. I really appreciate that.

Rafael|||ROLLBACK is like a DOG, always know the way to comeback home!

My databases are allset now!!!
Yeaaah!!!;)

Tks all!

Cheers
Rafael

No comments:

Post a Comment