Jak Konfigurowanie inicjowania usług dla Zabezpieczenia pełne okno dialogowe (Transact-SQL)
SQL Server okno dialogowe zabezpieczeń używa konwersacji do usługa, dla którego w bazie danych, obsługującym usługa inicjujący istnieje powiązanie usługa zdalnej.Jeśli użytkownik, który odpowiada użytkownika, który utworzył okno dialogowe zawiera obsługującego usługa miejsce docelowe bazy danych oraz powiązanie usługa zdalnej nie określa anonimowe zabezpieczeń, a następnie korzysta z okna dialogowego Zabezpieczenia pełne.
Aby usługa inicjujący korzysta z okna dialogowego zabezpieczeń, tworzenia powiązanie usługi zdalnej dla usługi.Dla SQL Server używać Zabezpieczenia pełne, powiązanie usługa zdalny nie może określać anonimowe zabezpieczeń oraz miejsce docelowe bazy danych musi być skonfigurowany do używania pełne zabezpieczenia dla usługa.
Aby skonfigurować inicjujący usługa dla pełnego okna dialogowego zabezpieczeń
Uzyskiwanie certyfikat dla właściciela usługa miejsce docelowe w zdalnej bazie danych z zaufanego źródło.Zazwyczaj wymaga to wysyłania certyfikat przy użyciu zaszyfrowanych wiadomości e-mail lub przenoszenia certyfikat na nośnikach fizycznych, takich jak dyskietki.
Uwaga dotycząca zabezpieczeńCertyfikaty należy instalować tylko z zaufanych źródeł.
Ostrzeżenie
certyfikat Musi być szyfrowane za pomocą klucz głównego dla bazy danych.Aby uzyskać więcej informacji, zobacz Tworzenie klucza głównego (Transact-SQL).
Utwórz użytkownika bez logowania dla usługa zdalny.
Zainstaluj certyfikat dla zdalnego usługa użytkownika.Utworzony w poprzednim kroku użytkownik jest właścicielem certyfikat.
Należy utworzyć powiązanie usługa zdalnej określająca użytkownik zdalny i usługa.
Utwórz użytkownika bez identyfikatora logowania do własnych Usługa lokalna.
Tworzenie certyfikat dla lokalnej usługa.Utworzony w poprzednim kroku użytkownik jest właścicielem certyfikat.
Ostrzeżenie
certyfikat Musi być szyfrowane za pomocą klucz głównego dla bazy danych.Aby uzyskać więcej informacji, zobacz Tworzenie klucza głównego (Transact-SQL).
Wykonaj kopię zapasową certyfikat.
Uwaga dotycząca zabezpieczeńTylko tworzyć kopię zapasową certyfikat dla tego użytkownika.Nie kopię zapasową lub dystrybucji klucz prywatnego skojarzonego z certyfikat.
Dostarcza certyfikat i nazwę usługa inicjujący administrator bazy danych dla zdalnej bazy danych.Na przykład mogą wymieniać certyfikatów na nośnikach fizycznych, takich jak dyskietka lub dysk CD-ROM, umieszczając certyfikat w udziale pliku lub za pośrednictwem bezpiecznej poczty e-mail.
Ostrzeżenie
Dla programu SQL Server do używania zabezpieczeń Pełne okno dialogowe certyfikat musi być zainstalowany w zdalnej bazie danych, a użytkownika utworzony w kroku 7 należy użytkownik, który rozpoczyna konwersację.
Przykład
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
Zobacz także