Permission denied on "server_principals" when connecting to MSSQL

Discussion of open issues, suggestions and bugs regarding database management and development tools for SQL Server
Post Reply
donavan
Posts: 4
Joined: Fri 17 Mar 2017 17:49

Permission denied on "server_principals" when connecting to MSSQL

Post by donavan » Fri 17 Mar 2017 18:20

I have a paid mssql server 2012 in my web host provider. I can configure the connection in dbForge and it's ok. But when I try to open a new query window I get this error:

The SELECT permission was denied on the object 'server_principals', database 'mssqlsystemresource', schema 'sys'

Is there an option to disable or something else to work around this error?

My dbForge version is 5.4.257

Thanks.

alexa

Re: Permission denied on "server_principals" when connecting to MSSQL

Post by alexa » Tue 21 Mar 2017 15:57

We recommend you to refer to your database administrator on this or dedicated SQL Server forums in the Internet, since we provide technical support only on our products.

donavan
Posts: 4
Joined: Fri 17 Mar 2017 17:49

Re: Permission denied on "server_principals" when connecting to MSSQL

Post by donavan » Tue 21 Mar 2017 16:59

I'm able to access my database using management studio, so it's working.
But when using dbForge, If I open a new query window dbForge tries to use this "server_principals" (it's a system view and I don't have permission to it).
I would like to know if there is a way to dbForge not use this view when opening a new query window.

Thanks.

alexa

Re: Permission denied on "server_principals" when connecting to MSSQL

Post by alexa » Wed 22 Mar 2017 09:50

Could you please provide us the query you are executing and perform the following:
1. Select 'Tools -> Options...' from the main menu. The 'Options' window opens.
2. Navigate to the 'Environment -> Output' branch.
3. Select the 'Write queries sent by the program to the SQL Log' and 'Log application errors' options.
4. Unselect the 'Delete application log after closing' option. Click 'OK'.
5. Reproduce the issue and send us the error report along with a *.log file with the latest date from the directory:

Code: Select all

%SystemDrive%\Users\%UserName%\AppData\Roaming\Devart\dbForge Studio for SQL Server\
You can send a reply straight to our support system at supportATdevartDOTcom and alexaATdevartDOTcom .

donavan
Posts: 4
Joined: Fri 17 Mar 2017 17:49

Re: Permission denied on "server_principals" when connecting to MSSQL

Post by donavan » Wed 22 Mar 2017 13:11

I've sent the attachments by email.
Thanks.

alexa

Re: Permission denied on "server_principals" when connecting to MSSQL

Post by alexa » Fri 24 Mar 2017 14:05

Could you please try executing the following query in SSMS:

Code: Select all

USE AdventureWorks2014;
SELECT 
 sp.principal_id,
 sp.name,
 sp.sid
FROM sys.server_principals sp;
dbForge requires the metadata returned by this query. If the query also requires some permissions in SSMS, you need to refer to your database administrators.

donavan
Posts: 4
Joined: Fri 17 Mar 2017 17:49

Re: Permission denied on "server_principals" when connecting to MSSQL

Post by donavan » Mon 27 Mar 2017 13:24

I get the same error message when running this query.
But with the SSMS I can access my database e run any query on my tables, I only get this error in SSMS if I try to access Server > Security > Logins, while in dbForge I can't run any query.
I'm contacting my database administrator to see if they can give the permission needed to get this metadata.
But maybe you could consider a new option in configuration so we could choose not get this metadata if we are not going to use it.

Thanks.

alexa

Re: Permission denied on "server_principals" when connecting to MSSQL

Post by alexa » Mon 27 Mar 2017 16:44

Thank you for the reply.

Could you please clarify on whether there is no access to the sys.server_principals view which means that the SELECT query we provided previously is not executed in SSMS as well as in dbForge?

Post Reply