SlideShare a Scribd company logo
1 of 7
OUTBOUND A
On the master database, create the database master key, if needed.
USE master;
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'Motorola1';
GO
Make a certificate for this server instance.
use master;
create certificate HOST_A_CERT with subject ='HOST_A Certificate'
GO
Create a mirroring endpoint for server instance using the certificate.
create ENDPOINT Endpoint_Mirroring STATE=STARTED AS TCP(LISTENER_PORT=7024,
LISTENER_IP=ALL)
FOR DATABASE_MIRRORING(AUTHENTICATION=CERTIFICATE
HOST_A_CERT,ENCRYPTION=REQUIRED
ALGORITHMAES,ROLE=ALL);
Backup the HOST_A certificate and copy it to other system HOST-B
BACKUP CERTIFICATE HOST_A_CERT TO FILE='C:backupHOST_A_CERT.cer'
OUTBOUND B
On the master database, create the database master key, if needed.
USE master;
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'Motorola1';
GO
Make a certificate for this server instance.
use master;
create certificate HOST_B_CERT with subject ='HOST_B Certificate'
GO
Create a mirroring endpoint for server instance using the certificate.
create ENDPOINT Endpoint_Mirroring STATE=STARTED AS TCP(LISTENER_PORT=7024,
LISTENER_IP=ALL)
FOR DATABASE_MIRRORING(AUTHENTICATION=CERTIFICATE
HOST_B_CERT,ENCRYPTION=REQUIRED
ALGORITHMAES,ROLE=ALL);
Backup the HOST_B certificate and copy it to other systemHOST-B
BACKUP CERTIFICATE HOST_B_CERT TO FILE='C:backupHOST_B_CERT.cer'
OUTBOUND C
On the master database, create the database master key, if needed.
USE master;
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'Motorola1';
GO
Make a certificate for this server instance.
use master;
create certificate HOST_C_CERT with subject ='HOST_C Certificate'
GO
Create a mirroring endpoint for server instance using the certificate.
create ENDPOINT Endpoint_Mirroring STATE=STARTED AS TCP(LISTENER_PORT=7024,
LISTENER_IP=ALL)
FOR DATABASE_MIRRORING(AUTHENTICATION=CERTIFICATE
HOST_C_CERT,ENCRYPTION=REQUIRED
ALGORITHMAES,ROLE=ALL);
Backup the HOST_C certificate and copy it to other system HOST-B
BACKUP CERTIFICATE HOST_C_CERT TO FILE='C:backupHOST_C_CERT.cer'
INBOUND A FOR B
To configure HOST_A for inbond connections:
1. create login on HOST-A for HOST-B
use master;
create login HOST_B_LOGIN with PASSWORD = 'Motorola1'
2. Create a user for that login
create user HOST_B_USER FOR LOGIN HOST_B_LOGIN;
GO
3. Associate the certificate with the user:
create CERTIFICATE HOST_B_CERT AUTHORIZATION HOST_B_USER FROMFILE =
'C:backupHOST_B_CERT.cer'
4. Grant connect permissions on the login for the remote mirroring end point
Grant CONNECT on ENDPOINT::Endpoint_Mirroring TO [HOST_B_LOGIN];
GO
INBOUND A FOR C
To configure HOST_A for inbond connections:
1. create login on HOST-A for HOST-C
use master;
create login HOST_C_LOGIN with PASSWORD = 'Motorola1'
2. Create a user for that login
create user HOST_C_USER FOR LOGIN HOST_C_LOGIN;
GO
3. Associate the certificate with the user:
create CERTIFICATE HOST_C_CERT AUTHORIZATION HOST_C_USER FROMFILE =
'C:backupHOST_C_CERT.cer'
4. Grant connect permissions on the login for the remote mirroring end point
Grant CONNECT on ENDPOINT::Endpoint_Mirroring TO [HOST_C_LOGIN];
GO
INBOUND B FOR A
To configure HOST_B for inbond connections:
1. create login on HOST-B for HOST-A
use master;
create login HOST_A_LOGIN with PASSWORD = 'Motorola1'
2. Create a user for that login
create user HOST_A_USER FOR LOGIN HOST_A_LOGIN;
GO
3. Associate the certificate with the user:
create CERTIFICATE HOST_A_CERT AUTHORIZATION HOST_A_USER FROMFILE =
'C:backupHOST_A_CERT.cer'
4. Grant connect permissions on the login for the remote mirroring end point
Grant CONNECT on ENDPOINT::Endpoint_Mirroring TO [HOST_A_LOGIN];
GO
INBOUND B FOR C
To configure HOST_B for inbond connections:
1. create login on HOST-B for HOST-C
use master;
create login HOST_C_LOGIN with PASSWORD = 'Motorola1'
2. Create a user for that login
create user HOST_C_USER FOR LOGIN HOST_C_LOGIN;
GO
3. Associate the certificate with the user:
create CERTIFICATE HOST_C_CERT AUTHORIZATION HOST_C_USER FROMFILE =
'C:backupHOST_C_CERT.cer'
4. Grant connect permissions on the login for the remote mirroring end point
Grant CONNECT on ENDPOINT::Endpoint_Mirroring TO [HOST_C_LOGIN];
GO
INBOUND C FOR A
To configure HOST_C for inbond connections:
1. create login on HOST-C for HOST-A
use master;
create login HOST_A_LOGIN with PASSWORD = 'Motorola1'
2. Create a user for that login
create user HOST_A_USER FOR LOGIN HOST_A_LOGIN;
GO
3. Associate the certificate with the user:
create CERTIFICATE HOST_A_CERT AUTHORIZATION HOST_A_USER FROMFILE =
'C:backupHOST_A_CERT.cer'
4. Grant connect permissions on the login for the remote mirroring end point
Grant CONNECT on ENDPOINT::Endpoint_Mirroring TO [HOST_A_LOGIN];
GO
INBOUND C FOR B
To configure HOST_C for inbond connections:
1. create login on HOST-C for HOST-B
use master;
create login HOST_B_LOGIN with PASSWORD = 'Motorola1'
2. Create a user for that login
create user HOST_B_USER FOR LOGIN HOST_B_LOGIN;
GO
3. Associate the certificate with the user:
create CERTIFICATE HOST_B_CERT AUTHORIZATION HOST_B_USER FROMFILE =
'C:backupHOST_B_CERT.cer'
4. Grant connect permissions on the login for the remote mirroring end point
Grant CONNECT on ENDPOINT::Endpoint_Mirroring TO [HOST_B_LOGIN];
GO

More Related Content

Similar to Cert gen-sql-mirroring

Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL CertificatesHashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
Nick Maludy
 
Chapter 3 overview
Chapter 3 overviewChapter 3 overview
Chapter 3 overview
ali raza
 
( 16 ) Office 2007 Create An Extranet Site With Forms Authentication
( 16 ) Office 2007   Create An Extranet Site With Forms Authentication( 16 ) Office 2007   Create An Extranet Site With Forms Authentication
( 16 ) Office 2007 Create An Extranet Site With Forms Authentication
LiquidHub
 
BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...
BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...
BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...
BlueHat Security Conference
 
Nko workshop - node js crud & deploy
Nko workshop - node js crud & deployNko workshop - node js crud & deploy
Nko workshop - node js crud & deploy
Simon Su
 
Sp 29 two_factor_auth_guide
Sp 29 two_factor_auth_guideSp 29 two_factor_auth_guide
Sp 29 two_factor_auth_guide
Hai Nguyen
 

Similar to Cert gen-sql-mirroring (20)

Build resource server & client for OCF Cloud (2018.8.30)
Build resource server & client for OCF Cloud (2018.8.30)Build resource server & client for OCF Cloud (2018.8.30)
Build resource server & client for OCF Cloud (2018.8.30)
 
Securing a Web App with Passwordless Web Authentication
Securing a Web App with Passwordless Web AuthenticationSecuring a Web App with Passwordless Web Authentication
Securing a Web App with Passwordless Web Authentication
 
MongoDB World 2018: Low Hanging Fruit: Making Your Basic MongoDB Installation...
MongoDB World 2018: Low Hanging Fruit: Making Your Basic MongoDB Installation...MongoDB World 2018: Low Hanging Fruit: Making Your Basic MongoDB Installation...
MongoDB World 2018: Low Hanging Fruit: Making Your Basic MongoDB Installation...
 
1. device onboarding
1. device onboarding1. device onboarding
1. device onboarding
 
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL CertificatesHashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
 
Indianapolis mule soft_meetup_30_jan_2021 (1)
Indianapolis mule soft_meetup_30_jan_2021 (1)Indianapolis mule soft_meetup_30_jan_2021 (1)
Indianapolis mule soft_meetup_30_jan_2021 (1)
 
Node.js API 서버 성능 개선기
Node.js API 서버 성능 개선기Node.js API 서버 성능 개선기
Node.js API 서버 성능 개선기
 
Install offline Root CA Server 2003
Install offline Root CA Server 2003Install offline Root CA Server 2003
Install offline Root CA Server 2003
 
Chapter 3 overview
Chapter 3 overviewChapter 3 overview
Chapter 3 overview
 
How to create a multi tenancy for an interactive data analysis with jupyter h...
How to create a multi tenancy for an interactive data analysis with jupyter h...How to create a multi tenancy for an interactive data analysis with jupyter h...
How to create a multi tenancy for an interactive data analysis with jupyter h...
 
( 16 ) Office 2007 Create An Extranet Site With Forms Authentication
( 16 ) Office 2007   Create An Extranet Site With Forms Authentication( 16 ) Office 2007   Create An Extranet Site With Forms Authentication
( 16 ) Office 2007 Create An Extranet Site With Forms Authentication
 
Security in laravel
Security in laravelSecurity in laravel
Security in laravel
 
When Securing Access to Data is About Life and Death
When Securing Access to Data is About Life and DeathWhen Securing Access to Data is About Life and Death
When Securing Access to Data is About Life and Death
 
How to implement multiple authentication guards in laravel 8
How to implement multiple authentication guards in laravel 8How to implement multiple authentication guards in laravel 8
How to implement multiple authentication guards in laravel 8
 
Sécurisation de vos applications web à l’aide du composant Security de Symfony
Sécurisation de vos applications web  à l’aide du composant Security de SymfonySécurisation de vos applications web  à l’aide du composant Security de Symfony
Sécurisation de vos applications web à l’aide du composant Security de Symfony
 
BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...
BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...
BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...
 
Azure hands on lab
Azure hands on labAzure hands on lab
Azure hands on lab
 
Nko workshop - node js crud & deploy
Nko workshop - node js crud & deployNko workshop - node js crud & deploy
Nko workshop - node js crud & deploy
 
PhpBB meets Symfony2
PhpBB meets Symfony2PhpBB meets Symfony2
PhpBB meets Symfony2
 
Sp 29 two_factor_auth_guide
Sp 29 two_factor_auth_guideSp 29 two_factor_auth_guide
Sp 29 two_factor_auth_guide
 

Recently uploaded

Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 

Recently uploaded (20)

UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfFrisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 

Cert gen-sql-mirroring

  • 1. OUTBOUND A On the master database, create the database master key, if needed. USE master; CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'Motorola1'; GO Make a certificate for this server instance. use master; create certificate HOST_A_CERT with subject ='HOST_A Certificate' GO Create a mirroring endpoint for server instance using the certificate. create ENDPOINT Endpoint_Mirroring STATE=STARTED AS TCP(LISTENER_PORT=7024, LISTENER_IP=ALL) FOR DATABASE_MIRRORING(AUTHENTICATION=CERTIFICATE HOST_A_CERT,ENCRYPTION=REQUIRED ALGORITHMAES,ROLE=ALL); Backup the HOST_A certificate and copy it to other system HOST-B BACKUP CERTIFICATE HOST_A_CERT TO FILE='C:backupHOST_A_CERT.cer' OUTBOUND B On the master database, create the database master key, if needed. USE master; CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'Motorola1'; GO
  • 2. Make a certificate for this server instance. use master; create certificate HOST_B_CERT with subject ='HOST_B Certificate' GO Create a mirroring endpoint for server instance using the certificate. create ENDPOINT Endpoint_Mirroring STATE=STARTED AS TCP(LISTENER_PORT=7024, LISTENER_IP=ALL) FOR DATABASE_MIRRORING(AUTHENTICATION=CERTIFICATE HOST_B_CERT,ENCRYPTION=REQUIRED ALGORITHMAES,ROLE=ALL); Backup the HOST_B certificate and copy it to other systemHOST-B BACKUP CERTIFICATE HOST_B_CERT TO FILE='C:backupHOST_B_CERT.cer' OUTBOUND C On the master database, create the database master key, if needed. USE master; CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'Motorola1'; GO Make a certificate for this server instance. use master; create certificate HOST_C_CERT with subject ='HOST_C Certificate' GO
  • 3. Create a mirroring endpoint for server instance using the certificate. create ENDPOINT Endpoint_Mirroring STATE=STARTED AS TCP(LISTENER_PORT=7024, LISTENER_IP=ALL) FOR DATABASE_MIRRORING(AUTHENTICATION=CERTIFICATE HOST_C_CERT,ENCRYPTION=REQUIRED ALGORITHMAES,ROLE=ALL); Backup the HOST_C certificate and copy it to other system HOST-B BACKUP CERTIFICATE HOST_C_CERT TO FILE='C:backupHOST_C_CERT.cer' INBOUND A FOR B To configure HOST_A for inbond connections: 1. create login on HOST-A for HOST-B use master; create login HOST_B_LOGIN with PASSWORD = 'Motorola1' 2. Create a user for that login create user HOST_B_USER FOR LOGIN HOST_B_LOGIN; GO 3. Associate the certificate with the user: create CERTIFICATE HOST_B_CERT AUTHORIZATION HOST_B_USER FROMFILE = 'C:backupHOST_B_CERT.cer'
  • 4. 4. Grant connect permissions on the login for the remote mirroring end point Grant CONNECT on ENDPOINT::Endpoint_Mirroring TO [HOST_B_LOGIN]; GO INBOUND A FOR C To configure HOST_A for inbond connections: 1. create login on HOST-A for HOST-C use master; create login HOST_C_LOGIN with PASSWORD = 'Motorola1' 2. Create a user for that login create user HOST_C_USER FOR LOGIN HOST_C_LOGIN; GO 3. Associate the certificate with the user: create CERTIFICATE HOST_C_CERT AUTHORIZATION HOST_C_USER FROMFILE = 'C:backupHOST_C_CERT.cer' 4. Grant connect permissions on the login for the remote mirroring end point Grant CONNECT on ENDPOINT::Endpoint_Mirroring TO [HOST_C_LOGIN]; GO
  • 5. INBOUND B FOR A To configure HOST_B for inbond connections: 1. create login on HOST-B for HOST-A use master; create login HOST_A_LOGIN with PASSWORD = 'Motorola1' 2. Create a user for that login create user HOST_A_USER FOR LOGIN HOST_A_LOGIN; GO 3. Associate the certificate with the user: create CERTIFICATE HOST_A_CERT AUTHORIZATION HOST_A_USER FROMFILE = 'C:backupHOST_A_CERT.cer' 4. Grant connect permissions on the login for the remote mirroring end point Grant CONNECT on ENDPOINT::Endpoint_Mirroring TO [HOST_A_LOGIN]; GO INBOUND B FOR C To configure HOST_B for inbond connections: 1. create login on HOST-B for HOST-C use master; create login HOST_C_LOGIN with PASSWORD = 'Motorola1'
  • 6. 2. Create a user for that login create user HOST_C_USER FOR LOGIN HOST_C_LOGIN; GO 3. Associate the certificate with the user: create CERTIFICATE HOST_C_CERT AUTHORIZATION HOST_C_USER FROMFILE = 'C:backupHOST_C_CERT.cer' 4. Grant connect permissions on the login for the remote mirroring end point Grant CONNECT on ENDPOINT::Endpoint_Mirroring TO [HOST_C_LOGIN]; GO INBOUND C FOR A To configure HOST_C for inbond connections: 1. create login on HOST-C for HOST-A use master; create login HOST_A_LOGIN with PASSWORD = 'Motorola1' 2. Create a user for that login create user HOST_A_USER FOR LOGIN HOST_A_LOGIN; GO 3. Associate the certificate with the user: create CERTIFICATE HOST_A_CERT AUTHORIZATION HOST_A_USER FROMFILE = 'C:backupHOST_A_CERT.cer'
  • 7. 4. Grant connect permissions on the login for the remote mirroring end point Grant CONNECT on ENDPOINT::Endpoint_Mirroring TO [HOST_A_LOGIN]; GO INBOUND C FOR B To configure HOST_C for inbond connections: 1. create login on HOST-C for HOST-B use master; create login HOST_B_LOGIN with PASSWORD = 'Motorola1' 2. Create a user for that login create user HOST_B_USER FOR LOGIN HOST_B_LOGIN; GO 3. Associate the certificate with the user: create CERTIFICATE HOST_B_CERT AUTHORIZATION HOST_B_USER FROMFILE = 'C:backupHOST_B_CERT.cer' 4. Grant connect permissions on the login for the remote mirroring end point Grant CONNECT on ENDPOINT::Endpoint_Mirroring TO [HOST_B_LOGIN]; GO