User Does not have permission to alter database, the database does not exist, or the database is not in a state that allows access checks SQL server
It seems like there was a problem during the restoration process.
This error has nothing to do with permission. A database in suspect mode cannot be used or altered.
As mentionned, you will have to fix the issue with the database first (before you can run a &quot;USE&quot; or an &quot;Alter database&quot; on it).
If you do have backup for those database, restore the database from your backup in order to fix the issue.
If you don't have backup, then it will be a bit harder and information about how your DBs went into suspect mode would be nice to have in order to see the best approch to bring them back online (potentially with data loss or corruption).
You may have to set the database into the Emergency state before running a checkdb with repair_allow_data_loss on the database (which does exactly as it said)