One of the common errors faced by SQL Server Database users is denial of permission while trying to create a new database in SQL Server Management Studio displaying an error code 262. The problem is encountered due to issues in Windows Authentication Connection that states that the account does not have rights to login to SQL Server. The SQL Server Error 262 displays the following error message defined below:
Below are the possible solutions to resolve the create database permission denied error 262:
Grant Database Access to a single user
SQL Server Error 262 can appear when user tries to check the execution plan using CTRL + M. As it is difficult to see the plan for any query, execution plan can be used. A calculated execution plan is a SQL Server query plan that is created without actually running the query plan. Its main purpose is to check how query will behave without having to execute it. In order to include the execution plan in the query, we can allow user to grant SHOWPLAN access to the user. Fixing the error is possible by providing particular user the SHOWPLAN access using following commands:
GRANT SHOWPLAN TO UserName
We can run the commands in the database where user faces the issue to make them view the query execution plan without any complications.
Resolve issue in SQL Express
User may encounter Microsoft SQL Server Error 262 while trying to connect to local SQL Server Express Instance from a third party application. We can fix the issue using the steps below:
There are two ways to add Windows user to the SysAdmin fixed server role:
In case of ‘machinename\Administrator’
In case of ‘domainname\username’
The blog has been aimed to focus on one of the SQL Server Error that user encounters while trying to create a new database, i.e. Microsoft SQL Server error 262. It further describes the possible solutions to guide users in resolving the create database permission denied error.