5 Eylül 2009 Cumartesi

"Status: 0, code: 20015, text: 'Login failed for user ''. The user is not associated with a trusted SQL Server connection."

HATA MESAJI:
"Status: 0, code: 20015, text: 'Login failed for user ''. The user is not associated with a trusted SQL Server connection."

AÇIKLAMA:
Aslında çok standart bir hata mesajı gibi duruyor. Fakat bu hata mesajını bir Replication senarsoyunda almıştım.

Bu kurulumda, Log Reader Agent' ın çalıştığı SQL Server Instance' ının SQL Server servisleri Local System hesabıyla çalışıyordu ve Log Reader Agent' ı, Publisher sunucusuna Windows Authentication ile bağlanmak üzere ayarlanmıştı ve Publisher' da da, Subscriber sunucusu için bir Bilgisayar Hesabı Login' i yoktu.

Hata mesajının tamamına bir örnek:
2009-08-27 06:46:06.297 Copyright (c) 2005 Microsoft Corporation
2009-08-27 06:46:06.297 Microsoft SQL Server Replication Agent: logread
2009-08-27 06:46:06.297
2009-08-27 06:46:06.297 The timestamps prepended to the output lines are expressed in terms of UTC time.
2009-08-27 06:46:06.297 User-specified agent parameter values:
-Publisher SUNUCU1
-PublisherDB VERITABANIM
-Distributor SUNUCU2
-DistributorSecurityMode 1
-Continuous
--XJOBID 0x6584F2DEBAB77C4C9A509D4A9A0506BE
-XJOBNAME SUNUCU1-VERITABANIM-1
-XSTEPID 2
--XSUBSYSTEM LogReader
-XSERVER SUNUCU1
-XCMDLINE 0
-XCancelEventHandle 00000000000003B4
-XParentProcessHandle 0000000000000468
2009-08-27 06:46:06.527 Status: 0, code: 20015, text: 'Login failed for user ''. The user is not associated with a trusted SQL Server connection.'.
22009-08-27 06:46:06.527 Login failed for user ''. The user is not associated with a trusted SQL Server connection.

Not: Bu mesajdaki gerçek bilgiler sahteleriyle değiştirilmiştir.

ÇÖZÜM:
Böyle bir durum için, Publisher tarafında oluşturacağınız bir SQL Server Login' ini kullanabilirsiniz. Bu Login' i "sysadmin" Server Fixed Role' üne dahil etmeniz uygundur.

SQL Server Management Studio' yu çalıştırın ve ilgili SQL Server Instance' ına bağlanın. Daha sonra aşağıdaki yolu izleyerek:

Object Explorer' dan Replication-->Local Publications-->Publication Properties-->Agent Security-->Log Reader Agent Security-->Connect to the Publisher’ da, Using the following SQL Server Login... kutularına, Log Reader için oluşturduğunuz SQL Server Login' inin bilgilerini girin ve bu sorundan kurtulun.

Hiç yorum yok: