Nasıl yapılır: Anonim iletişim güvenliği (Transact-SQL) hedef Hizmetleri Yapılandırma
SQL Server uzak hizmet bağlaması başlatan hizmeti barındıran veritabanı içinde bulunduğu bir hizmet için herhangi bir görüşmesi iletişim güvenliğini kullanır.uzak hizmet bağlaması adsız belirtiyorsa, iletişim kullandığı anonim güvenlik =.Bu durum, başlatan hizmet için bir kullanıcının bulunduğu hedef veritabanı için gerek yoktur.Başlatan hizmet görür public hedef veritabanı.
Bir hedef yapılandırmak için hizmet anonim iletişim güvenliği
Bir oturumu olmayan bir kullanıcı oluşturun.
Kullanıcı için bir sertifika oluşturun.
Not
Ana anahtar ile sertifika şifrelenmiş olmalıdır.Daha fazla bilgi için bkz: ANA anahtar (Transact-SQL) oluştur.
sertifika dosyaya yedekler.
Güvenlik NotuSadece yedeklemek bu kullanıcı için sertifika.Yedeklenmesi veya dağıtmak ile ilişkili özel anahtar sertifika.
Hedef hizmetin kullandığı sırasından iletileri almak hedef hizmet kullanıcı izni verin.
İzin vermek public için ileti göndermek içinhedef hizmet.
Sertifika ve adını sağlamak hedef uzak veritabanı için veritabanı yöneticisine hizmet.
Örnek
USE AdventureWorks2008R2 ;
GO
--------------------------------------------------------------------
-- This script configures security for a local user in the database.
-- The script creates a user in this database, creates a certificate
-- for the user, writes the certificate to the file system, and
-- grants permissions to the user. Since this service is a target
-- service, no remote service binding is necessary.
-- Create a user without a login. For convenience,
-- the name of the user is based on the name of the
-- the remote service.
CREATE USER [SupplierOrdersUser]
WITHOUT LOGIN;
GO
-- Create a certificate for the initiating service
-- to use to send messages to the target service.
CREATE CERTIFICATE [SupplierOrdersCertificate]
AUTHORIZATION [SupplierOrdersUser]
WITH SUBJECT = 'Certificate for the SupplierOrders service user.';
GO
-- Backup the certificate. Provide the certificate file
-- to the administrator for the database that hosts
-- the other service.
BACKUP CERTIFICATE [SupplierOrdersCertificate]
TO FILE = 'C:\Certificates\SupplierOrders.cer';
GO
-- Grant receive on the orders queue to the local user.
GRANT RECEIVE ON SupplierOrdersQueue
TO [SupplierOrdersUser];
GO
-- Grant send on the service to public.
GRANT SEND ON SERVICE::[SupplierOrders] TO public ;
Ayrıca bkz.