search
HomeDatabaseMysql TutorialSQLServer2005与SQLServer2008数据库同步图文教程

要实现SQLServer2005与2005的数据库同步的话,直接用镜像就可以实现。但是如果同步 SQLServer2008的话,2005的实例是连接不上08的。低版本的无法连接高版本的。所以我们可以通过复制的方式,也就是所谓的订阅发布的方法来实现两个不同版本数据库的数据同步。

1,复制简介
简单的说,复制是获取一个或多个数据库的过程,它系统的针对出入不同数据库的数据,提供基于规则的拷贝机制。
复制分为三种角色,
1,发布服务器
发布服务器可以被看成是源数据库。
2 ,分发服务器
分发数据库针对更改而承担类似某些票据交换所的工作,他是一个特殊的分发数据库,用于对更改进行跟踪,同时也跟踪哪些订阅服务器已经收到了这些更改。除此之外,它还跟踪任何同步过程的结果,并知道发生了哪些必须解决的冲突。
3,订阅服务器
任何参与到于复制发布过程的数据库,订阅服务器并不只能接受数据,它还可以传播数据。订阅服务器可以请求订阅,也可以推送订阅。
请求订阅:由订阅服务器来决定什么时候去更新数据。
推送订阅:由发布数据库决定什么时候向订阅服务发生更新数据。

2,SQLServer2005与SQLServer2008数据库同步
操作步骤大致如下:
配置 SQLServer2005 发布数据库
1,以windows账户登录,确保SQLServer代理已经打开,新建数据库[TestFabu]
2,在[复制]节点下,新建发布.下一步 选择数据库[TestFabu]
3,这里选择快照发布,下一步,选择需要同步的表结构以及存储过程等等。

这里设置sa账户,只要有权限操作数据库的账户就可以。

完成之后,在这个发布上右键属性

我们选择FTP,应为我这两个数据库没有在同一台电脑上。

设置默认位置

保证该默认位置ftp可访问,并且有读取的权限,将ftp定位到根目录。

发布服务器配置完成

配置订阅服务器

同样以windows账户登录.

这里是不允许通过IP访问的,在host文件里面做一个映射,然后通过名称访问.

这里我们用上文提到的请求订阅。

链接发布服务器的sa数据库。

这里可以按计划来请求订阅。

订阅成功。


同事查看属性里要以FTP访问。
3.总结
这样我们就实现了SQLServer2005与SQLServer2008的数据库同步,这里如果要实时同步数据的话最好用事务复制,快照复制适合间隔性的同步。

Statement
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
How do you alter a table in MySQL using the ALTER TABLE statement?How do you alter a table in MySQL using the ALTER TABLE statement?Mar 19, 2025 pm 03:51 PM

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

How do I configure SSL/TLS encryption for MySQL connections?How do I configure SSL/TLS encryption for MySQL connections?Mar 18, 2025 pm 12:01 PM

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

How do you handle large datasets in MySQL?How do you handle large datasets in MySQL?Mar 21, 2025 pm 12:15 PM

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?Mar 21, 2025 pm 06:28 PM

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

How do you drop a table in MySQL using the DROP TABLE statement?How do you drop a table in MySQL using the DROP TABLE statement?Mar 19, 2025 pm 03:52 PM

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

How do you represent relationships using foreign keys?How do you represent relationships using foreign keys?Mar 19, 2025 pm 03:48 PM

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

How do you create indexes on JSON columns?How do you create indexes on JSON columns?Mar 21, 2025 pm 12:13 PM

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)?How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)?Mar 18, 2025 pm 12:00 PM

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)