Bobcares

MS SQL Error 262 – How to fix

by | Jun 7, 2020

MS SQL users sometimes run into “SQL Error 262” while creating a new database, logging into SQL Server Management Studio, etc.

Here at Bobcares, we routinely see & resolve MS SQL errors such as this as part of our MS SQL Support services.

Today we will go through the top causes for this error, and how to fix it.

SQL error 262 occurs when..

  • Trying to create new database in SQL Server Management Studio.
  • Logging on SQL Server Management Studio.
  • User tries to check the execution plan.
  • Trying to connect to local SQL Server Express instance using a third party application.

Now, lets see how to fix it.

 

MS SQL Error 262

 

 

Fixes for MS SQL Error 262

Some of the possible fixes for MS SQL error 262 are:

  • Grant Database Access to a single user.
  • Resolve issue in SQL Express.
  • Add Windows user to sysadmin role.

Now let’s see how to implement these fixes.

Grant Database Access to a single user

One of the scenarios where this SQL 262 error appears is when the user tries to check the execution plan using CTRL + M.

An execution plan is used to check how query will behave without having to execute it.

So, for including the execution plan in the query, we can allow SHOWPLAN access to the user.

Allowing particular user to grant the SHOWPLAN access using the commands shown helps in fixing SQL error 262.

USE DatabaseName
GO
GRANT SHOWPLAN TO UserName
GO

This helps fixing the error.

 

Fixing issue with SQL Server Express

We may encounter the 262 error while trying to connect to a  local SQL Server Express Instance from a third party application.

We can fix this error using the steps shown:

  • Firstly, follow the path:-  Start> All Programs > Microsoft SQL Server> Configuration Tools >SQL Server Surface area Configuration
  • Then, click on Add New Administrator
  • Next, move to Member of SQL Server SysAdmin role on SQLEXPRESS and Add it to right-box.
  • Finally, click on OK

 

Add Windows user to sysadmin role.

One of the reasons behind this 262 error to appear is not having an account available on SQL Server with sysadmin role.

There are two ways to add Windows user to the sysadmin fixed server role:

To add Windows user with login “machinename\Administrator”

  • Using the credentials for the machinename\Administrator account log on to the computer.
  • Then, click Start and follow the path:- All Programs > Microsoft SQL Server >SQL Server Management Studio
  • Next, connect to an instance of SQL Server.
  • Now, follow the path:- Security>right-click Logins>New Login.

MS SQL Error 262

  • Enter the user name In the Login name box,
  • Finally, in the Select a page>Server Roles

MS_SQL_Error_262.png

  • Finally, select sysadmin check box and then click OK.

 

To add Windows user with  login “domainname \username”

  • Using the credentials for the domainname\username account log on to the computer .
  • Next, follow the path:- Start> All Programs > Microsoft SQL Server >SQL Server Management Studio.
    Note: “Run As Administrator” option elevates the user permissions In the User Access Control dialog box, click Continue.
  • Then, connect to an instance of SQL Server in SQL Server Management Studio .
  • Next, follow the path >> Security>>right-click Logins>>click New Login.
  • Enter the user name in the Login name box,.
  • Finally, Go to Select a page, click Server Roles, select the sysadmin check box, and then click OK.

 

[Need assistance in fixing MS SQL errors? We are available 24×7.]

 

Conclusion

In short, MS SQL error 262 may occur in different scenarios like creating new database in SQL Server Management Studio, connecting to local SQL Server Express Instance from a third party application, etc. Today, we discussed in detail the possible ways by which we can handle such scenarios to fix this error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

2 Comments

  1. Karma

    Hello, I have tried following these instructions to fix SQL Server Error 262 CREATE DATABASE Permission Denied, with no success. I am wondering if some of the information may be outdated or if program paths could be labeled differently on different devices.
    I only just downloaded this program and the required services and followed the basic installation wizards.

    Any assistance would be appreciated.
    Thanks!

    Reply
    • Hiba Razak

      Hello Karma,
      Please contact our support team via live chat(click on the icon at right-bottom).

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF