?
Solved

how to keep 2 vary large tables in sync

Posted on 2010-08-17
6
Medium Priority
?
785 Views
Last Modified: 2012-06-22
I am running SQL 2008 standard edition on Windows Server 2008 standard edition. I have a very large table that I need to keep in sync across data centers(ID and AZ). The table is using a column data type [TEXT] to store CLOB\BLOB data. In the past I have tried to use SQL server replication, but replication chokes on the [TEXT] column. I have been using the primary key value to insert into the stand by data center tables (ID). Basically taking the max value in the stand by server(ID) and then inserting everything greater than that value from AZ to ID. However now the customer is failing the application back and forth between data centers AZ and ID, and then reseeding the identity columns, so even though the data in the Idaho DC is newer than Arizona the PK value in Idaho is less than the last PK value written to Arizona. So the insert into where PK value > max(PKID) does not work. I tried using the date column, but then when they fail back, records end up missing data from the fail over. So in this case I will do a left join, to find the PKIDs missing, but I need to find a way to automate this……Any ideas experts?
0
Comment
Question by:sqlagent007
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 3

Expert Comment

by:mamalik00
ID: 33461784
Database mirroring is what you are looking for. Please have a look at the following URL and google SQL mirroring for more details.

http://technet.microsoft.com/en-us/library/ms189852.as

it will sync all the tables in a mirrored database.

Hope it helps.
0
 
LVL 3

Accepted Solution

by:
mamalik00 earned 2000 total points
ID: 33461802
0
 
LVL 3

Expert Comment

by:mnachu
ID: 33465368
Is the data updated on both servers? If then I guess mirroring may not work.

If u want 2 SQL server to send data back and forth with high reliability and transactional then u could use Service Broker search for it in google.

Regards,
Nachi
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 1

Author Comment

by:sqlagent007
ID: 33465397
There is only 1 primary at a time. If Arizona is the primary today, then Idaho will be the slave, however the customer will fail over to using Idaho as the primary without warning. Once this happens all the writes are done to the ID server and none to the AZ server. Mirroring may work, but I am looking for a way to keep a read only copy available at the standby site. I will look for service broker as well.
0
 
LVL 1

Author Comment

by:sqlagent007
ID: 33465546
Since the DB mirroring option relies on the transaction log, how hard is it to keep the logs to a reasonable size? Will I be able to truncate the log on the "mirrored" database?

We have tried log shipping in the past, but the issue was the the TLOG on the "stand by" copy would grow and grow and we had no way to shrink it. The other issue is that in order to update the DDL on the "stand by" database, we had to recovery the DB and then start the process all over again.
0
 
LVL 1

Author Closing Comment

by:sqlagent007
ID: 33872179
Thanks!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have written a PowerShell script to "walk" the security structure of each SQL instance to find:         Each Login (Windows or SQL)             * Its Server Roles             * Every database to which the login is mapped             * The associated "Database User" for this …
This is basically a blog post I wrote recently. I've found that SARGability is poorly understood, and since many people don't read blogs, I figured I'd post it here as an article. SARGable is an adjective in SQL that means that an item can be fou…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question