2011年12月23日 星期五

如何新增 "SQL Authentication Login" in SQL Server 2005



Reference:
Windows Authentication vs. SQL Server Authentication


有沒有試過設定了新的SQL login account卻不能用它connect 到 SQL server的經驗呢?

原來SQL server 2005 有一個 "authentication mode" 的 setting, 而default是 "Windows Authentication mode", 即是只接受windows authentication, SQL authentication 是不行的.


要更改這個setting, 需要login 到 "SQL server Management Studio", 在 object explorer 中right click server 名字, 選 "properties" => "security", 就會見到可以選擇 "SQL Server and Windows Authentication mode" 啦~


如果要新增一個 SQL Authentication Login Account, 則在上面提到的 "properties" => "security" 再選 "Logins", 在右邉 "summary" 空白地方 right-click "New Login…" 就可以了, 記得選 "SQL Server Authentication"…


提多一點, 這裡create出來的account是沒有權限的, 連table也看不到, 要在各database處再添加permission給這個account才可以工作 (例如︰最簡單的觀看 table 內容就只要 "connect" 以及 "select" permission 就ok 了)

沒有留言:

如何在Windows的事件檢視器event viewer,查詢開機關機的紀錄

Windows 如何 事件檢視器 查詢開機關機紀錄 Step1: 打開windows的 「 事件檢視器 」,開啟「 建立自訂檢視… 」視窗,在「事件記錄檔」選項,將「Windows 紀錄」內勾選「系統」選項。 Step2: 內含/排除事件識別碼: 」排除事件識別碼打「6005,6...