SQL2005 数据库数据同步
由于公司业务原因,一台服务器放置于网通机房,一台服务器放置于电信机房,不同业务需要共享一台数据库,原先的做法是把数据库放置于网通机房服务器上,电信服务器远程连接网通机房服务器上数据库,由于网通机房带宽以及网通电信互连互通的一些原因,导致电
由于公司业务原因,一台服务器放置于网通机房,一台服务器放置于电信机房,不同业务需要共享一台数据库,原先的做法是把数据库放置于网通机房服务器上,电信服务器远程连接网通机房服务器上数据库,由于网通机房带宽以及网通电信互连互通的一些原因,导致电信服务器经常无法连接上网通服务器上的数据库。经过商量后,决定分离数据库,在网通和电信服务器上都放置数据库但必须实现数据库的同步更新。
开始想到的方法是采用数据库的复制订阅功能:从网上搜索了相关文档,也实现了本机2个数据库的复制订阅测试,但要实现公网上的二台服务器上数据库的复制订阅必须要有服务器的远程操作权限,电信服务器是租用的空间,所以这种方法只好放弃。相关文档可以查阅:http://blog.csdn.net/wwwdbs/archive/2008/11/06/3237102.aspx
考虑的方法2,在程序操作时同时更新2个数据库的数据,这个方法的弊端是同时要连接2个数据库,且是不稳定的二个连接,很容易出现连接错误,影响效率。
看来要实现完全的实时同步是有点难度了,再来说一下我们公司的这个业务,公司运营三网融合电视增值服务电视黄页项目,电视黄页业务使用有线集团网通服务器数据库,大部分数据更新都是在网通服务器上进行,网通服务器上数据库的数据必须是最新的数据,不能因为连接电信服务器数据库而影响网通服务器上应用的速率和效率;电信服务器上数据库提供电视黄页网数据服务,由于电视黄页网只是公司主营业务电视黄页项目的附属产品,提供的只是电视黄页信息在互联网上的展示,所以只需要同步最基本的黄页信息就可以了,同时对实时性的要求也不是很高,考虑到这些情况,仿照数据跟踪的方法来实现数据库数据的同步,同时提供手动和自动二种方法来具体的实现。
手动:在更新完数据后,工作人员可以手动点击同步按钮,将网通服务器数据同步到电信服务器。
自动:在空闲时间,比如晚上3点,自动执行同步程序,将网通服务器数据同步到电信服务器。
操作的步骤:
需要记录的信息:数据对象数据表名、数据ID、操作类型(insert\update\delete)

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Facing lag, slow mobile data connection on iPhone? Typically, the strength of cellular internet on your phone depends on several factors such as region, cellular network type, roaming type, etc. There are some things you can do to get a faster, more reliable cellular Internet connection. Fix 1 – Force Restart iPhone Sometimes, force restarting your device just resets a lot of things, including the cellular connection. Step 1 – Just press the volume up key once and release. Next, press the Volume Down key and release it again. Step 2 – The next part of the process is to hold the button on the right side. Let the iPhone finish restarting. Enable cellular data and check network speed. Check again Fix 2 – Change data mode While 5G offers better network speeds, it works better when the signal is weaker

I cry to death. The world is madly building big models. The data on the Internet is not enough. It is not enough at all. The training model looks like "The Hunger Games", and AI researchers around the world are worrying about how to feed these data voracious eaters. This problem is particularly prominent in multi-modal tasks. At a time when nothing could be done, a start-up team from the Department of Renmin University of China used its own new model to become the first in China to make "model-generated data feed itself" a reality. Moreover, it is a two-pronged approach on the understanding side and the generation side. Both sides can generate high-quality, multi-modal new data and provide data feedback to the model itself. What is a model? Awaker 1.0, a large multi-modal model that just appeared on the Zhongguancun Forum. Who is the team? Sophon engine. Founded by Gao Yizhao, a doctoral student at Renmin University’s Hillhouse School of Artificial Intelligence.

Recently, the military circle has been overwhelmed by the news: US military fighter jets can now complete fully automatic air combat using AI. Yes, just recently, the US military’s AI fighter jet was made public for the first time and the mystery was unveiled. The full name of this fighter is the Variable Stability Simulator Test Aircraft (VISTA). It was personally flown by the Secretary of the US Air Force to simulate a one-on-one air battle. On May 2, U.S. Air Force Secretary Frank Kendall took off in an X-62AVISTA at Edwards Air Force Base. Note that during the one-hour flight, all flight actions were completed autonomously by AI! Kendall said - "For the past few decades, we have been thinking about the unlimited potential of autonomous air-to-air combat, but it has always seemed out of reach." However now,

The latest video of Tesla's robot Optimus is released, and it can already work in the factory. At normal speed, it sorts batteries (Tesla's 4680 batteries) like this: The official also released what it looks like at 20x speed - on a small "workstation", picking and picking and picking: This time it is released One of the highlights of the video is that Optimus completes this work in the factory, completely autonomously, without human intervention throughout the process. And from the perspective of Optimus, it can also pick up and place the crooked battery, focusing on automatic error correction: Regarding Optimus's hand, NVIDIA scientist Jim Fan gave a high evaluation: Optimus's hand is the world's five-fingered robot. One of the most dexterous. Its hands are not only tactile

FP8 and lower floating point quantification precision are no longer the "patent" of H100! Lao Huang wanted everyone to use INT8/INT4, and the Microsoft DeepSpeed team started running FP6 on A100 without official support from NVIDIA. Test results show that the new method TC-FPx's FP6 quantization on A100 is close to or occasionally faster than INT4, and has higher accuracy than the latter. On top of this, there is also end-to-end large model support, which has been open sourced and integrated into deep learning inference frameworks such as DeepSpeed. This result also has an immediate effect on accelerating large models - under this framework, using a single card to run Llama, the throughput is 2.65 times higher than that of dual cards. one

Last week, amid the internal wave of resignations and external criticism, OpenAI was plagued by internal and external troubles: - The infringement of the widow sister sparked global heated discussions - Employees signing "overlord clauses" were exposed one after another - Netizens listed Ultraman's "seven deadly sins" Rumors refuting: According to leaked information and documents obtained by Vox, OpenAI’s senior leadership, including Altman, was well aware of these equity recovery provisions and signed off on them. In addition, there is a serious and urgent issue facing OpenAI - AI safety. The recent departures of five security-related employees, including two of its most prominent employees, and the dissolution of the "Super Alignment" team have once again put OpenAI's security issues in the spotlight. Fortune magazine reported that OpenA

Apple's latest releases of iOS18, iPadOS18 and macOS Sequoia systems have added an important feature to the Photos application, designed to help users easily recover photos and videos lost or damaged due to various reasons. The new feature introduces an album called "Recovered" in the Tools section of the Photos app that will automatically appear when a user has pictures or videos on their device that are not part of their photo library. The emergence of the "Recovered" album provides a solution for photos and videos lost due to database corruption, the camera application not saving to the photo library correctly, or a third-party application managing the photo library. Users only need a few simple steps

How to use MySQLi to establish a database connection in PHP: Include MySQLi extension (require_once) Create connection function (functionconnect_to_db) Call connection function ($conn=connect_to_db()) Execute query ($result=$conn->query()) Close connection ( $conn->close())
