[英]Unable to access an SQL Server database created via Plesk in SQL Server 2014 Management Studio
In Plesk v12.5.30, I have created a new SQL Server database named ngo_database
and a new database user called ngo_databaseuser
. Plesk中v12.5.30,我创建了一个新的名为SQL Server数据库
ngo_database
并呼吁一个新的数据库用户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. 我可以通过Navicat for SQL Server v12.1.20(提供主机“ xxx” +用户名“ ngo_databaseuser” +密码+初始数据库“ ngo_database”)连接到该新数据库,并且能够访问“ ngo_database”数据库并创建新表和查询。
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. 但是,当我尝试通过SSMS 2014连接(提供服务器名称“ xxx” +登录名“ ngo_databaseuser” +密码+连接到数据库“ ngo_database”之后)时,我无法访问“ ngo_database”数据库,并且唯一可用的数据库是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. 顺便说一句,我已经与托管公司进行了检查,并选中了“向所有Microsoft SQL Server数据库用户授予ALTER DATABASE权限”。
What I am doing wrong and why I can't access the database via SSMS? 我在做什么错,为什么我不能通过SSMS访问数据库?
Not being a see a database in the object explorer of SSMS does not equate to not being able to access it. 在SSMS的对象资源管理器中没有看到数据库并不等同于无法访问它。 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. 当您只能看到数据库
master
数据库和tempdb
这很可能意味着您已经对登录名添加了对VIEW ANY DATABASE
的DENY
权限,或者它所属的服务器角色,或者VIEW ANY DATABASE
已从public
角色中撤消。而且您还没有被授予。
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. SSMS通过使用
sys
对象在对象资源管理器中构建列表,并且如果没有VIEW ANY DATABASE
,它就看不到您有权访问以从中检索相关对象的数据库。
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;
). 您可以使用
USE {Your Database}
或尝试查询表来检查您是否有权访问数据库(例如SELECT * FROM {Your Database}.sys.objects;
)。
If you need the VIEW ANY DATABASE
permission, you need to speak to your DBA. 如果需要
VIEW ANY DATABASE
权限,则需要与DBA交流。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.