Get IT Solutions

How to do IT
Menu
  • Home
  • SCCM 2012
    • Deploy Packages
    • Troubleshooting errors SCCM 2012
  • Windows
    • Applications Silent Install
    • Windows Tools
    • Windows Error
    • Script
    • Exchange Server
    • Troubleshooting Office
    • Applications Errors
  • Database
    • SQL Server
    • MySQL
    • Oracle
  • Cybersecurity
  • Other
  • Reviews

Microsoft SQL Server Error 262 Solutions – cannot create database

Sql Server error 262 is common issue faced by SQ Server users when trying to create new database in SQL Server Management Studio. This error can appear also during login on SSMS. A message is returned that states that the account does not have “sysadmin” role to SQL Server.

Another reason si that starting with SQL 2008, local Administrators group is no longer added by default during SQL Server setup. You even have to use a manual step to add the current user as a local administrator. This means that it is possible, especially if you don’t use mixed authentication (or have forgotten the sa password), that you can be completely locked out of your own SQL Server instance.

For any reason you don’t have any account available on SQL Server with “sysadmin” role. So you can’t edit other users to add the specific database on their “user mapping”. The following article will tech how to fix those issue with privileges and permissions.

Error:

CREATE DATABASE permission denied in database ‘master’. (Microsoft SQL Server, Error: 262)

SQL Server error 262

SQL Server error 262

 

SQL server error 262

Case 1 – You have a login available account with “sysadmin” role.

This case assumes that you have an account with sysadmin roles on SQL Server like an Admin. During the setup of SQL Server you must have specified (at least one) system administrator for the instance of SQL Server, or SA account if you are using mixed mode authentication. You need to use credentials for that account to gain access to your SQL Server.

After accessing the SQL Server Management Studio with this account you can create or edit other users (The user that having the error in his case) in order to have sysadmin role.

  1. Log on to the computer using the credentials for the Administrator account.
  2. Click the Start button, point to All Programs, click Microsoft SQL Server, and then click SQL Server Management Studio.
  3. Connect to the instance of SQL Server.
  4. Click Security, right-click Logins, and then click New Login.
  5. In the Login name box, enter the user name.
  6. In the Select a page , click Server Roles, select the sysadmin check box, and then click OK.

 

Case 2 – How to gain sysadmin access on SQL Server when you don’t have any user with “sysadmin” role.

The worst case is when you don’t have any sysadmin user to login on the system. The single option is to start SQL server in a single user mode, in that case anyone who is local administrator on that computer can connect to SQL Server as a member of sysadmin fixed server role.

READ ALSO -   Microsoft sql server error 53 – Connection Issue with SQL Server Instance

Start the instance of SQL Server in single-user mode by using either the -m or -f options. Any member of the computer’s local Administrators group can then connect to the instance of SQL Server as a member of the sysadmin fixed server role.

Make sure you stop SQL agent service, before you put SQL server service in Single user mode else you can error saying only one user can be connected.

 

  1. Stop the SQL Server Service:
    • Use SQL Server Configuration manager and stop the SQL service or use services to locate and stop SQL Service.
  2. Start SQL Server in Single User mode
    • Use start-up parameter m to start SQL Service in single user mode.
      • “net start MSSQLServer /m SQLCMD” if you want to use command line
      • Using configuration Manager – Locate the service which you have stopped earlier. Go to its properties, “Advanced”, click on drop down at “Startup Parameters” and add ;-m
  3. Connect to SQL Server and add desired account in SysAdmin role.
    • Open administrator command prompt. (i.e. right click on command prompt shortcut and choose “Run As Administrator”
    • Type sqlcmd –S For example
      • sqlcmd –S. (for default instance)
      • sqlcmd –S.\MyInstance
    • You are connected as System Administrator, because you are part of local administrator group in windows.
    • Use this script I normally use to add local administrator group as a part of SysAdmin group in SQL Server Instance.

USE [master]

GO

CREATE LOGIN [Domain\Username] FROM WINDOWS WITH DEFAULT_DATABASE=[master]

GO

EXEC master..sp_addsrvrolemember @loginame = N’ Domain\Username, @rolename = N’sysadmin’

GO

  1. Stop SQL Server Service.
  2. Remove startup parameter and Start SQL Service normally

This procedure is described on MSDN

Read also other SQL Server Helping Posts:

  1. Find Location of SQL Server Error Log
  2. SQL Server Error 300
  3. Restore Master Database

Case 3 – Adding specific permissions to the user

Grant SHOWPLAN access to the SQL user

SQL Server Error 262 can appear when user tries to check the execution plan using CTRL + M. 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:

USE DatabaseName

GO

GRANT SHOWPLAN TO UserName

GO

We can run the commands in the database where user faces the issue to make them view the query execution plan without any complications.

 

Let me know if you have any issue with the solutions regarding the Sql Server error 262.

Share
Tweet
Google+
Pinterest
Linkedin
Stumble
Email
Prev Article
Next Article

Related Articles

sql error 18456
Sql server error 18456 is common issue appear during login …

Sql server error 18456 – Troubleshoot Login Failed

Trobleshooting an Fix the errors related to Sqlstate 42000 Syntax …

FIX sqlstate 42000 – mysql error 1064 – you have an error in your sql syntax

Best Computers & Laptops

Best Computer for Cyber Security – Laptop and Desktop
Best Computer for Cyber Security
Hey, are you seeking the best computer for cyber security? Well, we must say you have come to the right place to find your answer and guidance. There are a plethora of products out there for you to pick from ...
Read More
Best Computer for Microsoft Office & Excel – Laptop and Desktop
Best Computer for Microsoft Office & Excel
Are you finding the Best Computer for Microsoft Office and Excel? In modern days, the best laptop or desktop set is the one which is both portable, has good looks and offers the smoothest performance. Microsoft Office is a package ...
Read More
Best Computer for Hacking – Laptop and Desktop Selection
Best computer for Hacking
When it comes to hacking, either laptop or desktop, choosing the best computer for hacking would be an exhilarating job. There are many specifications to be considered for hacking ...
Read More

SQL Server Tips

FIX sqlstate 42000 – mysql error 1064 – you have an error in your sql syntax
Sqlstate 42000 Is a general code that come together with other number. Most often comes with the code 1064 and ...
Read More
The execute permission was denied on the object – SQL Server Error
The execute permission was denied on the object
The following article will handle “the execute permission was denied on the object” error appears on SQL Server. This error ...
Read More
How to Read Data from LDF file in SQL Server – A Complete Guide
Read LDF File
Hello Everyone, Today we are going to address the most popular query of SQL users, how to read data from ...
Read More

Search

We are on:

Get FREE SPACE for your PC

3 Method to Delete Temp Files in Windows 7/10 including vbs script

In this post we will explain how to delete temp files windows 7 using three different methods including vbs script ...
Read More

Fastest way to delete hiberfil sys from windows 10/8/7 and XP – CMD

In this article we will explain how to remove or delete hiberfil sys from Windows 10/8/7 and XP . If you does ...
Read More

Learn How to Silent Install Applications

Silent Install Adobe Flash Player
In this tutorial will explain how to silent install adobe flash player 25, Msi and Exe version. How to disable auto update and uninstall older ...
Read More
Java Silent Install and Uninstall Older Version – Deploy Package MSI
This tutorial will explain how to silent install Java MSI/EXE version and disable auto-update. The command line will also uninstall the ...
Read More
Silent Install Adobe Shockwave Player 12 and disable update
In this tutorial will explain how to silent install Adobe Shockwave Player 12 msi and disable auto update. The command will uninstall older ...
Read More
Silent Install Google Chrome MSI, Silent Uninstall and Disable Auto Update
This tutorial will explain how to silent install Google Chrome MSI and disable auto update. The command will uninstall older version of ...
Read More
Silent Install Adobe Reader 11 and DC – msi and exe – disable update
In this tutorial will explain how to silent install Adobe Reader version 11 and DC. We will user both version "msi" ...
Read More
Silent Install Mozilla Firefox msi and exe file – Including Silent Uninstallation
This tutorial will explain how to silent install Mozilla Firefox. We will use MSI and EXE files to perform a silent ...
Read More
Skype Silent Install Msi and disable updates
In this tutorial will explain how to silent install skype  and disable auto update. The command will uninstall older version of Skype and ...
Read More
Filezilla Silent Install msi and exe version
Filezilla silent install tutorial will explain how to perform a silent installation of application. We will explain methods, silent install ...
Read More
Silent install VLC Media Player
In this tutorial will explain how to silent install VLC Media Player. We will explain both methods for exe and ...
Read More
Notepad++ silent install exe and msi version – Command Line
Notepad++ silent install is the new article from a series of silent installations. Notepad++ as free software has two main ...
Read More

Batch File Solutions

How to list files in cmd – Command Prompt – Windows 10
Whenever you want to search and make a list of all files on a specific folder, you used the windows ...
Read More
Batch rename multiple files in folder – CMD script – Bulk Method – Win 10
The following article will teach how to rename multiple files in a folder with the bulk method using Command Line ...
Read More
Batch script rename file using Command Line (CMD) & PowerShell – Windows 10
The following article will use the “rename” or “ren” command to rename the file using a command prompt. Also, we ...
Read More
Change extension of multiple files at once – CMD batch file
The following article will teach the methods to change the extension of multiple files at once using command prompt and ...
Read More
How to delete registry key with command line | PowerShell | Batch
The following article is the third of series about registry and working on it through command line (CMD) and PowerShell ...
Read More
How to add registry key & values with CMD | PowerShell | Batch
The registry is the place where most of the applications store the settings but not only. Used also from the ...
Read More
Unmap Network Drive CMD – (Batch file) – net use delete command
After we posted the methods to map network drive using cmd commands we come this time with the method to ...
Read More
Map Network Drive cmd (batch file) – net use user password
This article will focus on another way to map a network drive on your computer instead of from the explorer ...
Read More
How to Find Large Files on Windows 7 & 10 – CMD Forfiles Command
If the capacity of your hard drive is running low, it is time to clean off some files and to ...
Read More
CMD Script to check disk space on windows and multiple remote servers
The following article will provide you script to check disk space. The Script monitor space on windows and multiple remote ...
Read More

Get IT Solutions

How to do IT

About Us

Get IT Solutions is a personal blog, which is managed to guide people for various topic.

Second Menu

  • Donate
  • About Us
  • Contact Us
  • Privacy Policy

What Will You Find

Automation is our area of writing where are included scripts, batch and various tips to automate your daily job.
Copyright © 2025 Get IT Solutions