Table of Contents
Cause of Error in SQL Server ” Cannot use the special principal ‘sa’. Microsoft SQL Server, Error: 15405 “
when importing a database in your SQL instance you would find yourself with Cannot use the special principal ‘sa’. Microsoft SQL Server, Error: 15405 popping out when setting the sa user as the DBO of the database.
To Fix this Error in SQL Server ” Cannot use the special principal ‘sa’. Microsoft SQL Server, Error: 15405 “
Open SQL Management Studio and Click New Query. Type:
USE mydatabase
exec sp_changedbowner ‘sa’, ‘true’
To change the owner of the database, you can use sp_changedbowner or ALTER AUTHORIZATION command
Another Cause of Error in SQL Server ” Cannot use the special principal ‘sa’. Microsoft SQL Server, Error: 15405 “
“Login failed for user ‘testdomain\test’. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors”
I could not use any other login except by the login that was used to install SQL Server.
Another Fix this Error in SQL Server ” Cannot use the special principal ‘sa’. Microsoft SQL Server, Error: 15405 “
1) Login in the server with the same account used to setup SQL Sever.
2) Run — GRANT CONTROL SERVER TO “my login” for each user that you want to grant rights in the server.
USE [master]
GO
ALTER LOGIN [sa] WITH DEFAULT_DATABASE=[Test], DEFAULT_LANGUAGE=[us_english]
, CHECK_EXPIRATION=OFF, CHECK_POLICY=(ON/OFF), NO CREDENTIAL
GO
USE [master]
GO
ALTER LOGIN [sa] WITH PASSWORD=N’Strongpassword’
GO
In SSMS GUI
1. Login using Windows Authentication
2. Properties at connection
3. Click Security at Right Menu, and find
a SQL Server And Windows Authentication,
b. Make sure “Map to Credential” is checked