I cant create a new db because there are only 2 logins:
sa BuiltIn\Users
I get permission denied
when trying to create the db even though I am the admin.
How can I add a user with permissions at this point or must I reinstall?
If the user account not having the access in SQL Server, please follow the below steps to add the role. Step 2: Right click “Login” and select the user account under which you want to create the database. Step 3: Right click and select properties tab. Step 4: Under “Server Roles” tab, select “dbcreator” checkbox.
In SQL Server Management Studio Object Explorer, right-click the server, and then click Properties. On the Security page, under Server authentication, select the new server authentication mode, and then click OK.
After creating a user with “SQL User without Login” type, the user will have to login using their own credentials into SQL Server. It means that the user who is logged in will have his/her own username and password. Once the login is done in SQL Server, the user will be able to use the application.
I assume SQL Authentication is disabled and builtin\users is not sysadmin (ie. you locked yourself out).
Stop the Express service, start the server in admin mode (sqlservr -m -s SQLEXPRESS from command line), connect to the admin instance and add builtin\administrators back as sysadmin. Then stop the administrative instance (Ctrl-C) and start back the the normal instance.
Since Vista/Win7/Win2k8 remove the administrator token from your context under normal UAC, it makes sense to also add as sysadmin yourself explicitly (domain\user) so you don't have to use RunAsAdministrator to connect.
See How to add a Windows user to the sysadmin fixed server role in SQL Server 2005 as a failure recovery mechanism.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With