Solved

how to keep 2 vary large tables in sync

Posted on 2010-08-17
6
779 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 500 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Audit has been really one of the more interesting, most useful, yet difficult to maintain topics in the history of SQL Server. In earlier versions of SQL people had very few options for auditing in SQL Server. It typically meant using SQL Trace …
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
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…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

688 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