I have a user who can bring offline a database but he cannot bring the
database back online.
The error which pops up is:
Error5011: User does not have permission to alter database dbname
ALTER DATABASE statement failed.
sp_dboption command failed.
Any ideas?
ThanksI would guess that only sysadmins can bring a database online, because
if the database is not readable, there's no way to know who has
db_owner permissions. This behaviour is documented for RESTORE - a
db_owner can backup a database but not restore it - and it seems likely
that the same logic applies in the case of ALTER DATABASE, even if it
isn't documented.
Depending on what you're trying to achieve, setting the database to
RESTRICTED_USER might be a possibility.
Simon
No comments:
Post a Comment