Udostępnij za pomocą


Uaktualnianie programu SQL Server kończy się niepowodzeniem, jeśli podmioty zabezpieczeń oparte na certyfikatach są właścicielami obiektów użytkownika

Ten artykuł pomaga rozwiązać problem polegający na tym, że aktualizacja zbiorcza (CU) lub dodatek Service Pack (SP) dla programu SQL Server zgłasza błąd 574 podczas uruchamiania skryptów uaktualniania bazy danych.

Symptomy

Po zastosowaniu aktualizacji CU lub SP dla programu SQL Server program instalacyjny zwraca następujący komunikat o błędzie:

Oczekiwanie na dojście odzyskiwania dla aparatu bazy danych nie powiodło się. Sprawdź dziennik błędów programu SQL Server pod kątem potencjalnych przyczyn.

Ponadto następujące wpisy błędów mogą być rejestrowane w dzienniku błędów programu SQL Server wraz z błędami 912 i 3417:

  • 15136 The database principal is set as the execution context of one or more procedures, functions, or event notifications and cannot be dropped.
  • 15138 The database principal owns a %S_MSG in the database, and cannot be dropped.
  • 15141 The server principal owns one or more %S_MSG(s) and cannot be dropped.
  • 15154 The database principal owns an %S_MSG and cannot be dropped.
  • 15155 The server principal owns a %S_MSG and cannot be dropped.
  • 15183 The database principal owns objects in the database and cannot be dropped.
  • 15184 The database principal owns data types in the database and cannot be dropped.
  • 15186 The server principal is set as the execution context of a trigger or event notification and cannot be dropped.
  • 15284 The database principal has granted or denied permissions to objects in the database and cannot be dropped.
  • 15421 The database principal owns a database role and cannot be dropped.
  • 27226 The database principal has granted or denied permissions to catalog objects in the database and cannot be dropped.
  • 33015 The database principal is referenced by a %S_MSG in the database, and cannot be dropped.
Error: 912, Severity: 21, State: 2.
Script level upgrade for database 'master' failed because upgrade step 'SSIS_hotfix_install.sql' encountered error 945, state 2, severity 25. This is a serious error condition which might interfere with regular operation and the database will be taken offline. If the error happened during upgrade of the 'master' database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that the script upgrade steps run to completion.
Error: 3417, Severity: 21, State: 3.
Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL Server Books Online.
SQL Server shutdown has been initiated

Przyczyna

Podmioty zabezpieczeń serwera, które są ujęte w podwójne znaczniki skrótu (##) są tworzone na podstawie certyfikatów po zainstalowaniu programu SQL Server. Te podmioty zabezpieczeń mają być traktowane jako podmioty zabezpieczeń utworzone przez system. Nie mogą być mapowane na podmioty zabezpieczeń bazy danych, które są właścicielami obiektów użytkownika w msdb lub innych bazach danych. Wszelkie zmiany w tej konfiguracji domyślnej mogą spowodować błędy podczas próby uaktualnienia programu SQL Server. Dzieje się tak, ponieważ skrypty uaktualniania zakładają, że te obiekty mają tylko zależności utworzone przez program SQL Server.

Rozwiązanie

  1. Uruchom program SQL Server przy użyciu flagi śledzenia 902.

  2. Aby określić mapowanie podmiotów zabezpieczeń serwera na jednostki bazy danych, uruchom następujące polecenie:

    EXEC master.sys.sp_helplogins 
    
  3. Zmień własność obiektów, których dotyczy problem, na innego użytkownika.

  4. Uruchom ponownie program SQL Server bez flagi 902 śledzenia, aby skrypt uaktualniania mógł zakończyć działanie.

Uwaga 16.

Chociaż niepowodzenie uruchamiania skryptów uaktualniania jest jedną z typowych przyczyn błędu "Oczekiwanie na nie powiodło się odzyskiwanie aparatu bazy danych", ten problem może również wystąpić z innych powodów. Błąd oznacza, że instalator aktualizacji nie może uruchomić usługi lub przełączyć ją w tryb online po zainstalowaniu aktualizacji. W obu przypadkach rozwiązywanie problemów obejmuje przegląd dzienników błędów i dzienników instalacji w celu określenia przyczyny awarii i podjęcia odpowiednich działań.

Zobacz też

Rozwiązywanie problemów z błędami skryptu uaktualniania podczas stosowania aktualizacji