I have a windows service writing to a single-table SQL Server database (2008).
I want another application to read the table in read-only mode.
What do I have to do to open the database appropriately by the application so it’s read-only?
Any changes to the way the service opens the database?
Obviously I can’t ALTER the database to read-only as the service has to write to it.
No changes to the service are necessary. Just supply a login that has only been granted the db_reader role. If you have any stored procedures you’ll have to grant access to those with the
GRANT EXEC ON <proc> TO <user>command.