I have a SQL Server 2016 database of which I am the owner. It's an archive that's no longer accessible to anyone else. I still need to read this database by linking to it from other SQL Server databases and from Access.
I would like to be able to alter and create views in this database but I would like to prevent myself from inadvertently changing any data there.
What's the quickest, easiest, and easily reversible way to allow myself only select access to all the tables?
CodePudding user response:
alter database current set read_only
To reverse, or if you want to modify views, run
alter database current set read_write
No permissions-based solution is effective against the database owner.