Here’s the simplest repro case possible.
Fails with this error message.
Message Text:
TITLE: Microsoft SQL Server Management Studio
Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)
For help, click: link
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
The SELECT permission was denied on the object 'extended_properties', database mssqlsystemresource', schema 'sys'. (Microsoft SQL Server, Error: 229)
For help, click: link
This user can access the table and the record in the table. But the user cannot access the list of tables in Object Explorer.
SELECT USER_NAME() AS CurrentUser, col1 FROM dbo.TestTable CurrentUser col1 ----------- ---- robg_test 1000
The only work-around I have found is to give the user higher-than-necessary privileges (like db_datareader).
What is the minimum privilege required to allow this user to open the table list in Object Explorer?
I have tried granting the user various privileges on the dbo schema, but that did not help.
Note also that I am using a SQL user simply to illustrate the problem. The original problem was with an AD user.
Here is a relatively similar question at serverfault.
SET NOCOUNT ON USE master GO IF EXISTS (SELECT * FROM sys.server_principals WHERE name = N'robg_test') DROP LOGIN [robg_test] GO CREATE LOGIN [robg_test] WITH PASSWORD = N'CLK63!!black', DEFAULT_DATABASE = [RGTest], DEFAULT_LANGUAGE = [us_english], CHECK_EXPIRATION = OFF, CHECK_POLICY = ON GO IF EXISTS (SELECT * FROM sys.databases WHERE name = 'RGTest') DROP DATABASE [RGTest] GO CREATE DATABASE [RGTest] GO USE [RGTest] GO CREATE USER [robg_test] FOR LOGIN [robg_test] WITH DEFAULT_SCHEMA = [dbo] GO CREATE TABLE dbo.TestTable (col1 int) GO GRANT SELECT ON dbo.TestTable TO [robg_test] GO INSERT INTO dbo.TestTable VALUES (1000) GO
This can be done from SQL Management Studio or directly by SQL query: - Right click on the specific stored procedure, select Properties, go to Permissions page. Search for 'ComXClient' user and then select checkbox in Execute line and Grant column.
Step 2: Right click “Login” and select the user account under which you want to create the database. Step 3: Right click and select properties tab. Step 4: Under “Server Roles” tab, select “dbcreator” checkbox. Step 5: Click “OK” and try to create database in the user account.
Using SQL Server Management StudioRight-click a stored procedure and select Properties. In the Stored Procedure Properties -stored_procedure_name dialog box, under select a page, select Permissions. Use this page to add users or roles to the stored procedure and specify the permissions those users or roles have.
Login to SQL Server Management Studio. In Object Explorer on the left pane, expand the Databases folder and select the concerned database and navigate to the by expanding Security and Users folders. Right-click the User to which you want to GRANT or REVOKE the permissions.
Please check that you didn't check db_denydatareader
DB role. By removing that check it worked for me.
I had similar problem and resolved that by removing two roles db_denydatareader and db_denydatawriter for that user and add other roles. I used sql management studio.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With