Groups | Blog | Home
all groups > sql server replication > june 2006 >

sql server replication : Replication and User Mapping



Sintel Silverblade
6/28/2006 4:15:51 PM
I am using MSSQL 2005 with Transactional Replication

Is there a way to replicate Users and all the User Mapping settings?

Thank you in advance.

Hilary Cotter
6/28/2006 9:50:09 PM
No, but you can do it as part of a post snapshot command, and then keep it
up to date using sp_addscriptexec (for unc deployed subscriptions only).

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

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



[quoted text, click to view]

Paul Ibison
6/29/2006 12:00:00 AM
Hi Hilary - I would run it as a pre-snapshot script (rather than
post-snapshot) if the user owns any objects and this ownership is being
retained.
Cheers,
Paul Ibison

Paul Ibison
6/29/2006 12:00:00 AM
You can copy permissions and ownership (@destination_owner), but you'll need
a (manual) pre-snapshot script (@pre_snapshot_script) to create the users.
Still, I haven't seen the "User Mapping" settings and maybe I know them by a
different name - pls can you point out where they are and I'll take a look.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Hilary Cotter
6/29/2006 10:19:35 AM
You are correct Paul. I normally do this as a post snapshot command as most
objects I work with are owned by dbo, and I need to set permissions.

I guess it depends on what the op means by Users and User Mapping settings.
--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

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



[quoted text, click to view]

Sintel Silverblade
6/30/2006 1:53:26 PM
What I am trying to do is to get 2 versions of a database to act the same
down to the permission level. So, I need to replicate all users, all user
roles, and all user permissions.

I have been searching all over the place for scripts to do this and I have
not come up with any that work with 2005.

In 2000 it looks like the syspermissions table handles the object level
permissions. In 2005 it is the sys.database_permissions view.

Thanks for your help.

[quoted text, click to view]

Sintel Silverblade
6/30/2006 2:20:20 PM
This is long distance replication from California to Florida. We currently
have log shipping replication and are moving to Transactional Replication
with Updateable Subscriptions. We have orders coming into to Florida and
processing of the orders in California which then go back to Florida for the
final send back to the customer.


[quoted text, click to view]

Paul Ibison
6/30/2006 9:13:01 PM
Why not consider log shipping instead?
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Paul Ibison
7/1/2006 3:08:41 PM
OK. One thing I use which might be of use is a post-snapshot script to
maintain the permissions held on the publisher:
http://www.replicationanswers.com/Script10.asp
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)




AddThis Social Bookmark Button