开发者

Transactional Replication to different schemas?

开发者 https://www.devze.com 2023-03-06 02:31 出处:网络
I have database A and database B. I would like to do one way replication from A to B. The only hitch is [A].[dbo].[table] needs to replicate to [B]开发者_如何学Go.[someschema].[table]. Is this easy (

I have database A and database B. I would like to do one way replication from A to B.

The only hitch is [A].[dbo].[table] needs to replicate to [B]开发者_如何学Go.[someschema].[table]. Is this easy (or possible to do)? The key requirement is that I have real time synch. I do not need to transform the table definition at all in db B.


Short answer yes, you can do this, but not without some effort.

FROM BOOKS ONLINE:

Schemas and Object Ownership

Replication has the following default behavior in the New Publication Wizard with respect to schemas and object ownership:

For articles in merge publications with a compatibility level of 90 or higher, snapshot publications, and transactional publications: by default, the object owner at the Subscriber is the same as the owner of the corresponding object at the Publisher. If the schemas that own objects do not exist at the Subscriber, they are created automatically.

For articles in merge publications with a compatibility level lower than 90: by default, the owner is left blank and is specified as dbo during the creation of the object on the Subscriber.

The object owner can be changed through the Article Properties - dialog box and through the following stored procedures: sp_addarticle, sp_addmergearticle, sp_changearticle, and sp_changemergearticle. For more information, see

http://msdn.microsoft.com/en-us/library/ms151197.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号