Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have set up Transaction Replication and its working well.

I have a few different web apps that connect to the publisher and subscriber database and I am concerned that if they use the subscriber database for inserting/updating/deleting intentionally, or accidentally data will be lost. (it should essentially be used as a read-only database because I have not setup updatable subscriptions).

I tried changing the database properties to be read-only, but this caused the replication to fail.

I was thinking maybe a before and after script during replication to add/remove the database read-only flag?

Is there a better way to do this?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Instead of altering the database to become read only, create a new login and add it to the db_datareader role of the subscriber database.

share|improve this answer
    
Thanks Alexis, that should do the trick. –  duyker May 30 '12 at 23:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.