Ask a questionAsk a question
 

AnswerError creating database

  • Tuesday, September 16, 2008 9:36 PMM. Wilson Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

    Hello,

     

    I am trying to create a database in sql express 2005...management studio...I get the following error message.

     

    TITLE: Microsoft SQL Server Management Studio Express
    ------------------------------

    Create failed for Database 'DataBeta'.  (Microsoft.SqlServer.Express.Smo)

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

     

    Any advice is appreciated.

     

    Thanks,

    M. Wilson

Answers

  • Tuesday, September 16, 2008 10:53 PMAndrea MontanariMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    hi,

    you are experiencing a permissions problem.. the login you are using to connect to the SQL Server instance has not been granted enought permissions to create and or manage databases.. your login requires membership to the dbcreator server role.. 

    regards

All Replies

  • Tuesday, September 16, 2008 10:53 PMAndrea MontanariMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    hi,

    you are experiencing a permissions problem.. the login you are using to connect to the SQL Server instance has not been granted enought permissions to create and or manage databases.. your login requires membership to the dbcreator server role.. 

    regards

  • Monday, October 26, 2009 1:27 PMEMStephen Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi I am experiencing the same problem as above your link to dbcreator server role states: Members of the dbcreator fixed server role can create databases, and can alter and restore their own databases, which is not particularly helpful.
    I am running on Windows Vista Business a 64bit version and would prefer not to have a proliferation of accounts on my computer. I have reset the default user privilages in the security Options folder of Vista to the maximum available and still SQL Server says I dont have enough permissions to create a database.
    How do I obtain membership to the dbcreator server roll?
    Thanking you in anticipation.
    Edward.
  • Monday, October 26, 2009 10:41 PMAndrea MontanariMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    hi,
    the "problem" is not about Windows accounts (permissions) but SQL Server server principals related permissions..
    "you" could be a limited Windows\domain account but when in SQL Server instance's context your permissions could have been leveraged to be a "system admin"... again, this "system admin" membership is not on the underlying OS platform but on the instance only...
    regards
    http://www.asql.biz - DbaMgr2k - DbaMgr and further SQL Tools
  • Tuesday, October 27, 2009 2:45 PMEMStephen Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Andrea thanks for your reply, OK so SQL Server takes no account of the Vista logon permissions when entering a new logon name with sysadmin Server Rolls? I have followed the process listed in library/bb326612.aspx which results in Error: 15247.
    How can I get server principles related permissions when I have not got permission to logon as 'sa' and any other logon is given 'public' permissions only?
    It is interesting that SQL Server lists my Vista Administration account name under connection: in the connection pain and is connected to the master instance of SQL Server? which I am not allowed to edit or replicate. Logon also recognizes that the Vista logon name exists if that is entered in the new SQL Server new logon 'logon name'?
    PS I had a look at your website and congratulate you in getting the Microsoft award.
    Best regards,
    Edward
  • Tuesday, October 27, 2009 10:59 PMAndrea MontanariMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    hi Edward,

    ..
    OK so SQL Server takes no account of the Vista logon permissions when entering a new logon name with sysadmin Server Rolls? I have followed the process listed in library/bb326612.aspx which results in Error: 15247...

    you can actually enforce a Windows\Domain group to be member of the SQL Server internal system admin (or whatever) role, both at install time or later... if you do that, the Windows account (or the group if you elected a related Windows\Domain group) will be granted related server role permissions...

    How can I get server principles related permissions when I have not got permission to logon as 'sa' and any other logon is given 'public' permissions only?
    by default standard SQL Server authentication is disabled at installation time, meaning that you can not connect to a SQL Server instance providing SQL Server credential of "sa" or whatever like SQL Server standard login..
    you have to manually enable that feature at install time or later, at run time, accessing the SQL Server "Properties" dialog in the "Security" panel.. you even should check "sa" login is enabled as well..

    It is interesting that SQL Server lists my Vista Administration account name under connection: in the connection pain and is connected to the master instance of SQL Server? which I am not allowed to edit or replicate. Logon also recognizes that the Vista logon name exists if that is entered in the new SQL Server new logon 'logon name'?

    I'm sorry I can not completely understand your meanings..
    using SQL Server Management Studio it usually prompts you to connect via a trusted authentication by default.. that means you'll connect with the integated credentials of your current OS\Domain account.. you can try running SQL Server Management Studio "executing as (administrator)" so that you "bypass" Vista UAC in order to escalate someway your actually permissions, but the local\Administrators group must be granted permissios to connect as well..
    if you can not, you can modify a registry key under the SQL Server instance's node, similar to
    HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQLServer
              LoginMode=2
    which externally impose the instance to accept standard SQL Server authenticated connections so that you can later connect as "sa" and eventually manage your WinNT logins..
    after changes that registry key you've better restart the SQL Server instance..
    but probably I did not correctly understand your requirement\problem..

    PS I had a look at your website and congratulate you in getting the Microsoft award.
    thank you very much, Edward.. :)
    regards
    http://www.asql.biz - DbaMgr2k - DbaMgr and further SQL Tools
  • Saturday, October 31, 2009 2:25 PMEMStephen Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Andrea thanks again for your reply, I have recently aquired my computer with it's Vista OS, so I have a lot of
    reading to do to find my way about, unlike XP there is no run programme visable, perhaps 'regedit' will run from
    the command Prompt, I may take some time to confirm the outcome of atempting to apply your relpies to my various
    points thanks for your help so far.
    Best regards,
    Edward.
  • Saturday, October 31, 2009 3:21 PMEMStephen Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Andrea, Further I have made entry to the regestry and find with regard to your reference to 'LoginMode'
    that I cannot find LoginMode at the following address:
    HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\Microsoft SQL Server\SQLEXPRESS\MSSQLServer entry=[Name (Default), Type REG_52, Data (value not set)]
    there are also three subdirectories - CurrentVersion, SuperSocetNetLib, & Np neither have an entry LoginMode.
    Any suggestions?
    The third item in my reply dated Tuesday October 27th was more of an observation of the information shown on the
    'Login-New' dialogbox, your reply was constructive only there seems to be something different (lacking) in the
    entries on my machine! Note the difference in the directory names SQLEXPRESS V MSSQL10.SQLEXPRESS?
    Best regards,
    Edward.
  • Saturday, October 31, 2009 6:20 PMAndrea MontanariMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    hi Edward

    Hi Andrea, Further I have made entry to the regestry and find with regard to your reference to 'LoginMode'
    that I cannot find LoginMode at the following address:
    HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\Microsoft SQL Server\SQLEXPRESS\MSSQLServer entry=[Name (Default), Type REG_52, Data (value not set)]
    there are also three subdirectories - CurrentVersion, SuperSocetNetLib, & Np neither have an entry LoginMode.
    try having a look at
    HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer
    where MSSQL.1 should reference your SQLExpress instance..


    . Note the difference in the directory names SQLEXPRESS V MSSQL10.SQLEXPRESS?
    Best regards,
    Edward.
    yes, these are changes due to 2008 code base..
    regards
    http://www.asql.biz - DbaMgr2k - DbaMgr and further SQL Tools
  • Tuesday, November 03, 2009 3:21 PMEMStephen Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Andrea, I have checked the Regestry address given and note another variation in our entries, I have no directory
    MSSQL.1 beneath "HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\Microsoft SQL Server\" I have "SQLEXPRESS\MSSQLServer\ CurrentVersion, SuperSocketNetLib, and Np"
    MSSQLServer contains: Name (Default), Type REG_SZ, Data (value not set)
    CurrentVersion contains in addition : Name CurrentVersion, Type REG_SZ, Data 9.00.4035.00
    etc. No ref to MSSQL.1 !!

    However the good news is I have uninstalled SQL Server from my computer and reinstalled it while logged in as Administrator I have installed it using my Administrator Account Name & Password and have as a consequence been able to create a new database which is a big step forward.

    These issues started with a failure to connect to SQL Server from MS Visual Web Developer 2008. On returning to my VWD2008 project I find that I can now connect to SQL Server and see the Database in the 'Solution Explorer' App_Data folder with all of its folders - unfortunately these folders are empty, so I guess I must progress this now on the VWD2008 Forum unless this is still in your field of experience?
    Thanks again for your intrest and help.
    Best regards,
    Edward.
  • Tuesday, November 03, 2009 5:40 PMAndrea MontanariMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    hi Edward,

    usually you have another issue, as indicated in http://blogs.msdn.com/sqlexpress/archive/2006/07/17/668971.aspx ..
    and it all depends "where" you created the database, "what" did you reference in your project, ...
    are you using User Instances? (http://msdn.microsoft.com/en-us/library/bb264564(SQL.90).aspx)
    regards
    http://www.asql.biz - DbaMgr2k - DbaMgr and further SQL Tools
  • Tuesday, November 10, 2009 4:08 PMEMStephen Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Andrea, Good question:

    it all depends "where" you created the database? "what" did you reference in your project?

    The book I'm using is a MS publication Step by Step Visual Web Development ISBN-10: 978-0-7356-2606-5
    the SQLdb is called and writen to by the security tag of the ASP.NET Web Application Administration page
    it contains details of users security account information entered when a new user is created (by me in
    this instance) the author of the book shows screen dumps of how to access the DB File via the Visual
    Web Developer Solutions Explorer by opening the ASPNETDB.MDF file and accessing the appropriate Table from
    the dropdown list. I have the folders included in the SQLdb Database but they are either empty or the files
    cannot be found!
    I havent actually created the DB directly it has been done for me by the "VWD Application" itself.
    MS have not included a forum specific to this book at least none is listed in the book, so I am trying to find
    out why there are variations between my project and the one I am simulating from the book, particularly if
    the applications have downloaded OK and are complete and working the same way the Authors does? The notices
    say the download was satisfactory.
    Now after this ramble, thanks again for your continuing interest and help.
    Best regards,
    Edward
  • Wednesday, November 11, 2009 5:23 PMEMStephen Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Andrea, Strange thing:
    After the computer has been shut down and restarted the user information in the project is still available, so
    VWD must be able to access the data store (SQLServer) where it placed the information! Yet it is unable to display
    the SQLServer subfolders and files which it has already used?
    Best regards,
    Edward.
  • Wednesday, November 11, 2009 5:35 PMAndrea MontanariMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    hi Edward,
    I'm sorry, I did not uderstand very much :)
    but I can guess (again) that the User Instance scenario is involved, so that the \CurrentUser\ folder is the place where all the user instance's system databases are stored..
    regards
    http://www.asql.biz - DbaMgr2k - DbaMgr and further SQL Tools