Showing posts with label whenever. Show all posts
Showing posts with label whenever. Show all posts

Sunday, March 25, 2012

Cannot drop the distribution database 'distribution' because it is currently in use.

All,
I use stored procedures from C#.net to configure and remove
replication.
Whenever, i remove replication i try to first check if any process for
distribution DB (using sp_who2) is remaining in the SQL process space
and kill it.
The possible processes, i knew of using the distribution DB are:
1. SQL .NET data client provider
2. MSSQL EM
3. SQL Query Analyzer
I also checked that no cleanup processes are using it.
But still i get the error "Cannot drop the distribution database
'distribution' because it is currently in use."
Can anyone help in finding out who else is using the Distribution DB?
Please reply asap!
Thanks in advance,
Lavanya
It could be the distribution cleanup agent, the log reader, the distribition
agent or the merge agent. For a user database you would make it single-user
with yourself as the only user then drop it: Alter database distribution set
single_user with rollback immediate; use tempdb; drop database distribution.
For the distributor I'd run sp_dropdistributor followed by
sp_dropdistributiondb rather than the "drop database".
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||Try this select * From sys.sysprocesses where dbid=db_id('distribution')
in sql 2005 in sql 2000, try this
select * From sysprocesses where dbid=db_id('distribution')
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Lavanya" <lavanyah@.gmail.com> wrote in message
news:1168258285.713911.183170@.s80g2000cwa.googlegr oups.com...
> All,
> I use stored procedures from C#.net to configure and remove
> replication.
> Whenever, i remove replication i try to first check if any process for
> distribution DB (using sp_who2) is remaining in the SQL process space
> and kill it.
> The possible processes, i knew of using the distribution DB are:
> 1. SQL .NET data client provider
> 2. MSSQL EM
> 3. SQL Query Analyzer
> I also checked that no cleanup processes are using it.
> But still i get the error "Cannot drop the distribution database
> 'distribution' because it is currently in use."
> Can anyone help in finding out who else is using the Distribution DB?
> Please reply asap!
> Thanks in advance,
> Lavanya
>

Tuesday, March 20, 2012

Cannot Debug SP.

Hi, everybody?!
I cannot use debugging function on some clients. For example, on my PC I
cannot use debugging facility.
Whenever I try to use debugging facility, it just returns results and ends.
I cannot use step-by-step function.
But on my laptop, I can use the function very well.
I wonder why I can't use the function on some clients, and can on other
ones.
Thanks.This is usually fixed by stepping through the section in BooksOnLine under
"troubleshooting SQL Server, Transact-SQL debugger" and ensuring you have
all the steps done correctly.
--
Andrew J. Kelly
SQL Server MVP
"Kim, KeukTae" <zyuuzika@.korea.com> wrote in message
news:OweEoodSDHA.3700@.tk2msftngp13.phx.gbl...
> Hi, everybody?!
> I cannot use debugging function on some clients. For example, on my PC I
> cannot use debugging facility.
> Whenever I try to use debugging facility, it just returns results and
ends.
> I cannot use step-by-step function.
> But on my laptop, I can use the function very well.
> I wonder why I can't use the function on some clients, and can on other
> ones.
> Thanks.
>
>