Reputation: 21
I installed "SQL Server 2005 Express Edition" and "SQL Server Management Studio Express" on a Windows 7 Box.
When I try to create a new database in Management Studio I get this error message:
Create failed for Database 'MyDatabase'. (Microsoft.SqlServer.Express.Smo)
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.Express.ConnectionInfo)
CREATE DATABASE permission denied in database 'master'.
(Microsoft SQL Server, Error: 262)
How do I create a new database in SQL Server 2005?
Upvotes: 0
Views: 10026
Reputation: 1089
Right click SQL Management studio icon and run it as administrator. If you are a member of sysadmin group then you should be able to right click "Databases" folder and choose "New Database", then follow onscreen instructions.
Upvotes: 0
Reputation: 153822
Start SQL Server Management Studio as administrator by right clicking the icon and choosing "run as administrator".
Connect to the database engine with username/password.
Right click the folder that says: "Databases", and choose "New Database", see the following screenshot:
You get this screen, enter your database name of 'foobar'.
Click OK. Now look under databases folder to see your new foobar database:
Upvotes: 1