SQL Server - create database permission denied in database 'master' sql server 2012 error 262?

Asked By Krishna T on 29-Nov-13 02:35 AM
Could you please help me on this urgent?
Robbe Morris replied to Krishna T on 29-Nov-13 08:36 AM
If you are an admin in the sql instance, the most likely reason is that you don't have permission to write to the drive/folder where you are placing the database files.  It is also possible that you have designated the database to be bigger than the available drive space.
Reena Jain replied to Krishna T on 30-Nov-13 12:37 AM
Hi,

Just give a quick try by right clicking on manage studio and run as a administrator.


Hope this will help you
Krishna T replied to Reena Jain on 10-Dec-13 03:10 AM
I am running SQL Management studio as Administrator.  Still getting the same error.  could you please check and inform me?    It is very very greatful if give solution ASAP
Reena Jain replied to Krishna T on 12-Dec-13 12:54 AM
Hi,

You have not installed the sql server properly. You must had to define one system administrator for sql server or need to define user id and password  if taking mix mode. Although you can try this
 1.  Type "services.msc" in Run
2.  Shut down SQL Server (SQLEXPRESS) from services. Note the exe path.
3.  Open cmd window (run as admin) and run single-user mode as local admin with this command (the path is from the previous step):
"c:\Program Files (x86)\Microsoft SQL Server\MSSQL.2\MSSQL\Binn\sqlservr.exe" -m -s SQLEXPRESS
4.  Open another cmd window (run as admin).
5.  Type the following sqlcmd:
sqlcmd -S .\SQLEXPRESS
In the prompt, type:
1>  sp_addsrvrolemember '<domain\user>', 'sysadmin'
2> GO
6.  Close both cmd windows.
7.  Start the SQLExpress from the services control panel. Now the Create Database works

Hope this will help you