In Plesk v12.5.30, I have created a new SQL Server database named ngo_database
and a new database user called ngo_databaseuser
.
I can connect to this new database via Navicat for SQL Server v12.1.20 (after providing host “xxx” + user name “ngo_databaseuser” + password + initial database “ngo_database”), And I am able to access “ngo_database” database and create new tables and queries.
But when I try to connect via SSMS 2014 (after providing server name “xxx” + login “ngo_databaseuser” + password + connect to database “ngo_database”), I am not able to access “ngo_database” database and the only databases available are master + tempdb. And I am not able to import nor create a new user database.
BTW, I have checked with the hosting company and the “Grant the ALTER DATABASE permission to all Microsoft SQL Server database users” is checked.
What I am doing wrong and why I can’t access the database via SSMS?
Not being a see a database in the object explorer of SSMS does not equate to not being able to access it. When you can only see the databases master
and tempdb
this very likely means that either you have had a DENY
permission for VIEW ANY DATABASE
added to your login, or a Server Role it belongs to, or VIEW ANY DATABASE
has been revoked from the public
role and you haven't been granted it.
SSMS builds the list in the object explorer by using the sys
objects, and without VIEW ANY DATABASE
, it can't see the databases you have access to to retrieve the relevant objects from it.
You can check if you have access to the database by using USE {Your Database}
or trying to query a table (such as SELECT * FROM {Your Database}.sys.objects;
).
If you need the VIEW ANY DATABASE
permission, you need to speak to your DBA.