Showing posts with label publication. Show all posts
Showing posts with label publication. Show all posts

Sunday, February 19, 2012

About retore a database which is not publication database

Hi Guys,
If I want to retore a database which is not publication database into a
replication database and I want to keep replication , how to do? Thanks.
I'm not too sure what you mean by 'restoring a database into another
database'. If you mean you want to restore a backup of a subscriber and use
it as a template for another subscriber, then you're talking about a nosync
initialization; please have a look here:
http://www.replicationanswers.com/NoSyncOn2005.asp
If you're using sql server 2000 you can use this article instead:
http://www.replicationanswers.com/NoSyncInitializations.asp
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||Sorry I didn't state clearly. I have database that has replication on it and
it is used for publication. Now I want to restore a database on this
database, but the database copy is not publication database, that is mean
this is not replication database backup copy. But I still want to use
replicaton after restore it. Because my case is after restore this database
using database copy that is not replication database, the replication is
gone, and I have to re-create a replication, make me trouble. How to fix it?
thanks.
"Paul Ibison" wrote:

> I'm not too sure what you mean by 'restoring a database into another
> database'. If you mean you want to restore a backup of a subscriber and use
> it as a template for another subscriber, then you're talking about a nosync
> initialization; please have a look here:
> http://www.replicationanswers.com/NoSyncOn2005.asp
> If you're using sql server 2000 you can use this article instead:
> http://www.replicationanswers.com/NoSyncInitializations.asp
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
>
>
|||When you restore the published database with a backup of the database that is
NOT replicated, by design the replication information stored in the system
tables is overwritten. So your replication will be gone.
So before you restore the database, generate a replication script which can
be used to restore your replicaiton environment after you've restored.
You will have to modify the repl script to do a nosync (see Paul's
suggestion) to ensure that the snapshots don't get applied all over again.
HTH
Emaniel
"Iter" wrote:
[vbcol=seagreen]
> Sorry I didn't state clearly. I have database that has replication on it and
> it is used for publication. Now I want to restore a database on this
> database, but the database copy is not publication database, that is mean
> this is not replication database backup copy. But I still want to use
> replicaton after restore it. Because my case is after restore this database
> using database copy that is not replication database, the replication is
> gone, and I have to re-create a replication, make me trouble. How to fix it?
> thanks.
>
> "Paul Ibison" wrote:

About repopulate table

Hi Guys,
I have transaction replication setup in my company, and in subscriber there
are some triggers there but not in publication, which is due to business
logic. Now I want to repopulate table's value from publication to subscrition
completely,but I don't want to rerun the snapshot because it will overrite
the triggers in the subscriber. How can do that? Thanks.
Do a no-sync subscription. I think you will want to change the article
properties so that in the snapshot tab, name conflicts section you select
delete all data in table, disable the trigger on the subscriber, run and
deploy the snapshot and then re-enable the trigger.
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
"Iter" <Iter@.discussions.microsoft.com> wrote in message
news:ED7B6F2D-4CF7-477D-983A-1AA3740E5A51@.microsoft.com...
> Hi Guys,
> I have transaction replication setup in my company, and in subscriber
> there
> are some triggers there but not in publication, which is due to business
> logic. Now I want to repopulate table's value from publication to
> subscrition
> completely,but I don't want to rerun the snapshot because it will overrite
> the triggers in the subscriber. How can do that? Thanks.
>

about re-install replication after I restore database

Hi guys,
I am want to re-create publication after I restore database. because I
didn't setup replcaiton using sp_replicationdboption command, all replication
info lost after I did restoring database. When re-create publication with
same publication name, gave me error like Could not drop publication. A
subscription exists to it. but when I run sp_addpublication_snapshot, gave me
error Object 'Web Policy Publication' does not exist or is not a valid object
for this operation.then I coudn't run add article, because the publication is
not existed. How can I fix it. Thanks.
Its hard to restore a publication database on another server. On the same
server you might be able to restore it using the keep_replication switch and
have everything work fine.
After you restore the database and the publications show up you should try
to script them and then recreate the publication to have everything
consistent.
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
"Iter" <Iter@.discussions.microsoft.com> wrote in message
news:BA3600A1-F340-4CE5-B24B-0F34E9B0A60A@.microsoft.com...
> Hi guys,
> I am want to re-create publication after I restore database. because I
> didn't setup replcaiton using sp_replicationdboption command, all
> replication
> info lost after I did restoring database. When re-create publication with
> same publication name, gave me error like Could not drop publication. A
> subscription exists to it. but when I run sp_addpublication_snapshot, gave
> me
> error Object 'Web Policy Publication' does not exist or is not a valid
> object
> for this operation.then I coudn't run add article, because the publication
> is
> not existed. How can I fix it. Thanks.
>