Forum Discussion
MurraySobol985
Apr 11, 2024Brass Contributor
Connection problem
Environment: Windows 11 64-bit Professional I downloaded and install SQL Server Management Studio 20 (my sign-in account has administrator privileges). I also applied yesterday/today's security pat...
MurraySobol985
Apr 12, 2024Brass Contributor
Sorry about that, yes, the database engine is installed.
I BELIEVE that it is running since I see the following services;
SivertSolem
Apr 12, 2024Iron Contributor
Your first error could be due to the "delayed start". I suspect the SQL Server services weren't yet running.
For your second error, it appears you're attempting to use an SQL authenticated user "dba".
Did you allow for mixed authentication when you installed SQL Server?
Likewise, did you add your Windows user to SQL Server during installation?
A local admin account does not automatically have access to the SQL Server instance on the machine.
By default, SQL Server installs in Windows auth only mode (integrated security).
The SQL Server errorlog also logs failed login attempts automatically, and the errorlog is a text file located on your installation path.
Default ERRORLOG path for SQL Server 2022:
C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\Log\ERRORLOG
The errorlog file has no extension and can be opened in Notepad.
Assuming you are slightly comfortable with command line, I suggest dbatools' Reset-DbaAdmin to regain control of your instance. dbatools is a community powershell module.
https://docs.dbatools.io/Reset-DbaAdmin.html
Alternatively you could follow the more manual procedure documented by Microsoft.
https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/connect-to-sql-server-when-system-administrators-are-locked-out?view=sql-server-ver16
For your second error, it appears you're attempting to use an SQL authenticated user "dba".
Did you allow for mixed authentication when you installed SQL Server?
Likewise, did you add your Windows user to SQL Server during installation?
A local admin account does not automatically have access to the SQL Server instance on the machine.
By default, SQL Server installs in Windows auth only mode (integrated security).
The SQL Server errorlog also logs failed login attempts automatically, and the errorlog is a text file located on your installation path.
Default ERRORLOG path for SQL Server 2022:
C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\Log\ERRORLOG
The errorlog file has no extension and can be opened in Notepad.
Assuming you are slightly comfortable with command line, I suggest dbatools' Reset-DbaAdmin to regain control of your instance. dbatools is a community powershell module.
https://docs.dbatools.io/Reset-DbaAdmin.html
Alternatively you could follow the more manual procedure documented by Microsoft.
https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/connect-to-sql-server-when-system-administrators-are-locked-out?view=sql-server-ver16
- MurraySobol985Apr 17, 2024Brass Contributor
I was able to resolve ALL issues by uninstalling the software, then logging in as Adminstrator and installing the software from there.
I thought that my USER account had Administrator privileges but apparently there is a difference in granting those privileges to a user as opposed to signing in to the Adminstrator account.
- olafhelperApr 18, 2024Bronze ContributorEven if you are a member of the (local) admin role, you only have real admin permissions to install software, when you start the installer with option "Run as Administrator"