.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Cant create new database / CREATE DATABASE permission denied in database master (error 262)

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :ASP.Net
   I am using SQL express and Visual web developer on windows Vista. When I try to create a new database the following message appears.   CREATE DATABASE permission denied in database master (error 262) I log on to my computer as an administrator. Help appreciated  Prontonet      

View Complete Post

More Related Resource Links

Windows 7 CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Server, Error: 26

Hi I have migrated to a new computer using Windows 7, 6 gig memory, I7 chip (old machine had xp) and have installed Visual Studio 2008 and  SQL Server 2008 R2.  I get CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Server, Error: 262) when I try to create a new database.  Other posts (example:http://social.msdn.microsoft.com/forums/en-US/sqltools/thread/28fee0ed-c7e2-40df-8f79-f513c9848f09/) work for Vista but I cannot find how to grant permissions.  Run as administrator (vista fix) does not work. I have admin privaleges on my machine.  There are no other accounts.    What do I need to do to update privaleges? Thanks and have a nice day.    

Create database permision denied in database ' master' (MS SQL SERVER, ERROR 262


Cn not do anything with my sql server, everything i trt to do i get this message, user does not have permision, etc, ,

I am running windows Vista Business, SQL SERVER 2005

so what going on here


SQL Express 2008 R2 - CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Serve


So, we have an application that we've written to leverage SQL Express 2008 R2 - which our setup installs on the command line using the following instructions:


The code that does the installation can be found here:


//Path to the SQL Installation files 

string strSQLPath = Application.StartupPath + "\\Install_Support_Files\\SQL_86\\Setup.exe"; 

//If we're on a 64-bit OS use the 64 bit setup

if (Wow.Is64BitOperatingSystem == true)


strSQLPath = Application.StartupPath + "\\Install_Support_Files\\SQL_64\\Setup.e

SQL Express 2008 R2 - CREATE DATABASE permission denied in database 'master'


I have created a setup application with SQLEXpress 2008 as a prerequisite. On test SQLExpress installs OK

after the application is installed it must create and install a database using a mixture of SMO and Scripting. I used SMO to add the current user (who is a Windows Administrator) as a Login to the SQL Express server.

Dim l As Login = New Login(srv, My.User.Name)
                l.LoginType = LoginType.WindowsUser
                l.DefaultDatabase = "MASTER"

It fails on srv.CreateDatabase with error message "permission denied in database MASTER"

this thread talks about converting the server to single user mode before adding a login


how is it possible to scrip this? there is no&nbs

CREATE DATABASE permission denied in database 'master'.


getting this error when I try to restore a .bak database to sqlexpress:

CREATE DATABASE permission denied in database 'master'.
RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 262)

I login to sqlserver mgmt studio using windows authentication. Getting this permission denied error whether I login to the PC as administrator or my user account.

What do I need to do to be able to restore a database into sqlexpress?




CREATE DATABASE permission denied in database 'master'



I'm using Visual Studio 2005 Pro and SQLExpress that comes with it.

I have my program running fine in XP Pro OS using a window user "Glen" (Computer administrator) with Administrator rights.  This means that I installed VS 2005 using this window user "Glen"

I created another windows user "TestUser" (Limited account) in the same physical PC.

I tried to run the program and on the part that I need to access SQL table, I got the error [CREATE DATABASE permission denied in database 'master']

At the same time while using "TestUser" and running sqlcmd (to check if I can connect to SQL), I also got error HResult 0x2, Level 16, State 1.

I read alot on MSDN discussions and related links but it seems that I can't get the solution that I need.


1.  Am I allowed to run my program using user "TestUser" since SQL is installed using "Glen" windows user?

2.  Do I need to add access rights to "TestUser" to allow the user to have CREATE rights? (Note : for security reason, I can add other access rights except Administrator)

Thanks in advance for all you help.





create database permission denied in database


Hi All,
Now i am using SQL Express Edition in my laptop but in my laptop no administrator rights.
so open sql server and create New DB i get the error for "Create database permission denied in database'Master'.(Microsoft SQL Server, Error: 262)"

please help me on this.



VS2010 Deploying Database Project - Error: Cannot create file [...]MSSQL10.MSSQLSERVER\MSSQL\DATA\m

I had SQL Express from a previous installation of VS2010. I uninstalled All SQL and VS2010 and re-installed VS2010 (without Express) and then re-installed SQL Server 2008 Developer Edition. Now when I try to deploy a database project I am receiving the following error:     Creating EDDY.Cheetah.Database.Server... ...\sql\debug\Server.sql(38,0): Error SQL01268: .Net SqlClient Data Provider: Msg 5170, Level 16, State 1, Line 1 Cannot create file 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\mastlog.ldf' because it already exists. Change the file path or the file name, and retry the operation. ...\sql\debug\Server.sql(38,0): Error SQL01268: .Net SqlClient Data Provider: Msg 1802, Level 16, State 4, Line 1 CREATE

SQL Server 2K5 - C# Create database - Catch error



    using (SqlConnection sqlConnection = new SqlConnection("Data Source=" + session["DWSERVER"] + ";Initial Catalog=master;Integrated Security=SSPI;"))


     ServerConnection svrConnection = new ServerConnection(sqlConnection);

     Server server = new Server(svrConnection);

     string script = File.ReadAllText(session["INSTALLLOCATION"] + @"Sources\DW.sql");

     script = script.Replace("[SSASSERVER]", session["SSASSERVER"]);

     script = script.Replace("[DWSERVER]", session["DWSERVER"]);

     script = script.Replace("[DBSERVER]", session["DBSERVER"]);

     script = script.Replace(&q

Database create error due to folder access right


I have SQL Server  and had that  problem Below .

When i try to create database having different folder it is not working

This directory works:
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

Anything else like

C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\OtherFolder

generated  error.


CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file

CREATE DATABASE failed. Some file names listed could not be created. Check related errors.


Any body has idea how to resolve this.

Error when configuring Report Server Database - Wizard is trying to create Database on a non existen


I'm trying to setup SSRS using the Reporting Services Configuration Manager.  Everything seems to be working except the database creation.  When I click on the Database (3rd option down) then Change Database I run through the wizard.  Put in proper SA credentials.  Accept the defaults clicking next through and when it gets to running the script to create the data base I get the Error I pasted below.  We do not have a G drive so I went into SSMS and changed the Default Database settings to point to the F drive (where our other DBs reside) - I got that tip off of this forum but it didn't fix my issue. Any ideas what to try next?  Do I need to stop and restart a service or something?  Thanks for any help you guys can offer.

System.Data.SqlClient.SqlException: Directory lookup for the file "G:\mssql\data\ReportServer.mdf" failed with the operating system error 3(The system cannot find the path specified.).

CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateO

[SQLServer2005] I don't have a database master key, I still can create a symmetric key. Why?


When I don't have master key for AdventureWorks, I still can do this:






What if I create a symmetric key without database master key?

I read MSDN but it doesn't say about this.

sql server 2008 r2 install does not create database engine, also mmc creates error "Failed to create


I am loading sql server 2008 r2 developer edition into Windows Vista Home Basic. Product loads correctly with no error messages; except will not create database engine. And will not create integration services. When I try to open MMC, I will get error "MMC could not initialize the snap-in. Product may not have been installed correctly."

I understand this is a known issue for SQL Server 2008 RD installing on Windows Vista? What is the workaround or fix? Hot fixes available for this issue from support.microsoft.com do not install on my Windows Vista Home Basic machine.


Connestion string create any database server

This links important to how to create connection string to any data base sever.

Create/add table from code to database



I create table:

                  DataSet data=new DataSet();

                  DataTable myTable = new DataTable("NewTable");

                   DataColumn[] keys = new DataColumn[1];

                   // create column
                   keys[0] = new DataColumn();
                   keys[0].DataType = System.Type.GetType("System.String");
                   keys[0].ColumnName = "PointID";
                   myTable.Columns.Add(keys[0]);    &nb

how create database?????


I want to make databas? that will send daily to all members that leave email?Please if you can help me

Yukon Basics: XML, T-SQL, and the CLR Create a New World of Database Programming


The next version of SQL Server, code-named "Yukon," includes quite a few enhancements and expanded language support. For example, Transact-SQL now conforms more closely to the ANSI-99 SQL specification and makes querying more flexible and expressive. Yukon can execute user-defined functions, stored procedures, and triggers written in CLR-targeted languages, including Visual Basic .NET and C#. It supports a subset of the W3C standard XQuery language, and has native XML support.In this article, the author outlines the most significant language features and builds an order-entry sample app.

Eric Brown

MSDN Magazine February 2004

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend