若要確認 Microsoft SQL 資料庫已正確設定且能與 VMware Identity Manager 搭配使用,請在設定資料庫後執行下列驗證指令碼。

先決條件

系統會為 VMware Identity Manager 服務建立 Microsoft SQL 資料庫。

程序

  1. 以 sysadmin 身分或使用具有 sysadmin 權限的使用者帳戶登入 Microsoft SQL Server Management Studio 工作階段。

    隨即顯示編輯器視窗。

  2. 在工具列中,按一下新增查詢
  3. 執行下列命令。視需要進行編輯。

    // Check if user is db owner. Return true
    SELECT IS_ROLEMEMBER('db_owner’) 
     
    // Make sure user is not sysadmin. Should return false
    SELECT IS_SRVROLEMEMBER('sysadmin’) 
     
    // check if saas schema exists, should be not null
    SELECT SCHEMA_ID('saas’)
     
    // check schema owner, should be user provided to installer
    SELECT SCHEMA_OWNER FROM INFORMATION_SCHEMA.SCHEMATA where SCHEMA_NAME=‘saas’
     
    // check if saas is user default schema, should return saas
    SELECT SCHEMA_NAME()
     
    // check db collation, should return Latin1_General_CS_AS
    SELECT DATABASEPROPERTYEX(‘<saasdb>', 'Collation') AS Collation
     
    // check if read committed snapshot is on, should return true
    SELECT is_read_committed_snapshot_on FROM sys.databases WHERE name=‘<saasdb>'
    

  4. 在工具列上,按一下 !執行

    如果組態不正確,將會顯示錯誤訊息。在繼續設定 VMware Identity Manager 服務以使用外部 Microsoft SQL 資料庫之前,請先修正錯誤訊息中所述的問題。