Sql-Server

SQL Server 錯誤:18456,嚴重性:14,狀態:16 創建 SharePoint SSO 數據庫

  • August 25, 2009

我正在使用 Web 應用程序 (SharePoint) 為 Microsoft 單點登錄創建數據庫。每次創建數據庫的嘗試都會給出“登錄失敗”樣式錯誤。出於測試目的,我在 SharePoint Web 應用程序和計時器服務、Microsoft SSO 服務以及 SharePoint 的“管理單點登錄的伺服器設置”頁面中使用相同的帳戶。

記錄的兩個 SQL Server 錯誤是:

使用者 ‘blah’ 登錄失敗

`>

Error: 18456, Severity: 14, State: 16.

The Windows Server event log error show the same ‘Login failed’ message with the word ‘master’ in the data section.

I have tried:

  • Giving the user sysadmin permission on SQL Server
  • Changing the default database to one where the user has db_owner permission as well as setting it to ‘master’
  • Making the user local administrator on the SQL Server

The comments in this article on the SQL Protocols blog state that:

State=16 means that the incoming user does not have permissions to log into the target database… This can also happen if for example the default database for user FOO is not online (for example the database is marked suspect).

I think I’ve covered the permissions and SharePoint is using the databases so they shouldn’t be marked suspect.

Does anyone have some ideas?`

This now appears to be resolved. I had to log in to the SharePoint server as the SSO service account, as described by [Frank Grossmann](http://cs.grossmann.com/blogs/fg/archive/2007/09/02/setting-up-single-sign-on-in-sharepoint-2007-errors.aspx). In fact it looks as though this SQL login error is spurious and unrelated to SSO!

引用自:https://serverfault.com/questions/45268