Nasıl yapılır: Yapılandırmak için tam iletişim güvenlik (Transact-SQL) hizmetleri başlatılıyor
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.Daha sonra hedef hizmeti barındıran veritabanı iletişim kutusunda oluşturduğunuz kullanıcı için karşılık gelen bir kullanıcı içerir ve uzak hizmet bağlaması anonim güvenlik belirtirseniz, tam güvenlik iletişim kutusunu kullanır.
Bir başlatma hizmeti iletişim güvenliği kullanan emin olmak için hizmet için uzak hizmet bağlaması oluşturun.İçin SQL Server tam güvenliği kullanmak için uzak hizmet bağlaması değil belirtmeniz gerekir anonim güvenlik ve hedef veritabanı yapılandırılmış, tam güvenlik için bu hizmeti kullanmak için
Bir başlatma yapılandırmak için hizmet tam iletişim güvenliği için
Sahibinin hedef hizmetinin uzak veritabanından bir güvenilen sertifika edinmek kaynak.Genellikle, bu sertifikayı şifrelenmiş e-posta yoluyla veya disket gibi fiziksel ortam üzerinde sertifika aktarma gönderme içerir.
Güvenlik NotuYalnızca güvenilir kaynaklardan gelen sertifikaları yükleyin.
Not
Sertifika veritabanı ana anahtar ile şifrelenmiş olmalıdır.Daha fazla bilgi için bkz: ANA anahtar (Transact-SQL) oluştur.
Bir oturumu uzaktan hizmet olmayan bir kullanıcı oluşturun.
Yüklemek sertifika uzak hizmet kullanıcı için.Önceki adımda oluşturduğunuz kullanıcının sahibi olduğu sertifika.
Kullanıcı uzak hizmet ve hizmet belirtir bir uzak hizmet bağlaması oluşturun.
Yerel hizmet sahibi bir oturumu olmayan bir kullanıcı oluşturun.
Yerel hizmet için bir sertifika oluşturun.Önceki adımda oluşturduğunuz kullanıcının sahibi olduğu sertifika.
Not
Sertifika veritabanı ana anahtar ile şifrelenmiş olmalıdır.Daha fazla bilgi için bkz: ANA anahtar (Transact-SQL) oluştur.
sertifika yedekleme.
Güvenlik NotuSadece yedeklemek bu kullanıcı için sertifika.Yedeklenmesi veya dağıtmak ile ilişkili özel anahtar sertifika.
Sertifika ve başlatma adı hizmet uzak veritabanı için veritabanı yöneticisine.Örneğin, dosya paylaşımında veya güvenli e-posta yoluyla sertifika koyarak bir disket veya bir cd-rom gibi fiziksel ortam üzerinde sertifika değişimi.
Not
Tam iletişim güvenliği kullanmak sql Server için sertifika uzak veritabanında yüklü olmalıdır ve 7. adımda oluşturduğunuz kullanıcı kimin konuşmaya başlayan kullanıcı olması gerekir.
Örnek
USE AdventureWorks2008R2 ;
GO
--------------------------------------------------------------------
-- The first part of the script configures security to allow the
-- remote service to send messages in this database. The script creates
-- a user in this database, loads the certificate for the remote service,
-- grants permission to the user, and creates a remote service binding.
-- Given a certificate for the owner of the remote target service
-- SupplierOrders, create a remote service binding for
-- the service. The remote user will be granted permission
-- to send messages to the local service OrderParts.
-- This example assumes that the certificate for the service
-- is saved in the file'C:\Certificates\SupplierOrders.cer' and that
-- the initiating service already exists.
-- 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
-- Install a certificate for a user
-- in the remote database. The certificate is
-- provided by the owner of the remote service. The
-- user for the remote service owns the certificate.
CREATE CERTIFICATE [SupplierOrdersCertificate]
AUTHORIZATION [SupplierOrdersUser]
FROM FILE='C:\Certificates\SupplierOrders.cer' ;
GO
-- Create the remote service binding. Notice
-- that the user specified in the binding
-- does not own the binding itself.
-- Creating this binding specifies that messages from
-- this database are secured using the certificate for
-- the [SupplierOrdersUser] user.
-- When the anonymous option is omitted, anonymous is OFF.
-- Therefore, the credentials for the user that begins
-- are used in the remote database.
CREATE REMOTE SERVICE BINDING [SupplierOrdersBinding]
TO SERVICE 'SupplierOrders'
WITH USER = [SupplierOrdersUser] ;
GO
--------------------------------------------------------------------
-- The second part of the script creates a local user that will begin
-- conversations to the remote service. The certificate for this
-- user must be provided to the owner of the remote service.
-- Create a user without a login for the local service.
CREATE USER [OrderPartsUser]
WITHOUT LOGIN ;
GO
-- Create a certificate for the local service.
CREATE CERTIFICATE [OrderPartsCertificate]
AUTHORIZATION [OrderPartsUser]
WITH SUBJECT = 'Certificate for the order service user.';
GO
-- Make this user the owner of the initiator service.
ALTER AUTHORIZATION ON SERVICE::OrderParts TO OrderPartsUser
-- Backup the certificate for the user that initiates the
-- conversation. This example assumes that the certificate
-- is named OrderServiceCertificate.
BACKUP CERTIFICATE [OrderPartsCertificate]
TO FILE = 'C:\Certificates\OrderParts.cer' ;
GO
-- Grant RECEIVE permissions on the queue for the service.
-- This allows the local user to begin conversations from
-- services that use the queue.
GRANT RECEIVE ON [OrderPartsQueue] TO [OrderPartsUser] ;
GO
Ayrıca bkz.