SQL Server 2008 数据库同步的两种方式 (发布、订阅)

WBOY
Release: 2016-06-07 17:17:40
Original
1182 people have browsed it

通过SQL JOB的方式对数据库的同步,这一节作为上一节的延续介绍通过发布订阅的方式实现数据库之间的同步操作。发布订阅份为两个步

上篇()中说了通过SQL JOB的方式对数据库的同步,这一节作为上一节的延续介绍通过发布订阅的方式实现数据库之间的同步操作。发布订阅份为两个步骤:1、发布。2订阅。首先在数据源数据库服务器上对需要同步的数据进行发布,然后在目标数据库服务器上对上述发布进行订阅。发布可以发布一张表的部分数据,也可以对整张表进行发布。下面分别介绍发布、订阅的过程。

  1、发布。发布需要用实际的服务器名称,不能使用服务器的IP地址进行。能发布的信息包括【表】、【存储过程】、【用户函数】如果使用IP会有错误,,如下图:

具体发布过程如下:

1、找到数据库服务器下的【复制】--【本地发布】,选择【新建发布】。如下图:

SQL Server 2008 数据库同步的两种方式 (发布、订阅)

2.选择待发布的数据库。如下图:

SQL Server 2008 数据库同步的两种方式 (发布、订阅)

3、选择发布类型。这里选择的默认类型【快照发布】。几种发布类型的区别,SQL SERVER都在下面给出了说明。如下图:

SQL Server 2008 数据库同步的两种方式 (发布、订阅)

4、选择待发布的类容。如下图:

SQL Server 2008 数据库同步的两种方式 (发布、订阅)

SQL Server 2008 数据库同步的两种方式 (发布、订阅)

上图中右侧就是筛选的SQL语句。

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!