Ошибка входа в Microsoft SQL Server: 18456

Sql server код ошибки 18456

в случае, если вы не можете подключиться к проверке подлинности SQL, и вы пробовали другие решения.

Вы можете попробовать следующее:

проверьте подключение

проверяем состояние

Состояние 5

наиболее вероятное объяснение, скорее всего, будет правильным.

состояние войти

«вы не смотрите в нужном месте «или»то, что вы видите, не то, что вы думаете».

локальный конфликт DB и SQLEXPRESS

если вы пытаетесь подключиться с помощью «проверка подлинности SQL Server», то вы можете изменить проверку подлинности сервера:

в среде Microsoft SQL Server Management Studio в обозревателе объектов:

Правой Кнопкой Мыши на сервере и нажмите кнопку Properties

перейти к Security страница

под Server authentication выбрать SQL Server and Windows Authentication mode переключатель

перезапустить службы SQL

проверьте эту статью в блоге от команды платформы данных.

вам действительно нужно посмотреть на состояние части сообщения об ошибке, чтобы найти основную причину проблемы.

после этого, Google, как исправить эту проблему.

перед открытием щелкните правой кнопкой мыши и выберите «Запуск от имени администратора». Это решило проблему для меня.

сначала см. сведения об ошибке если «государство» «1» Убедитесь, что база данных настроена для проверки подлинности SQL и Windows в разделе SQL server / свойства / безопасность.

Я столкнулся с этой проблемой.

пожалуйста, посмотрите на прикрепленные изображения,

пожалуйста, измените свою проверку подлинности sql как SQL server и режим WindowsAuthenication,

и перезапустите Sql server.

18456 Список Состояний Ошибок

ОПИСАНИЕ ОШИБКИ СОСТОЯНИЯ ОШИБКИ

возможные причины Ниже приведен список причин и некоторые краткие объяснения, что делать:

проверка подлинности SQL не включена: если вы используете SQL Login в первый раз на экземпляре SQL Server, чем очень часто ошибка 18456 происходит, потому что сервер может быть установлен в режиме проверки подлинности Windows (только).

неверный идентификатор пользователя: SQL Server не может найти указанный идентификатор пользователя на сервере, который вы пытаетесь получить. Самой частой причиной является то, что этот идентификатор не был предоставлен доступ на сервер, но это может быть простая опечатка или вы случайно пытаетесь подключиться к другому серверу (обычно, если вы используете более чем один сервер)

неверный пароль: неверный пароль или просто опечатка. Помнить это это имя может иметь разные пароли на разных серверах.

менее распространенные ошибки: идентификатор пользователя может быть отключен на сервере. Вход в систему Windows был предоставлен для проверки подлинности SQL (изменение на проверку подлинности Windows. Если вы используете SSMS, вам, возможно, придется работать от имени другого пользователя, чтобы использовать эту опцию). Пароль мог истечь и, вероятно, несколько других причин. Если вы знаете о каких-либо других, дайте мне знать.

18456 государство 1 объяснения: Обычно Microsoft SQL Server даст вам состояние ошибки 1, которое на самом деле ничего не значит, кроме того, что у вас есть ошибка 18456. Состояние 1 используется для скрытия фактического состояния для защиты системы, что для меня имеет смысл. Ниже приведен список со всеми различными состояниями и для получения дополнительной информации о получении точных состояний посетите понимание» ошибка входа » (ошибка 18456) сообщения об ошибках в SQL Server 2005

надеюсь, что это поможет

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

У меня есть два виртуальных сервера, размещенных в одном кластере, каждый с собственным IP-адресом. Узел настроил один из серверов в качестве SQL Server, а другой-в качестве веб-сервера. Однако SQL Server установлен и работает на обоих. Хост забыл упомянуть, какой из серверов является SQL, а какой-Web, поэтому я просто предположил, что первый-Web, второй — язык SQL.

когда я подключился к (что я думал) SQL Server и попытался подключиться через SSMS, выбрав проверку подлинности Windows, я получил ошибку, упомянутую в этом вопросе. Потянув много волос, я прошел через все настройки, включая конфигурацию сети SQL Server, протоколы для MSSQLSERVER:

двойной щелчок TCP / IP дал мне это:

IP-адрес был другого виртуального сервера! Это, наконец, заставило меня понять, что я просто запутался между серверами, и все хорошо работало на втором сервере.

Если вы измените учетные данные пользователя для входа или добавите нового пользователя для входа, то после входа в систему вам придется перезапустить службу SQL Server. за это

перейти к — > службы

затем перейдите к SQL Server (MSSQLSERVER) и остановитесь и начните снова

теперь попробуйте войти в систему, я надеюсь, что вы можете.

щелкните правой кнопкой мыши пользователя, перейдите к свойствам, измените базу данных по умолчанию на master Это экран печати изображения, которое показывает, что вы должны проверить, если у вас есть ошибка 19456. Иногда это значение по умолчанию для базы данных, которую пользователь не имеет разрешения

пожалуйста, проверьте, если вы подключены к сети, если это член домена ПК. Кроме того, убедитесь, что вы не находитесь на двух домашних ПК, поскольку ваши маршруты могут быть неверными из-за сетевых показателей. У меня была эта проблема, когда я не мог подключиться к домену проверка подлинности SQL windows переключилась на локальную учетную запись ПК, но зарегистрировала ее как проверку подлинности SQL. Как только я отключил свой беспроводной адаптер и перезагрузился, интеграция Windows переключилась обратно на учетную запись домена и прошла проверку подлинности. Я уже настроил смешанный режим, как вы уже сделали, так что предыдущие сообщения не применяются.

для меня это было неправильно логин и пароль.

сначала перейдите в панель запуска, а затем выполните поиск локальных служб Затем нажмите на кнопку » Просмотр локальных служб» Затем он откроет окно службы, затем перейдите к SQL Server (MSSQLSERVER) щелкните правой кнопкой мыши на нем и нажмите кнопку стоп, а затем снова щелкните правой кнопкой мыши на нем и нажмите кнопку Пуск. Теперь вы можете войти в систему и ввести имя пользователя ‘СА’ и пароль свой пароль.

также вы можете просто войти в систему с проверкой подлинности windows и запустить следующий запрос, чтобы включить его:

Я считаю, что это может произойти, если вы пытаетесь войти в систему с пользователем, который определен в Active Directory, но попробуйте использовать «аутентификацию SQL Server» на экране входа в систему. Я не знаю, как указать другого пользователя с проверкой подлинности NTLM/Windows: когда я нажимаю раскрывающийся список проверки подлинности Windows, имя пользователя и пароль отключаются, и я могу войти только как сам.

устранение неполадок подключения к SQL Server

в случае, если вы не можете подключиться к аутентификации SQL, и вы пробовали другие решения.

Вы можете попробовать следующее:

проверьте подключение

проверяем состояние

Состояние 5

наиболее вероятное объяснение, скорее всего, будет правильным.

состояние войти

«вы не смотрите в нужном месте «или»то, что вы видите, это не то, что вы думаете».

локальный конфликт БД и SQLEXPRESS

If you’re trying to connect using «SQL Server Authentication» then you may want to modify your server authentication:

Within the Microsoft SQL Server Management Studio in the object explorer:

Right click on the server and click Properties

Go to the Security page

Under Server authentication choose the SQL Server and Windows Authentication mode radio button

Restart SQL Services

Check out this blog article from the data platform team.

You really need to look at the state part of the error message to find the root cause of the issue.

Afterwards, Google how to fix the issue.

Before opening, right-click and choose ‘Run as Administrator’. This solved the problem for me.

first see the details of the error if «state» is «1» Ensure the database is set for both SQL and Windows authentication under SQL server / Properties / Security.

I have faced this issue.

Please look at the attached image,

Step 1: Go to server property

Step 2: Go to Security

Step 3: Change server authentication as SQL server and WindowsAuthenication mode

and restart your Sql server.

Just happened to me, and turned out to be different than all other cases listed here.

I happen to have two virtual servers hosted in the same cluster, each with it own IP address. The host configured one of the servers to be the SQL Server, and the other to be the Web server. However, SQL Server is installed and running on both. The host forgot to mention which of the servers is the SQL and which is the Web, so I just assumed the first is Web, second is SQL.

When I connected to the (what I thought is) SQL Server and tried to connect via SSMS, choosing Windows Authentication, I got the error mentioned in this question. After pulling lots of hairs, I went over all the setting, including SQL Server Network Configuration, Protocols for MSSQLSERVER:

Double clicking the TCP/IP gave me this:

The IP address was of the other virtual server! This finally made me realize I simply confused between the servers, and all worked well on the second server.

18456 Error State List

ERROR STATE ERROR DESCRIPTION

Potential causes Below is a list of reasons and some brief explanation what to do:

SQL Authentication not enabled: If you use SQL Login for the first time on SQL Server instance than very often error 18456 occurs because server might be set in Windows Authentication mode (only).

Invalid userID: SQL Server is not able to find the specified UserID on the server you are trying to get. The most common cause is that this userID hasn’t been granted access on the server but this could be also a simple typo or you accidentally are trying to connect to different server (Typical if you use more than one server)

Invalid password: Wrong password or just a typo. Remember that this username can have different passwords on different servers.

less common errors: The userID might be disabled on the server. Windows login was provided for SQL Authentication (change to Windows Authentication. If you use SSMS you might have to run as different user to use this option). Password might have expired and probably several other reasons…. If you know of any other ones let me know.

18456 state 1 explanations: Usually Microsoft SQL Server will give you error state 1 which actually does not mean anything apart from that you have 18456 error. State 1 is used to hide actual state in order to protect the system, which to me makes sense. Below is a list with all different states and for more information about retrieving accurate states visit Understanding «login failed» (Error 18456) error messages in SQL Server 2005

Определение источника ошибки авторизации SQL Server (18456 ошибка)

Недавно решил навести порядок в журнале подопечного SQL сервера. Большое количество записей состояло из ошибки 18456 — ошибка авторизации, причем в качестве источника стояла local system — что немного вводило в ступор. Вроде как кроме инстанса SQL сервера ничего больше на сервере не крутится. В итоге выяснилось, что это был Report Server, которому была дадены необходимые права и журнал сервера стал горрраздо читабельнее )). В ходе писоков нашел мануал, котороый в принципе один мог бы почомчь разбораться в ситуации, если бы попался первым )https://www. eraofdata. com/blog/2009/01/. За это его перевод:

Определение источника ошибки авторизации SQL Server (18456 ошибка)

Всем нам периодически приходится определять источник ошибок авторизации (login failures), и, заметив рост количества тем на форумах с просьбой о помощи в это вопросе, я решил начать новый год с поиска быстрого способа точного определения этих ошибок. Я порыскал в интернете, в предположении, что эта тема была много раз обсосана и закрыта на других форумах или блогах, но с удивлением обнаружил, что хотя и есть много статей о том, что такое «ошибка авторизации» и что означают все коды, возвращаемые в сообщениях ошибки, я не смог найти пошагового описания того, что должен сделать DBA для определения откуда пришел запрос на авторизацию приведший к ошибке. Эта запись — моя попытка исключить этот пробел и показать как выделить процесс, вызывающий эту проблему.

Технология крайне не зависима от версий, так что это не критично в каком пакете Вы это будете делать, но я предполагаю, что вы знаете как использовать SQL Server Profiler для трассировки запросов.

Ошибка входа 18456

Login errors with Microsoft SQL Server (MSSQL) are a fairly common issue and can be easily solved with some basic troubleshooting steps. Before we dig in, let’s take a look at the details of the error to try and determine the cause.

connect to server error

Troubleshooting Microsoft SQL Server Error 18456

Solutions to Microsoft SQL Server Error 18456

Sometimes, the error presents as “login failed for user ‘<username>’,” this information will help us as we identify the user we need to troubleshoot. From the message, we’ll know the error number as a reference to search for next steps. In this case, it is Microsoft SQL Server, Error: 18456.

Other times, we may only see “Microsoft SQL Server Error 18456” along with the severity and state number. On its own, a state number might not mean much, yet it can offer more details as to what is wrong and where to look next.

These states of the error, 18456, are the most common. The descriptions and potential solutions offer a quick explanation and potential troubleshooting guide.

mssql errors and potential solutions

Step 1:В Log In with Remote Desktop

The troubleshooting and solutions require you to login to the server or at least be able to make a Windows Authentication connection to MSSQL using Microsoft SQL Server Management Studio. The most common and easiest method is to connect directly to the server with a Remote Desktop Connection. If you need more information about Remote Desktop Connection, these Knowledge Base articles will help you get connected:

Step 2: Run Microsoft SQL Server Management

Once you are logged into the server, you’ll want to run Microsoft SQL Server Management Studio (SSMS). SSMS is the tool best suited to configure, manage, and administer MSSQL.

mssql server management

When you start SSMS, you will be asked to log in to the server. By default, most MSSQL servers have Windows AuthenticationВ enabled, meaning you must log in with the Windows Administrator or the account specified as the SQL Administrator when MSSQL was installed and configured.

connect to mssql server

In addition to Windows Authentication, MSSQL supports SQL Server Authentication. Depending on the version of MSSQL and how it was installed and configured, you may or may not have SQL Server Authentication enabled by default.

Step 3: Checking the Server Authentication Mode

Once we login to SSMS using Windows Authentication, we need to check the security settings to confirm whether MSSQL is set up to allow both Windows and SQL Authentication.

In SSMS, right-click the Server Name at the top of the Object Explorer window and choose Properties.

Next, click the SecurityВ page.

mssql security properties

If you find Windows Authentication is the only mode configured, this is the likely cause of Error 18456, Login failed for user ‘<username>’.

Setting the Server authentication mode to allow SQL Server and Windows Authentication, you will be able to login to MS-SQL with a SQL user and password or a Windows user and password. After making this change, you will need to restart the SQL Server service.

Step 4: Restart the SQL Service

In SSMS, right-click the Server Name at the top of the Object Explorer window and choose RestartВ to apply the new authentication mode settings. В

In the above example, Windows Authentication mode was the only mode configured, and the Error 18456 occurred because the user ‘sa’ is a SQL user and SQL Server Authentication was not permitted.

Step 5: Checking SQL User Permissions

As we check the SQL user permissions, we need to answer the following questions:

In SSMS Object Explorer, expand Security, Logins. Locate the user that was failing to log in. A x on the user indicates this user has login disabled.

smss login properties

To allow the user to login, right-click the user and choose Properties, then click the StatusВ page. Enabling login for the user and click OK.

Enable login for user

After refreshing the list user logins, we can confirm the user no longer has a red x present. This should allow the user to log in. In this example, the SQL user ‘sa’ failed to log in because there was no permission to log in. В

Continuing with user troubleshooting, right-click the user and choose Properties, then click the GeneralВ page. Here you can enter a new password and then enter the confirmation password. Click OKВ to save the new password. We set a new password for the user so that we are certain of the password when we attempt to log in.

sa login user properties

Step 6: Mapping the User to the Database

Our last step in troubleshooting a user is to check user mapping to verify the user has access to the desired database and to set or verify their role for the database. Right-click the user and choose Properties, then click the User MappingВ page. Select the Database from the list of databases. From the database role memberships, select the desired/required memberships. Click OK.

map user to mssql database

In this example, we mapped the user ‘ProdX709’ to the database Production X709.2019 and granted them database role db_owner. In many cases, you only need a user to have db_datareader and db_datawriter roles to be able to read and write to the database.

Conclusion

In this troubleshooting article, we learned how to identify specifics of Error 18456 to help us track down the root cause of the issue. Still looking for support? В Our MSSQL database solutions come with assistance from our technical support team. Find out how our high-availability database can work for you!

Get Started Today!

Our Support Teams are filled with experienced Linux technicians and talented system administrators who have intimate knowledge of multiple web hosting technologies, especially those discussed in this article.

Should you have any questions regarding this information, we are always available to answer any inquiries with issues related to this article, 24 hours a day, 7 days a week 365 days a year.

If you are a Fully Managed VPS server, Cloud Dedicated, VMWare Private Cloud, Private Parent server, Managed Cloud Servers, or a Dedicated server owner and you are uncomfortable with performing any of the steps outlined, we can be reached via phone @800.580.4985, a chat or support ticket to assisting you with this process.

Источники:

https://askdev. ru/q/oshibka-vhoda-v-microsoft-sql-server-18456-6761/

https://top-office11.ru/oshibki-i-problemy/ms-sql-oshibka-18456.html

https://www. liquidweb. com/kb/troubleshooting-microsoft-sql-server-error-18456-login-failed-user/

Понравилась статья? Поделиться с друзьями:
Добавить комментарий

;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: