Friday, March 9, 2012

newbie can't drop Table as table is in use

newbie to transactional replication (replication in general). I have one
server that is publisher/distributor. Another server as subscriber. both
sql 2000 sp4. I have setup replication and when trying to apply the initial
snapshot it says that it can't drop table as the table is in use. I have
restored the same database on both servers and are now trying to replicate.
Is this correct or do I just have a blank database on the subscriber side and
let the replication create everything?
Unless it is a specific requirement (eg low bandwidth or huge amount of
data) I'd not use a nosync method as a default. In other words for your case
you could have an empty database on the subscriber and just allow the
initialization process to set things up for you.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Thanks for the help Paul. So I should drop the database that I have
restored, create a snapshot, let that replicate and go from there?
"Paul Ibison" wrote:

> Unless it is a specific requirement (eg low bandwidth or huge amount of
> data) I'd not use a nosync method as a default. In other words for your case
> you could have an empty database on the subscriber and just allow the
> initialization process to set things up for you.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>
|||Yes - the easiest thing is to drop the database then create a new one with
the same name. This can be done using the subscription wizard (the creation
of a new database). After that, the initialization process will create the
objects and data you need.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||I think you should try to find out how the table is in use. What happens if
you issue a sp_lock and then look at the list of id's returned. Use
sp_helpdb to identify your database, and then use object_name(ObjId) to
identify the tables. Then notice the spid. Use sp_who2 to identify it.
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
"Dgragg" <Dgragg@.discussions.microsoft.com> wrote in message
news:FE9D526C-EE55-44A1-8F58-1B8384E1DF11@.microsoft.com...
> newbie to transactional replication (replication in general). I have one
> server that is publisher/distributor. Another server as subscriber. both
> sql 2000 sp4. I have setup replication and when trying to apply the
> initial
> snapshot it says that it can't drop table as the table is in use. I have
> restored the same database on both servers and are now trying to
> replicate.
> Is this correct or do I just have a blank database on the subscriber side
> and
> let the replication create everything?

No comments:

Post a Comment