Replicated object not being created as dbo.object

  • I just completed creating a replication job between a server at my location, where I have SA privileges, to a subscription server at a location where I have db_owner rights (no SA). When replication runs, the objects get created on the subscriber as userid.object rather then dbo.object. How do I cause replication to create the objects as dbo.object if the subscriber login is in the role db_owner?

    Thanks, Dave

  • Specify when you are adding the articles with sp_addarticle the paremeter @source_owner = N'dbo'.

    Or with enterprise manager, in the articles tab, check every table, and specify the object owner. Remember to do this before suscribing suscribers.

  • Thanks. Your response is exactly what I found out last night. I ran across something in Technet that made me look in that direction.

    Appreciate the help, Dave

  • Thanks. Your response is exactly what I found out last night. I ran across something in Technet that made me look in that direction.

    Appreciate the help, Dave

  • I found out that the issue is not totally resolved. While I was able to change my tables and stored procedures to dbo.objectname, I was unable to change the stored procedures that are generated by SQL Server, such as sp_MSdel_objectname. Do you know how I can change these objects to be dbo.sp_MSdel_objectname from within Enterprise Manager?

    Thanks, Dave

  • Think you need to run sp_changeobjectowner from QA. You can configure the owner when you set up replication via the wizard also. An alternative is to alias your login as dbo instead of adding it to db_owner, that way anything you create will be dbo.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • Andy,

    You indicated I could configure the owner via the replication wizard. Is this possible for system stored procedures such as the insert, update and delete procedures created on the subscriber when the subscription is created? I'm not familiar with how to do this.

    Are there any issues associated with using an alias?

    Thanks for the suggestions,

    Dave

  • I will have to run through it again and verify - Im always dbo so I dont really use it! No issues I know of with the alias.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply