0

This question already has an answer here:

I am trying to repair a suspect database. The problem is that when I run:

EXEC sp_resetstatus property;

I get this response:

Warning: You must recover this database prior to access.

when I try this:

ALTER DATABASE property SET EMERGENCY;

it also fails:

Msg 5011, Level 14, State 7, Line 1
User does not have permission to alter database 'property', the database does not exist, or the database is not in a state that allows access checks.

Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.

What do I do next?

Thanks.

marked as duplicate by mustaccio, joanolo, McNets, Colin 't Hart, Michael Green Jun 11 '17 at 12:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

migrated from stackoverflow.com Jun 9 '17 at 5:18

This question came from our site for professional and enthusiast programmers.

  • It's a reasonable question, but you'll probably do better by asking it on dba.stackexchange – DeanOC Jun 9 '17 at 1:13
0

Arcee123,

The error: User does not have permission to alter database 'property', the database does not exist, or the database is not in a state that allows access checks occurs when the user doesn’t have ALTER rights.

To provide the ALTER right, use the following command:

GRANT ALTER ON DATABASE::DatabaseName TO username

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