如何用 sa 帳號和密碼登入 SQL Server 2019 Express

2020-01-08 16:00:11 | SQL | 2k+ Reads

安裝 SQL Server 2019 Express 後,默認以 Windows Authentication 登入。

  1. 登入後,打開 Security 資料夾,找到 Logins 資料夾中的 sa 帳號。
  2. 右鍵點擊 sa 帳號,選擇屬性。
  3. 在 Status 頁面,將 Login 設為 Enabled(確認不要勾選 Login is locked out)。
  4. 點擊 General 頁面,重新設置密碼。勾選 Enforce password policy。

 

接下來的步驟非常重要:

右鍵點擊整個實例(Instance),選擇屬性。

  1. 進入 Security 頁面,選擇 SQL Server and Windows Authentication mode。
  2. 進入 Connections 頁面,勾選 Allow remote connections to this server。
  3. 點擊 OK 保存設置。
  4. 右鍵點擊實例,選擇 Restart。

完成以上設置後,你就可以使用 sa 帳號和密碼進行連接了。

 

關聯閲讀:如何設置讓你可以在區域網路內連接SQL Server?

This article was last edited at 2024-08-20 04:37:04