はじめに
先日、検証のためSQL Server 2019の評価版を使用してデータベースサーバを構築しました。デフォルトではsaアカウントが無効化されていますので有効化する手順をまとめておきます。
環境
OS:Windows Server 2019 Standard Evaluation
DB:Microsoft SQL Server 2019(Management Studio 18インストール済み)
設定
「Microsoft SQL Server Management Studio 18」を起動します。
最初は「Windows認証」で接続します。

一番上の「W2019-3(SQL Server・・・)」を右クリックして「プロパティ」をクリックします。

左ペインから「セキュリティ」を選択します。
「SQL Server 認証モードとWidnows認証モード」にチェックを入れます。
「OK」ボタンをクリックします。

「構成の変更の一部は、SQL Server を再起動するまで有効になりません」のメッセージが表示されたら「OK」ボタンをクリックします。

saアカウントをダブルクリックします。

パスワードを任意に設定します。

左ペインから「状態」をクリックします。
ログインは「有効」にチェックを入れます。
「OK」ボタンをクリックします。

Windowsキー+Rでファイル名を指定して実行画面を表示します。
「services.msc」を入力し、「OK」ボタンをクリックします。
「SQL Server (MSSQLSERFER)」サービスを再起動します。

saアカウントで接続できることが確認できれば完了です。

コメント