Windows Vista vs SQL Server error: Create failed for Database 'dbname' Microsoft.SqlServer.Express.Smo
When you have a Vista operating system along with SQL Server, the common error you get when trying to perform any sort of SYSADMIN sort of tasks. For instance when creating a database:
TITLE: Microsoft SQL Server Management Studio
------------------------------
Create failed for Database 'dbname'. (Microsoft.SqlServer.Express.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+Database&LinkId=20476
------------------------------
May be not a clear message to understand or to resolve, additionally you should observe the further information within that error message:
CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Server, Error: 262)
Usual tasks checked by a DBA would be checking whether the connected user has been granted with System Administrator (SA) group on that SQL Server instance. Further if not SA group may be into DBCREATOR group, to set it up Security --> Server Roles --> DBCreator that will allow that user to create a database on that instance.
As referred on the subject with Vista you have to bear in mind with new security feature that is called UAC - User Access Controle which will restrict to perform any Administrative tasks for standard user account. So with the Standard User account helps protect the system because all applications that are run by administrators in Windows Vista do not have full administrator permissions. Programs that do require administrator permissions, such as tools to administer the system, are started with administrator permissions after the user provides consent.
Updated SQL Server Books Online refers :
SQL Server installs with the BUILTIN\Administrators group as the default system administration group. By default, users on Windows Vista that are members of the Windows Administrators group are not automatically granted permission to connect to SQL Server, and they are not automatically granted SQL Server administrator privileges. On Windows Vista, when a user tries to connect to SQL Server, a message is returned that states that the account does not have rights to log in to SQL Server.