Odbc ошибка 28000

Ошибка ODBC. SQLSTATE: 28000 Номер ошибки: 18456

При использовании внешнего источника данных в 1С 8.3 возникает сообщение с кодом 18456.

Чаще всего такое бывает при переходе на 8.3 — данный код говорит об ошибке авторизации в момент подключения.

Даже, если ранее этот код работал на 8.2, здесь он не работоспособен.

Быстрый переход

  • Способы решения проблемы:
  • Верная инициализация соединения:
  • Настройки пользователя в управляемом приложении:
    • Пример задания общих параметров:

Способы решения проблемы:

  1. Проверка написания пользователя, пароля
  2. Явное указание при соединении имени и пароля, связано скорее всего с тем, что в платформе появилась возможность хранить настройки соединения для каждого пользователя

Верная инициализация соединения:

Соединение = Новый ПараметрыСоединенияВнешнегоИсточникаДанных;
Соединение.СтрокаСоединения= "DRIVER={SQL Server};SERVER=S_Server;UID=User;PWD=Password;DATABASE=S_DATABASE;LANGUAGE=русский";
Соединение.ИмяПользователя = "User";
Соединение.Пароль = "Password";    
ВнешниеИсточникиДанных.СерверБД.УстановитьОбщиеПараметрыСоединения(Соединение);
ВнешниеИсточникиДанных.СерверБД.УстановитьСоединение();

Настройки пользователя в управляемом приложении:

Все функции/ Стандартные/Управление внешними источниками данных

Управление внешними источниками данных

Далее можно задать общие настройки параметры соединения или индивидуальные для пользователя

Управление внешними источниками данных внутри

Пример задания общих параметров:

Управление внешними источниками данных внутри, общие настройки

Реклама — фантазирование об обычном предмете в извращенной форме.

  • Remove From My Forums
  • Question

  • We have an application that connects to SQL 2005 thru ODBC with the following string:

    driver=SQL Server;server=server1;database=db2005;uid=serveruser;pwd=pwd1;

    When our administrators login on the workstation the application works well. But when ordinary users login they get the following error. (We only have 1 domain)

    SQLState: 28000

    SQL Server Error: 18452

    Login failed for user «. The user is not associated with a trusted SQL Server connection.

    Then the standard SQL Server Login window pops up asking for the Login ID and Password. On the window the ‘Use Trusted Connection’ is checked and the name of the user on the workstation appears on the LoginID. What we do is uncheck the ‘Use Trusted Connection’ then login using the credentials above.

    Need help on this one please. Thanks.

Answers

I am trying to use Python to connect to a SQL database by using Window authentication. I looked at some of the posts here (e.g., here), but the suggested methods didn’t seem to work.

For example, I used the following code:

cnxn = pyodbc.connect(driver='{SQL Server Native Client 11.0}',
                      server='SERVERNAME', 
                      database='DATABASENAME',               
                      trusted_connection='yes')

But I got the following error:

Error: ('28000', "[28000] [Microsoft][SQL Server Native Client 11.0][SQL Server]
Login failed for user 'DOMAIN\\username'. (18456) (SQLDriverConnect); [28000] [Microsoft]
[SQL Server Native Client 11.0][SQL Server]Login failed for user 'DOMAIN\\username'. 
(18456)") 

(Note that I replaced the actual domain name and user name with DOMAIN and username respectively, in the error message above.)

I also tried using my UID and PWD, which led to the same error.

Lastly, I tried to change the service account by following the suggestion from the link above, but on my computer, there was no Log On tab when I went to the Properties of services.msc.

I wonder what I did wrong and how I can fix the problem.

  • Remove From My Forums
  • Вопрос

  • We have an application that connects to SQL 2005 thru ODBC with the following string:

    driver=SQL Server;server=server1;database=db2005;uid=serveruser;pwd=pwd1;

    When our administrators login on the workstation the application works well. But when ordinary users login they get the following error. (We only have 1 domain)

    SQLState: 28000

    SQL Server Error: 18452

    Login failed for user «. The user is not associated with a trusted SQL Server connection.

    Then the standard SQL Server Login window pops up asking for the Login ID and Password. On the window the ‘Use Trusted Connection’ is checked and the name of the user on the workstation appears on the LoginID. What we do is uncheck the ‘Use Trusted Connection’ then login using the credentials above.

    Need help on this one please. Thanks.

Ответы

Details of Error:

Executed as user: Domain\LoginName. Login failed for user 'Domain\LoginName'. [SQLSTATE 28000] (Error 18456). The step failed.

or below ODBC Data Source SQL Server Connection – Login Failed For User

Connection failed:
SQLState: '28000'
SQL Server Error: 18456
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'UserName'.

Cause of Error:

This error is encountered when SQL Agent Service does not have permissions required to run the job. Or When we try ODBC Data Source SQL Server Connection Login Failed message when Login used for connection does not have permission needed.

Resolution:

First if this message is caused by SQL Agent Job connection then we will need to check the source SQL server agent service account name from Services MMC or Server manager or SQL Server Cofiguration Manager in Services-> Go to the SQL Server Agent Service –> properties –> Check the logon tab where we can find the account name.

Now check and add the login we found above or if the its caused by ODBC Data Source SQL Server Connection then add the Login used in ODBC to the SQL server instance by checking in Security tab –>logins with necessary permission on your target machine where its trying to connect or run the job on. This can be same instance or different instance on same or some other server.

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit «Cookie Settings» to provide a controlled consent.

Понравилась статья? Поделить с друзьями:
  • Office 2007 ошибка направления команды приложению
  • Occt avx2 ошибки
  • Office 2007 ошибка 2908
  • Occt обнаружена ошибка memory
  • Offending segment описание ошибки