0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【SQL Server】saユーザでSQLServer認証方法でログインしようとしたら18456エラーが発生した。(SQL Server2019Express)

Posted at

自分用のメモとして残します。

18456エラーについては下記の通り
https://docs.microsoft.com/ja-jp/sql/relational-databases/errors-events/mssqlserver-18456-database-engine-error?view=sql-server-ver15
image.png

どうやら、データベースの設定でログイン認証方法がwindows認証のみのため、SQLServer認証でのログインでエラーになった模様。

前提

saユーザのログインは初期はログインが無効になっているため、saユーザのプロパティより有効にする。
セキュリティ→ログイン→saをダブルクリックもしくは右クリックプロパティで表示。
image.png

やり方

データベースのプロパティを開く
image.png

セキュリティ→サーバ認証をSQL Server認証モードとWindows認証モードにチェックしてOKで反映。
image.png

最後にデータベースの再起動をしてログインが可能になっているはず。

以上です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?