Unable to create a database or add sysadmin role to a Windows User via SSMS. Errors 262 and 15151

Giacomo Raucci 346 Reputation points
2024-07-30T02:11:36.13+00:00

With SSMS 20.2, using Windows 11, unable to create a database which requires a sysadmin role, which I am not able to assign since I don't have permissions. Note that I initiated SSMS using Administrative sign on. Most forums I have read indicate to contact the DBA to assign this role to the respective user. Since I installed SSMS, not sure who would be the DBA. BTW, I logged on as a Windows user.

Ironically, I had previously created a database on another system using SSMS v19.1 with Windows 10. Also, on this respective system, the Windows user had a sysadmin role. Today, I was able to create yet another database on this respective system. Has there been changes to Windows 11/SSMS 20.2 that prevents the creation of a database or the assignment of sysadmin role to the Windows user? I would appreciate any help you can provide. Thank you

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,004 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,907 questions
SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
102 questions
0 comments No comments
{count} votes

Accepted answer
  1. Erland Sommarskog 112.7K Reputation points MVP
    2024-07-30T07:47:56.1233333+00:00

    Your SSMS has nothing to do with it. SSMS is just a tool with which you connect to an SQL Server instance. That SQL Server instance could be running on your local machine, or it could be running on a different machine. You may have permissions to create databases in one instance, but not on the other.

    If you are only playing with SQL Server at home, you are likely to have SQL Server on your local machine. In that case, you are likely to be sysadmin on the instance, but it depends on how you installed SQL Server. When you install SQL Server, you have to specify a login that is to be sysadmin on your server.

    If you are in a corporate environment, and you are connecting to a SQL Server instance in that network, you will indeed have to speak nicely with the DBA to get permissions to create the database. (For which you do need need to be sysadmin, but you need the permission CREATE DATABASE or membership in the dbcreator role, if memory serves.)

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. LiHongMSFT-4306 28,041 Reputation points
    2024-07-30T03:26:52.6233333+00:00

    Hi @Giacomo Raucci

    Has there been changes to Windows 11/SSMS 20.2 that prevents the creation of a database or the assignment of sysadmin role to the Windows user?

    As far as I know, there is no changes about the creation of databases or the assignment of the sysadmin role to Windows users in Windows 11 or SQL Server Management Studio (SSMS) 20.2.

    Windows Authentication itself does not automatically grant permission to create databases in SQL Server. Whether a user authenticated via Windows Authentication can create databases depends on their role and permissions within SQL Server.

    Best regards,

    Cosmog


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.