We are running SQL Server 2000 Ent SP4 on Windows Server 2003 Ent SP1. Now we
are facing a strange case where when we tried to restore and overwrite a
database, it always say database is in use and cannot be overwritten. I have
tried to detach and even delete it but everytime it just said the database is
in use and refused to give up. I have checked and make sure no users and
connections are make to the said database. Eventually I have to resort to
restarting the SQL service to remove this database.
Is there a way to remove or overwrite a database without restarting the SQL
service?Are you sure YOU are not in the database when you are trying to restore or
detach?
If you run the sp_lock procedure, look for DB locks in the database you are
trying to remove. There will then be a spid, which can let you determine who
is in the database.
--
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"mpWong" <mpWong@.discussions.microsoft.com> wrote in message
news:C1F40A29-F5E0-4A8A-A993-4167AB6A76F2@.microsoft.com...
> We are running SQL Server 2000 Ent SP4 on Windows Server 2003 Ent SP1. Now
> we
> are facing a strange case where when we tried to restore and overwrite a
> database, it always say database is in use and cannot be overwritten. I
> have
> tried to detach and even delete it but everytime it just said the database
> is
> in use and refused to give up. I have checked and make sure no users and
> connections are make to the said database. Eventually I have to resort to
> restarting the SQL service to remove this database.
> Is there a way to remove or overwrite a database without restarting the
> SQL
> service?
>|||Thanks for your advice. I will check next time this happens again. I am
absolutely sure nobody or myself was using the database when I tried the
restore.
"Kalen Delaney" wrote:
> Are you sure YOU are not in the database when you are trying to restore or
> detach?
> If you run the sp_lock procedure, look for DB locks in the database you are
> trying to remove. There will then be a spid, which can let you determine who
> is in the database.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.solidqualitylearning.com
>
> "mpWong" <mpWong@.discussions.microsoft.com> wrote in message
> news:C1F40A29-F5E0-4A8A-A993-4167AB6A76F2@.microsoft.com...
> > We are running SQL Server 2000 Ent SP4 on Windows Server 2003 Ent SP1. Now
> > we
> > are facing a strange case where when we tried to restore and overwrite a
> > database, it always say database is in use and cannot be overwritten. I
> > have
> > tried to detach and even delete it but everytime it just said the database
> > is
> > in use and refused to give up. I have checked and make sure no users and
> > connections are make to the said database. Eventually I have to resort to
> > restarting the SQL service to remove this database.
> > Is there a way to remove or overwrite a database without restarting the
> > SQL
> > service?
> >
>
>
Showing posts with label ent. Show all posts
Showing posts with label ent. Show all posts
Tuesday, February 14, 2012
Database could not be removed
We are running SQL Server 2000 Ent SP4 on Windows Server 2003 Ent SP1. Now we
are facing a strange case where when we tried to restore and overwrite a
database, it always say database is in use and cannot be overwritten. I have
tried to detach and even delete it but everytime it just said the database is
in use and refused to give up. I have checked and make sure no users and
connections are make to the said database. Eventually I have to resort to
restarting the SQL service to remove this database.
Is there a way to remove or overwrite a database without restarting the SQL
service?
Are you sure YOU are not in the database when you are trying to restore or
detach?
If you run the sp_lock procedure, look for DB locks in the database you are
trying to remove. There will then be a spid, which can let you determine who
is in the database.
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"mpWong" <mpWong@.discussions.microsoft.com> wrote in message
news:C1F40A29-F5E0-4A8A-A993-4167AB6A76F2@.microsoft.com...
> We are running SQL Server 2000 Ent SP4 on Windows Server 2003 Ent SP1. Now
> we
> are facing a strange case where when we tried to restore and overwrite a
> database, it always say database is in use and cannot be overwritten. I
> have
> tried to detach and even delete it but everytime it just said the database
> is
> in use and refused to give up. I have checked and make sure no users and
> connections are make to the said database. Eventually I have to resort to
> restarting the SQL service to remove this database.
> Is there a way to remove or overwrite a database without restarting the
> SQL
> service?
>
|||Thanks for your advice. I will check next time this happens again. I am
absolutely sure nobody or myself was using the database when I tried the
restore.
"Kalen Delaney" wrote:
> Are you sure YOU are not in the database when you are trying to restore or
> detach?
> If you run the sp_lock procedure, look for DB locks in the database you are
> trying to remove. There will then be a spid, which can let you determine who
> is in the database.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.solidqualitylearning.com
>
> "mpWong" <mpWong@.discussions.microsoft.com> wrote in message
> news:C1F40A29-F5E0-4A8A-A993-4167AB6A76F2@.microsoft.com...
>
>
are facing a strange case where when we tried to restore and overwrite a
database, it always say database is in use and cannot be overwritten. I have
tried to detach and even delete it but everytime it just said the database is
in use and refused to give up. I have checked and make sure no users and
connections are make to the said database. Eventually I have to resort to
restarting the SQL service to remove this database.
Is there a way to remove or overwrite a database without restarting the SQL
service?
Are you sure YOU are not in the database when you are trying to restore or
detach?
If you run the sp_lock procedure, look for DB locks in the database you are
trying to remove. There will then be a spid, which can let you determine who
is in the database.
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"mpWong" <mpWong@.discussions.microsoft.com> wrote in message
news:C1F40A29-F5E0-4A8A-A993-4167AB6A76F2@.microsoft.com...
> We are running SQL Server 2000 Ent SP4 on Windows Server 2003 Ent SP1. Now
> we
> are facing a strange case where when we tried to restore and overwrite a
> database, it always say database is in use and cannot be overwritten. I
> have
> tried to detach and even delete it but everytime it just said the database
> is
> in use and refused to give up. I have checked and make sure no users and
> connections are make to the said database. Eventually I have to resort to
> restarting the SQL service to remove this database.
> Is there a way to remove or overwrite a database without restarting the
> SQL
> service?
>
|||Thanks for your advice. I will check next time this happens again. I am
absolutely sure nobody or myself was using the database when I tried the
restore.
"Kalen Delaney" wrote:
> Are you sure YOU are not in the database when you are trying to restore or
> detach?
> If you run the sp_lock procedure, look for DB locks in the database you are
> trying to remove. There will then be a spid, which can let you determine who
> is in the database.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.solidqualitylearning.com
>
> "mpWong" <mpWong@.discussions.microsoft.com> wrote in message
> news:C1F40A29-F5E0-4A8A-A993-4167AB6A76F2@.microsoft.com...
>
>
Database could not be removed
We are running SQL Server 2000 Ent SP4 on Windows Server 2003 Ent SP1. Now w
e
are facing a strange case where when we tried to restore and overwrite a
database, it always say database is in use and cannot be overwritten. I have
tried to detach and even delete it but everytime it just said the database i
s
in use and refused to give up. I have checked and make sure no users and
connections are make to the said database. Eventually I have to resort to
restarting the SQL service to remove this database.
Is there a way to remove or overwrite a database without restarting the SQL
service?Are you sure YOU are not in the database when you are trying to restore or
detach?
If you run the sp_lock procedure, look for DB locks in the database you are
trying to remove. There will then be a spid, which can let you determine who
is in the database.
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"mpWong" <mpWong@.discussions.microsoft.com> wrote in message
news:C1F40A29-F5E0-4A8A-A993-4167AB6A76F2@.microsoft.com...
> We are running SQL Server 2000 Ent SP4 on Windows Server 2003 Ent SP1. Now
> we
> are facing a strange case where when we tried to restore and overwrite a
> database, it always say database is in use and cannot be overwritten. I
> have
> tried to detach and even delete it but everytime it just said the database
> is
> in use and refused to give up. I have checked and make sure no users and
> connections are make to the said database. Eventually I have to resort to
> restarting the SQL service to remove this database.
> Is there a way to remove or overwrite a database without restarting the
> SQL
> service?
>|||Thanks for your advice. I will check next time this happens again. I am
absolutely sure nobody or myself was using the database when I tried the
restore.
"Kalen Delaney" wrote:
> Are you sure YOU are not in the database when you are trying to restore or
> detach?
> If you run the sp_lock procedure, look for DB locks in the database you ar
e
> trying to remove. There will then be a spid, which can let you determine w
ho
> is in the database.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.solidqualitylearning.com
>
> "mpWong" <mpWong@.discussions.microsoft.com> wrote in message
> news:C1F40A29-F5E0-4A8A-A993-4167AB6A76F2@.microsoft.com...
>
>
e
are facing a strange case where when we tried to restore and overwrite a
database, it always say database is in use and cannot be overwritten. I have
tried to detach and even delete it but everytime it just said the database i
s
in use and refused to give up. I have checked and make sure no users and
connections are make to the said database. Eventually I have to resort to
restarting the SQL service to remove this database.
Is there a way to remove or overwrite a database without restarting the SQL
service?Are you sure YOU are not in the database when you are trying to restore or
detach?
If you run the sp_lock procedure, look for DB locks in the database you are
trying to remove. There will then be a spid, which can let you determine who
is in the database.
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"mpWong" <mpWong@.discussions.microsoft.com> wrote in message
news:C1F40A29-F5E0-4A8A-A993-4167AB6A76F2@.microsoft.com...
> We are running SQL Server 2000 Ent SP4 on Windows Server 2003 Ent SP1. Now
> we
> are facing a strange case where when we tried to restore and overwrite a
> database, it always say database is in use and cannot be overwritten. I
> have
> tried to detach and even delete it but everytime it just said the database
> is
> in use and refused to give up. I have checked and make sure no users and
> connections are make to the said database. Eventually I have to resort to
> restarting the SQL service to remove this database.
> Is there a way to remove or overwrite a database without restarting the
> SQL
> service?
>|||Thanks for your advice. I will check next time this happens again. I am
absolutely sure nobody or myself was using the database when I tried the
restore.
"Kalen Delaney" wrote:
> Are you sure YOU are not in the database when you are trying to restore or
> detach?
> If you run the sp_lock procedure, look for DB locks in the database you ar
e
> trying to remove. There will then be a spid, which can let you determine w
ho
> is in the database.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.solidqualitylearning.com
>
> "mpWong" <mpWong@.discussions.microsoft.com> wrote in message
> news:C1F40A29-F5E0-4A8A-A993-4167AB6A76F2@.microsoft.com...
>
>
Subscribe to:
Posts (Atom)