Friday, March 9, 2012
Replication - How to create objects as dbo.object when not SA
DaveHere is some additional information. The subscriber server is at a remote location managed by another IT department. I connected to the subscriber with a user id that was created in the role db_owner. The security was setup in Enterprise Manager by clicking on Replication and then right clicking on Publication. From there I chose "Configure Publishing, Subscibers and Distribution..." and then the Subscribers tab. For the subscriber I chose "Use SQL Server Authentication" and entered my dbo user id. Since I do not have SA rights on this server I need a way to have my dbo id created objects as dbo.objectname.
Hope this helps.
Dave|||When you create the publication (through 'Publication Properties' in SQL-EM) you can specify the owner of the articles to be created in the subscription database. You do this with the 'Article Defaults' button on the 'Articles' tab. Enter dbo in destination table owner field (or destination stored procedure owner field for stored procedures). If you leave these fields blank then the destination objects will be created with the current user as their owner.|||Shortly after I submitted my question I discovered exactly what you indicated, but I found that SQL Server is creating its own stored procedures (sp_MSDel_tablename, sp_MSIns_tablename) using my userid and not dbo. I noticed the Commands tab lists these stored procedures for each table. I assume this is the place where I must prefix each procedure with dbo.. Does this sound correct or is there another way to address SQL Server created procedures?
Thanks, Dave
Wednesday, March 7, 2012
Replication - can subscriber objects be pre-existing?
Who is right? I haven't been able to find an answer from the Microsoft site and news groups.
Thanks,I hate to be the bearer of bad news for you, but your manager is correct in this instance.
Here's the link to get you started:
http://support.microsoft.com/kb/320499/en-us
It really does speed things up!
Tom
Monday, February 20, 2012
Replicating Only Objects, no data
I need to find a solution for having the same database objects on two servers without the data, and be able to synchronize them on demand.
Whenever a table changes (alter, create, delete) I need to be able to replicate those changes to the destination server without affecting its data.
If I add, alter or delete a stored procedure, or other objects such as functions, etc. I need to be able to see those changes on the destination.
any ideas.
Replication support replicate DDL changes such as table, SP, and function changes. But replication support either both dml and ddl changes, or dml without tracking ddl changes. As your case, you only need ddl change without dml change, replication does not have parameter settings to support this. But, I am sure you can find workaround, as use View instead of Table, which can not query out data. Add View, stored procedure, and functions as articles in replication.
Hope it will help.
Thanks
Yunjing