transactional replication in sql server 2008 r2 – with three server

38
Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa Nguyễn Thành Được- [email protected] 0903548364 MÔ HÌNH HỆ THỐNG PUBLISHER SERVER NAME: SERVER08 IP: 10.220.0.116 DISTRIBUTOR SERVER NAME:BACKUPSRV IP: 10.220.0.3 SUBCRIPTION SERVER NAME: SERVER09 IP: 10.220.0.94 MASTER DATABASES SLAVEDATABASES DISTRIBUTOR DATABASES PUBLICATION SNAPSHOT AGENT SNAPSHOT FOLDER SNAPSHOT FILES DISTRIBUTOR AGENT SUBCRIPTION YÊU CẦU: 1. SQL Agent trên mỗi Server được enable 2. Windown firewall Allow Sql Agent( Dot not Turn Off Windown Firewall). Disable các rule không sử dụng, mặc định khi cài đặt Windown 3. Databases lưu trữ dữ liệu không để đường dẫn mặt định 4. Tốt nhất tạo rule Allow All Services and App giữa các Server cần đồng bộ

Upload: laonap166

Post on 08-Apr-2017

64 views

Category:

Technology


4 download

TRANSCRIPT

Page 1: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

MÔ HÌNH HỆ THỐNG

PUBLISHERSERVER NAME: SERVER08

IP: 10.220.0.116

DISTRIBUTORSERVER NAME:BACKUPSRV

IP: 10.220.0.3

SUBCRIPTIONSERVER NAME: SERVER09

IP: 10.220.0.94

MASTER DATABASES SLAVEDATABASESDISTRIBUTOR

DATABASES

PUBLICATION

SNAPSHOT AGENT

SNAPSHOT FOLDER

SNAPSHOT FILES DISTRIBUTOR AGENT

SUBCRIPTION

YÊU CẦU:

1. SQL Agent trên mỗi Server được enable

2. Windown firewall Allow Sql Agent( Dot not Turn Off Windown Firewall). Disable các rule không sử

dụng, mặc định khi cài đặt Windown

3. Databases lưu trữ dữ liệu không để đường dẫn mặt định

4. Tốt nhất tạo rule Allow All Services and App giữa các Server cần đồng bộ

Page 2: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

I. Máy BackupSRV.

Tạo Distributor DB

Page 3: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Tại cửa sổ Wizard chọn Next

Page 4: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Chọn BackupSRV là Distributor chọn Next

Start SQL Agent chọn Next

Page 5: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Chọn nơi lưu trữ Snapshot Folder nhấn Next

Page 6: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Page 7: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Chọn nơi lưu DB Distributor chọn Next

Tại hộp thoại Configure Distributor chọn Add Pulisher. Kết nối đến SQL Publisher Server08

Chọn Next

Page 8: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Nhập Pass chứng thực Publisher với Distributor

Page 9: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Chọn Next, Finish

Page 10: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Page 11: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

II.Tại SERVER08 Làm Publisher với MasterDB IvivuV2

Chọn New Pulication chọn Next

Chọn Next

Kết nối Đến Disributor BackupSRV

Page 12: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Chọn Next

Page 13: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Nhập Pass chứng thực giữa Distributor và Pulisher

Page 14: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Chọn Next, Chọn DB cần đồng bộ

Page 15: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Chọn Kiểu đồng bộ, chọn Next

Page 16: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Chọn Table và Store cần đồng bộ

Page 17: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

ChỌN Next

Page 18: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Chọn Next

Page 19: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Sao lưu ngay bây giờ chọn Next

Page 20: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Nhập security của Agent Publisher

Page 21: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Page 22: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Chọn Next

Page 23: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Chọn Next, đặt tên Publisher

Page 24: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Finish

Page 25: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

III. Tại Server09 Sublisher Slave DB

Tạo new local Subcription

Page 26: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Tại của sổ Wizad Subcription chọn Next

Kết nối đến Publisher

Page 27: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Chọn Next

Page 28: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Chọn Next

Page 29: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

chọn DB cần đồng bộ, ở đây chưa có nên tạo mới

Page 30: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Chọn Next

Nhập Agent Security cho Subcriber

Page 31: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Page 32: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Chọn Next

Page 33: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Chọn Next

Page 34: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Chọn Next

Page 35: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Chọn Next

Page 36: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Page 37: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Finish

Kiểm tra đồng bộ, click chuột phải vào local Subcription chọn IvivuV2_Rep

Quan Sát

Page 38: Transactional replication in sql server 2008 r2 – with three server

Master Slave MSSQL 2008 – Distributor- Pulisher- Subcription- WorkGroup Network- Authencation User MSSQL sa

Nguyễn Thành Được- [email protected] 0903548364

Kiểm tra dữ liệu