Groups | Blog | Home
all groups > sql server replication > november 2004 >

sql server replication : Transactional Replication Question


Patrick
11/18/2004 12:19:29 PM
Hi Freinds,
My db is 10 GB in size, and want to get into a transactional replication
The initial snapshot takes a long time to finish up.

What will happen if during this initialization process, users work on
pubisher db, insert, update delete record....

Thanks in advance,
Pat

Patrick
11/18/2004 12:47:35 PM
I remember that during merge replication, it was casuing problem and failing
the whole process,
is it ok in transactional replication ?

Thanks again,
Pat


[quoted text, click to view]

Hilary Cotter
11/18/2004 3:35:13 PM
this activity will be recorded and stored in the distribution database.
After the snapshot is applied, these commands will be applied to the
subscriber.

--
Hilary Cotter
Looking for a SQL Server replication book?
Now available for purchase at:
http://www.nwsu.com/0974973602.html

[quoted text, click to view]

jxstern
11/18/2004 3:36:19 PM
On Thu, 18 Nov 2004 12:19:29 -0800, "Patrick" <patriarck@gmail.com>
[quoted text, click to view]

Mine is 14gb.

You know, I've discovered you don't strictly *need* the snapshot!

If you:

* chase off all the users and put publisher into single-user (or dbo)
mode.
* take a full backup
* restore the backup to the subscriber
* turn on replication
* let your users back on

You can do without the snapshot, which takes a long time to produce,
and a long time to apply.

That is, I *think* you can do without. At least, it works for me in
test. What problems it entails, if any, I'm still trying to
understand.

On my boxes, the backup and restore takes about an hour.

It's only if you have to "publish from a moving source" that you have
to let the snapshot mechanism do its thing.

J.
Paul Ibison
11/19/2004 1:03:30 AM
Pat,
some issues like this are due to locking. By default a
table lock is required, but there is the option in
transactional (not merge) to have concurrent snapshot
generation, which will nopt need an exclusive table lock.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com

(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Patrick
11/19/2004 2:23:51 PM
In my cases, my prod server is 24/7 can't put in single mode or stop any
activity.


[quoted text, click to view]

jxstern
11/19/2004 3:01:56 PM
On Fri, 19 Nov 2004 14:23:51 -0800, "Patrick" <patriarck@gmail.com>
[quoted text, click to view]

I respect the complications that entails and am impressed that
SQLServer can handle it all, but I do wish BOL was a little clearer on
how you can do for simpler situations.

J.

Paul Ibison
11/22/2004 1:19:22 AM
This is known as a noinit intitialization. It works, but
the replication stored procedures need creating by hand
afterwards (sp_scriptpublicationcustomprocs), and it is
more restrictive in terms of future schema changes.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Paul Ibison
11/22/2004 1:21:09 AM
Single User mode is not required if you select the option
to concurrently create a snapshot.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Paul Ibison
11/22/2004 1:43:28 AM
Sorry - should have said 'nosync initialization'
(@sync_type = none).
Rgds,
Paul
jxstern
11/22/2004 11:19:51 AM
On Mon, 22 Nov 2004 01:21:09 -0800, "Paul Ibison"
[quoted text, click to view]

It's not *required*, but I'm curious if it's *allowed*, with all these
agents running around!

J.
jxstern
11/22/2004 11:21:30 AM
On Mon, 22 Nov 2004 01:19:22 -0800, "Paul Ibison"
[quoted text, click to view]

Aha, thank you for saying this!

In my case, the "nosync initialization" worked because I had
previously run a "sync initialization" on the same database, I guess,
and EVEN THOUGH I HAD RUN sp_removedbreplication, it must have left
behind the SPs!?!?

Joshua Stern

jxstern
11/22/2004 12:48:35 PM
On Mon, 22 Nov 2004 11:21:30 -0800, jxstern <jxstern@nowhere.com>
[quoted text, click to view]

Nope.

Apparently I'm using "direct inserting" etc, so don't need the custom
SPs??

Just when I thought I was getting to understand this stuff ...

J.
AddThis Social Bookmark Button