//Parker Street

select * from sys.endpoints

use Maintenance


--DROP CERTIFICATE ParkerStreetCertificate
use master
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'P@ssw0rd'


CREATE CERTIFICATE ParkerStreetCertificate 
WITH SUBJECT = 'Parker Street'
BACKUP CERTIFICATE ParkerStreetCertificate
TO FILE = 'C:\Maintenance\ParkerStreet.crt'
 

select * from sys.certificates


--DROP ENDPOINT [Parker Street Endpoint]

CREATE ENDPOINT [Parker Street Endpoint]
STATE = STARTED
AS TCP (LISTENER_PORT = 5700)
FOR SERVICE_BROKER
(AUTHENTICATION = CERTIFICATE ParkerStreetCertificate)


use master
CREATE LOGIN Inspector WITH PASSWORD = 'P@ssw0rd'
CREATE USER Inspector
CREATE CERTIFICATE Bld5Pub AUTHORIZATION Inspector
FROM FILE =  'c:\Maintenance\Bld5.crt'
GRANT CONNECT ON ENDPOINT::[Parker Street Endpoint]
to Inspector



select * from sys.endpoints
