How do I grant myself admin access to a local SQL Server instance?

后端 未结 6 1533
一个人的身影
一个人的身影 2020-12-04 06:49

I installed SQL Server 2008 R2 to my local machine. But, I can\'t create a new database because of rights (or lack of).

\"CREATE DATABASE PERMISSION D

6条回答
  •  囚心锁ツ
    2020-12-04 07:29

    Yes - it appears you forgot to add yourself to the sysadmin role when installing SQL Server. If you are a local administrator on your machine, this blog post can help you use SQLCMD to get your account into the SQL Server sysadmin group without having to reinstall. It's a bit of a security hole in SQL Server, if you ask me, but it'll help you out in this case.

提交回复
热议问题