Solved

how to keep 2 vary large tables in sync

Posted on 2010-08-17
6
777 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

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 …
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 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