An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.SQLEditors)

ADDITIONAL INFORMATION:
The SELECT permission was denied on the object ‘database_principals’, database ‘mssqlsystemresource’, schema ‘sys’. (Microsoft SQL Server, Error: 229)

If you are facing the above error then you should check the following steps.

Step1 : If your hosting at the shared server then check your account has suspended or not
If suspended then you can unsuspend the account it will start working and you are not
viewing this error again. (Make the request mail or call to your hosting provider to unsuspenssion)
Step2 : You must grant select access to DYNGRP, When you create a SQL view to be imported with AnyView External Table Wizard
Grant select access to DYNGRP from below method
1. Add the following line to the SQL View script -
GRANT SELECT ON [dbo].[view name] TO [DYNGRP]
GO
2. Grant permissions in Enterprise Manager
Launch Enterprise Manager.
Expand a server group, and then expand a server.
Expand Databases, and then expand the database to which the object belongs.
click ‘Views’
In the details pane, right-click the object on which to grant ermissions, point to All Tasks, and then click Manage Permissions.
Click List all users/user-defined database roles/public, and then select at least ‘SELECT’ access for the DYNGRP role. A check indicates a granted permission. Only permissions applicable to the object are listed.

Granting Access and Binding Defaults when recreating SQL Tables
Open the SSMS(SQL Server Management Studio) ==> Click on Tools ==>Click on Options.. ==>Under SQL Server Object Explorer==> Scripting Followed by Scripting Permission make it true at right side Scripting bound defaults and rule make it true  ==> Click Ok to save all changes.

About the Author

avatar