Thursday, March 29, 2012

Dropping Loading/Suspect database

Hi:
I restored a database from the backup. It is showing Loading/Suspect in
enterprise manager. How do I drop this database and try again. What could
have caused this? Please let me know.
ThanksSohail,
Have you tried the DROP DATABASE statement from Query Analyzer? Is this a
test box, if so and the former doesn't work, you might try KILLing the
process performing the RESTORE (if available).
HTH
Jerry
"Sohail" <Sohail@.discussions.microsoft.com> wrote in message
news:97BDB53E-F7DF-434E-B66F-E9C28B4BC024@.microsoft.com...
> Hi:
> I restored a database from the backup. It is showing Loading/Suspect in
> enterprise manager. How do I drop this database and try again. What
> could
> have caused this? Please let me know.
> Thanks|||Actually I do not have access to the clients machine. Will the mode field i
n
the following query tell me the spid.
SELECT mode, status, status2
FROM master..sysdatabases
WHERE name = 'XYZ'
Thanks
"Jerry Spivey" wrote:

> Sohail,
> Have you tried the DROP DATABASE statement from Query Analyzer? Is this a
> test box, if so and the former doesn't work, you might try KILLing the
> process performing the RESTORE (if available).
> HTH
> Jerry
> "Sohail" <Sohail@.discussions.microsoft.com> wrote in message
> news:97BDB53E-F7DF-434E-B66F-E9C28B4BC024@.microsoft.com...
>
>|||Hi,
SPID column in sysprocess gives the processID. use the below query to get
the peocess id.
SELECT SPID,cmd FROM master..sysdatabases WHERE name = 'XYZ'
After getting the SPID use the KILL statement to kill the old restore
process
KILL SPID
Thanks
Hari
SQL Server MVP
"Sohail" <Sohail@.discussions.microsoft.com> wrote in message
news:7DA75FB6-9B36-48CB-8744-64DD60BFD7D9@.microsoft.com...[vbcol=seagreen]
> Actually I do not have access to the clients machine. Will the mode field
> in
> the following query tell me the spid.
> SELECT mode, status, status2
> FROM master..sysdatabases
> WHERE name = 'XYZ'
> Thanks
> "Jerry Spivey" wrote:
>|||Hi Hari:
SPID and CMD fields do not exist in master..sysdatabases table. Is this the
right table?
"Hari Prasad" wrote:

> Hi,
> SPID column in sysprocess gives the processID. use the below query to get
> the peocess id.
> SELECT SPID,cmd FROM master..sysdatabases WHERE name = 'XYZ'
> After getting the SPID use the KILL statement to kill the old restore
> process
> KILL SPID
> Thanks
> Hari
> SQL Server MVP
>
> "Sohail" <Sohail@.discussions.microsoft.com> wrote in message
> news:7DA75FB6-9B36-48CB-8744-64DD60BFD7D9@.microsoft.com...
>
>

No comments:

Post a Comment