I got an exception when trying to connect to my local SQL Server Express Instance from a third party application, the exception and solution as follows.
Exception
Create failed for Database 'NavDB'. (Microsoft.SqlServer.Smo)
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Server, Error: 262)
Solution:
To fix this just follow the steps below:
- Start --> All Programs --> Microsoft SQL Server 2005 --> Configuration Tools --> SQL Server Surface Area Configuration
- Add New Administrator
- Select 'Member of SQL Server SysAdmin role on SQLEXPRESS' and add it to right box.
- Click Ok.
Hope it helps :)