Меню

Microsoft sql server ошибка 15405

I am trying to give all the permissions to a user in the User Mapping section of a database. But, I am encountering this error:

«Cannot use special principal dbo»
alt text

Server roles of the user:

alt text

asked Jan 10, 2011 at 6:27

Cipher's user avatar

3

This is happening because the user ‘sarin’ is the actual owner of the database «dbemployee» — as such, they can only have db_owner, and cannot be assigned any further database roles.

Nor do they need to be. If they’re the DB owner, they already have permission to do anything they want to within this database.

(To see the owner of the database, open the properties of the database. The Owner is listed on the general tab).

To change the owner of the database, you can use sp_changedbowner or ALTER AUTHORIZATION (the latter being apparently the preferred way for future development, but since this kind of thing tends to be a one off…)

answered Jan 10, 2011 at 8:59

Damien_The_Unbeliever's user avatar

2

Fix: 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,
Open SQL Management Studio and Click New Query. Type:

USE mydatabase
exec sp_changedbowner 'sa', 'true'

Close the new query and after viewing the security of the sa, you will find that that sa is the DBO of the database. (14444)

Source:
http://www.noelpulis.com/fix-cannot-use-the-special-principal-sa-microsoft-sql-server-error-15405/

Harsh Baid's user avatar

Harsh Baid

7,1395 gold badges47 silver badges91 bronze badges

answered Jun 26, 2015 at 9:33

Chiako's user avatar

ChiakoChiako

6948 silver badges16 bronze badges

2

This answer doesn’t help for SQL databases where SharePoint is connected. db_securityadmin is required for the configuration databases. In order to add db_securityadmin, you will need to change the owner of the database to an administrative account. You can use that account just for dbo roles.

answered Mar 4, 2013 at 19:50

user2120935's user avatar

SQL Server не может использовать специального пользователя «sa». Microsoft SQL Server, ошибка: 15405

 Причина ошибки в SQL Server «не удается использовать специального пользователя ‘sa’. Microsoft SQL Server, ошибка: 15405 “

при импорте базы данных в вашем экземпляре SQL вы обнаружите, что не можете использовать служебного пользователя «sa». Microsoft SQL Server, ошибка: 15405 выскакивает при установке пользователя sa в качестве DBO базы данных.

Откройте SQL Management Studio и нажмите кнопку Создать запрос.

Use mydatabase
exec sp_changedbowner ‘sa’,’ true’

Чтобы изменить владельца базы данных, можно использовать команду sp_changedbowner или ALTER AUTHORIZATION

Еще одна причина ошибки в SQL Server «не может использовать специального пользователя ‘sa’. Microsoft SQL Server, ошибка: 15405 “

«Не удалось войти в систему для пользователя ‘testdomaintest’. Причина: проверка доступа к серверу на основе токенов не удалась из-за ошибки инфраструктуры. Проверьте наличие предыдущих ошибок”

Я не мог использовать никакой другой логин, кроме того, который использовался для установки SQL Server.

Еще одно исправление этой ошибки в SQL Server «не может использовать специального пользователя ‘sa’. Microsoft SQL Server, ошибка: 15405 “

1) Войдите на сервер с той же учетной записью, которая использовалась для настройки SQL Sever.

2) Run-GRANT CONTROL SERVER TO “my login » для каждого пользователя, которому вы хотите предоставить права на сервере.

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

В графическом интерфейсе SSMS

1. Войдите в систему с помощью проверки подлинности Windows
2. Свойства при подключении
3. Нажмите кнопку безопасность в правом меню и найдите
проверку подлинности SQL Server и Windows,
b. убедитесь, что установлен флажок” сопоставить с учетными данными».

Create failed for user sa Microsoft SQLserver smo error 15405 can be resolved with this fix by our experts. 

At Bobcares, we offer solutions for every query, big and small, as a part of our SQL  Server Support Services.

Let’s take a look at how our SQL Server Support Team is ready to help customers with Create failed for user sa error 15405 error.

Create failed for user sa Microsoft SQLserver smo error 15405

As the error message indicates, Error 15405 prevents creating explicit DB users for user sa. Here, sa is the System Administrator, with unlimited permission in SQL Server. Since we do not assign any extra permissions to user sa, resulting in the error 15405 messages.

Fortunately, our SQL Server experts have come up with an easy resolution for this specific issue. It involves ensuring that the user responsible for updating the database has at least dbowner permission on the MS SQL Server or instance.

Create failed for user sa Microsoft SQLserver smo error 15405

Additionally, the Create failed for user sa Microsoft SQLserver smo error 15405 error is often a result of a user without sufficient privileges attempting to upgrade the relevant tables in the database.

Furthermore, if we are not sure whether the user currently updating the database has sufficient privileges, we can log in with Windows authentication mode and ensure that sa authentication is enabled in the server to avoid Create failed for user sa error 15405 error.

We can do this by right-clicking the Server in the SQL Server Management Studio and navigating to Properties > Security> and selecting SQL Server and Windows Authentication mode.

Then click OK and enable the sa login with the following steps:

  1. Head to Security section on your server and then select Logins.
  2. Then, right-click sa and select Properties.
  3. Next, head to Status and choose Enabled under Login and click Ok.

After that, restart SQL and we are ready to go. We will no longer come across Create failed for user sa error 15405 error.

[Need assistance with a different issue? We are available 24/7.]

Conclusion

In a nutshell, our skilled SQL Server Support Engineers at Bobcares demonstrated how to resolve Error 15405.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

  • Remove From My Forums
  • Question

  • Hi, 

    Have a user who is db_owner of a database but they cannot access it.  I thought to drop the user and recreate, however this is not possible because of the error shown in the subject.  

    There is a login at the instance level but no user in the database, however ‘dbo’ has this user as it’s login. 

    Any ideas? 

Answers

  • Hello,

    This error can occur when the login of the database owner (dbo) do not longer exists in SQL Server. Check the dbo via the database properties. You can also fix it with this SQL statement by changing the dbo to «sa» account:

    USE MyDataBase
    EXEC sp_changedbowner 'sa', 'true'


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    • Marked as answer by

      Friday, March 25, 2016 12:40 PM

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 ‘testdomaintest’. 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

Yesterday, I start SQL Server 2005 and try to connect with sa user but was enable to connect with the ‘sa’ user and got this error:

Cannot use the special principal ‘sa’ (Microsoft SQL Server, Error: 15405)

After doing some google, I found out the solution which I am sharing so that others can get all the possible solutions from this article.

The titled message mean that your sa user is disabled. To enable it, you have to follow below mentioned steps:

1) you have to change the authentication mode: go to Management Studio and open Object Explorer. Connect to your server and right-click on the server name, then select Properties. Go to Security tab and under Server Authentication select «SQL Server and Windows Authentication Mode«.

2) Also, after you follow the directions above, you will also need to explicitly enable the sa account as well. Go to Security->Logins. Right-click on the «sa» account, select «Properties«. In the list on the left, select «Status» and under «Login» on the right, make sure «Enable» is selected.

3) exec sp_changedbowner ‘sa’,’true’ in query editor after selecting the database whom you want to assign user sa.

4) You can also change the password of sa (it’s better to change the password).

After performing all above mentioned changes, Exit with SQL Management Studio. Restart Sql Service from services.msc.

Open Management Studio again and try to login «sa». Hopefully, it works. Enjoy!

(Please comment if it work for you).

Я
   yurii-syrkin

05.04.19 — 12:10

Всем доброго времени суток. Настраиваю подключение базы 1С «Центр управление производительностью» к рабочей базе. При настройке помощник затребовал роль учетной записи SQL sa processadmin. В консоли Managment Studio у sa добавляю роль processadmin нажимаю ОК и получаю ошибку Невозможно использовать специального участника «sa». (Microsoft SQL Server, ошибка: 15405). На форумах полазил, пишут надо сделать во всех базах владельца sa. Не помогло. Помогите пжл.

   Cyberhawk

1 — 05.04.19 — 12:15

Так укажи другого какого-нибудь

   Cyberhawk

2 — 05.04.19 — 12:15

Или у тебя и в инфобазах кластера «sa» прописан? Тогда не заморачивайся

   Cyberhawk

3 — 05.04.19 — 12:16

Вроде тот кто db_owner не имеет смысла давать остальные права

   yurii-syrkin

4 — 05.04.19 — 12:32

Так помощник ЦУП же требует эту роль у пользователя sa

  

Cyberhawk

5 — 05.04.19 — 13:56

Покажи на картинке. Ты что-то путаешь

TurboConf — расширение возможностей Конфигуратора 1С

ВНИМАНИЕ! Если вы потеряли окно ввода сообщения, нажмите Ctrl-F5 или Ctrl-R или кнопку «Обновить» в браузере.

Тема не обновлялась длительное время, и была помечена как архивная. Добавление сообщений невозможно.
Но вы можете создать новую ветку и вам обязательно ответят!
Каждый час на Волшебном форуме бывает более 2000 человек.

November 4, 2006 at 8:27 pm

#153273

Using sql Server 2005 

Everything was working fine, then I got up one morning and everything was haywire.  I am working on a web site and when I try to login in I get the error message

Login failed for user ‘SA’ because the account is currently locked out.

I went to my SQL Server and was able to log in using my windows authentication.

1.  My Server is set up for Sql Server and Windows Authentication mode

2.  Most of the database permissions for sa were gone.  When I tried to adder use SA to any database role I got the error message Cannot use the special Principal SA (Sql Server Error message 15405)

3.  I logged on to the server as SA and got the same results listed above.

4.  I don’t have a problem any other Sql Server logins permissions in my database – it only seems to be a problem with SA.

5.  I have tried shutting down the server (Sql Server) and restarting it, but that didn’t fix the problem.

As I said before, this all seemed to  have happened overnight.  I am the only one using this server right now so I can’t figure out how these changes happened.

I am using the evaluation copy of Windows Server for Small business Server, Build 3790 with SP1.  I have only been using it for 3 weeks so I am a long way from the end of the evaluation period, so I don’t think that is the problem.

Do you have an explanation or solution for this problem?  Any feedback would be appreciated.

Greg Edwards-268690

SSC-Insane

Points: 20673

November 6, 2006 at 6:52 am

#670027

I assume you have an ID which has admin privileges.

In SQL Server Management Studio, go to Security, then Logins.

Double click on the sa account to bring up the properties sheet.

On the general page, note the check boxes for Enforce password policy and Enforce password expiration. This is new for SQL 2005 — sa can be treated like a Domain User account for password complexity and expiration.

The Status page will allow you to unlock the account.

sa already has implied access, there shouldn’t be a need to add it to any roles. sysadmin covers quite a bit.

Books Online would be good to look at. Quite a few changes in this version.

See if you can get by without re-enabling the sa account. It’s generally not a good idea to use this account. And if policy did not disable the account, someone may have been trying to use it.

Hope this helps.

Greg E

eduardo.pin

SSC Eights!

Points: 996

I Have this issue running SQL Server 2008 and this message was in the log:

«Login failed for user ‘CENTRALoperacao’. 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. So the solution was:

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.

This worked for me.

Bye

Eduardo Pin

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Microsoft sql server ошибка 15025
  • Microsoft sql server ошибка 1418