0
We have a test system with SQL Server Express 2016 and SSMS.
We had a single database in this system, which was used for our product test.
This worked on Friday, and it does no longer work today.
We have restored the backup into a new database and the tests are working on that now, but we want to find out why the old one stopped working.
I have accessed the instance as the database server administrator, who had access to the database on Friday. I have then tried to access the database via SSMS. The error message is:
The database "producttest" is not accessible. (ObjectExplorer)
I have tried to open the database properties via SSMS. The error message was at first:
Property MaxDop is not available for Database 'producttest'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)
and now the property has changed:
Property TargetRecoveryTime is not available for Database 'producttest'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)
And I have opened a new query window and submitted the command USE producttest
. The error message is:
Message 916, Level 14, State 1, Line 1
The server principal "DOMAIN\Administrator" is not able to access the database "producttest" under the current security context.
I have made a backup copy of the database files and tried to run DBCC CHECKDB producttest
, but the message is
Message 102, Level 15, State 1, Line 1
Incorrect syntax near "producttest"
What could be the issue; what can I try now?
The database is visible in SSMS. I have restarted SSMS (and the whole server) multiple times, disconnected from sql server and reconnected to sql server, but the database is still shown. How can I check whether a database is offline and/or take an offline database back online? – Alexander – 2017-04-24T11:44:30.940
@Alexander - please see edited answer. – AcePL – 2017-04-24T14:11:24.710