Aracılığıyla paylaş


SQL Server yükseltmesi başarısız oluyor ve hata 15173 veya 15559 döndürüyor

Bu makale, Microsoft SQL Server için Toplu Güncelleştirme (CU) veya Hizmet Paketi (SP) yüklediğinizde oluşan 15173 veya 15559 hatasını gidermenize yardımcı olur. Veritabanı yükseltme betikleri çalıştırıldığında hata oluşur.

Belirtiler

SQL Server için CU veya SP uyguladığınızda Kurulum programı aşağıdaki hatayı bildirir:

Veritabanı Altyapısı kurtarma tanıtıcısında bekleme başarısız oldu. Olası nedenler için SQL Server hata günlüğüne bakın.

SQL Server hata günlüğünü denetlediğinizde aşağıdaki hata girişlerinden birini fark edeceksiniz.

Hata iletisi kümesi 1:

Error: 15173, Severity: 16, State: 1.
Server principal '##MS_PolicyEventProcessingLogin##' has granted one or more permission(s). Revoke the permission(s) before dropping the server principal.
Error: 912, Severity: 21, State: 2.
Script level upgrade for database 'master' failed because upgrade step 'msdb110_upgrade.sql' encountered error 15173, state 1, severity 16. 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.
EventID 3417
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.

Hata iletisi kümesi 2:

Dropping existing Agent certificate ...
Error: 15559, Severity: 16, State: 1.
Cannot drop certificate '##MS_AgentSigningCertificate##' because there is a user mapped to it.
Error: 912, Severity: 21, State: 2.
Script level upgrade for database 'master' failed because upgrade step 'sqlagent100_msdb_upgrade.sql' encountered error 15559, state 1, severity 16. 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.</br>
SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.

Neden

Bu sorun, sunucu sorumlusunu ( ##MS_PolicyEventProcessingLogin## veya ##MS_AgentSigningCertificate##) bırakamadığından yükseltme betiğinin çalışmayı durdurması nedeniyle oluşur. Bu hata, bir kullanıcı sunucu sorumlusuna eşlendiğinden oluşur.

CU veya SP yüklemesi sırasında çalışan veritabanı yükseltme betikleri hakkında daha fazla bilgi için bkz . Güncelleştirme uygularken yükseltme betiği hatalarını giderme.

Çözüm

15173 veya 15559 hatasını çözmek için şu adımları izleyin:

  1. SQL Server'ı izleme bayrağı (TF) 902 ile birlikte başlatın. Daha fazla bilgi için bkz . İzleme bayrağı 902 ile SQL'i başlatma adımları.

  2. SQL Server'a bağlanın ve hata iletisinde belirtilen sunucu sorumlusuna bağlı olarak aşağıdaki sorgulardan birini çalıştırın:

    SELECT a.name, b.permission_name  
    FROM sys.server_principals a 
    INNER JOIN sys.server_permissions b ON a.principal_id = b.grantee_principal_id 
    INNER JOIN sys.server_principals c ON b.grantor_principal_id = c.principal_id 
    WHERE c.name = '##MS_PolicyEventProcessingLogin##'
    
    SELECT a.name, b.permission_name  
    FROM sys.server_principals a 
    INNER JOIN sys.server_permissions b ON a.principal_id = b.grantee_principal_id 
    INNER JOIN sys.server_principals c ON b.grantor_principal_id = c.principal_id 
    WHERE c.name = '##MS_AgentSigningCertificate##'
    
  3. Sorgu sonuçlarında görüntülenen oturum açma bilgilerinin her biri için aşağıdaki gibi bir deyim çalıştırarak bu izinleri iptal edin.

    Örneğin, sorgulardan biri aşağıdaki sonuçları döndürürse:

    Ad: İzin adı NT SERVICE\MSSQL$TEST: CONTROL

    Bu durumda, aşağıdaki deyimlerden birini çalıştırın:

    REVOKE CONTROL ON LOGIN::[##MS_PolicyEventProcessingLogin##] TO [NT SERVICE\MSSQL$TEST] AS [##MS_PolicyEventProcessingLogin##]
    
    REVOKE CONTROL ON LOGIN::[##MS_AgentSigningCertificate##] TO [NT SERVICE\MSSQL$TEST] AS [##MS_AgentSigningCertificate]
    
  4. Başlangıç parametrelerinden TF 902'yi kaldırın ve SQL Server'ı yeniden başlatın. SQL Server TF 902 olmadan başladıktan sonra yükseltme betiği yeniden çalıştırılır.

    • Yükseltme betiği başarıyla tamamlanırsa SP veya CU yükseltmesi tamamlanır. Tamamlanan yüklemeyi doğrulamak için SQL Server hata günlüğünü ve bootstrap klasörünü de kontrol edebilirsiniz.

    • Yükseltme betiği yeniden başarısız olursa, ek hata girdileri için SQL Server hata günlüğünü denetleyin ve ardından yeni hataları giderin.