Frage

I have just started a new job as the only developer on a system. To start with I wanted to set up a development system that is the same as the live system, but without any data. Then I want to populate it with test data. So the first thing I did was script the databases and recreate the databases on my own machine. However, I am getting a problem when I call a stored procedure. The error message I get is " Invalid object name 'dbo.sysmergearticles". I believe this is something to do with merge replication, but that is an area I know nothing about yet. For now I just want to get a test system up and running. If I look in the system tables on the live system, 'dbo.sysmergearticles' is there, along with a whole load of other tables. Is there a way I can script these objects so that I can create a test system using scripts?

War es hilfreich?

Lösung

You are correct, the presence of sysmergearticles on the live system indicates that it is involved in Merge Replication, or has orphaned metadata from a previous Merge publication or subscription.

On the live system, in Object Explorer in SSMS, expand the Replication node and publication/subscription nodes. You will want to determine if the live system is involved in an active Merge topology or if the Merge system tables are orphans from a previous topology. You can run the following query to determine this:

select * 
from sys.databases
where is_published = 1 or is_merge_published = 1 or is_subscribed = 1

If the live system is involved in an active topology then you will want to determine if it is a publisher or subscriber. From there you can script out the publication and subscription(s) by right-clicking the publication or subscription in Object Explorer -> Generate Scripts... Details on scripting replication can be found here in Scripting Replication. Then you can recreate the topology on your test system.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top