Author |
Topic |
neubie
Starting Member
21 Posts |
Posted - 2008-12-03 : 20:01:03
|
hi there,can we make mirror database for this condition:we have two database, dbone and dbtwo. dbone is "primary" database that be used daily. we want some tables from dbone auto-synchronize to dbtwo, in condition data in dbone is copied to dbtwo.can we do that?thanks before |
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2008-12-04 : 00:44:00
|
You can do that but you need to use replication, not database mirroring. |
|
|
neubie
Starting Member
21 Posts |
Posted - 2008-12-04 : 01:54:45
|
can replication do recurring? how then?thanks |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-12-04 : 08:26:41
|
Yes you can do with Transactional Replication but where does DB2 exists ? Different instance/Diff server? |
|
|
neubie
Starting Member
21 Posts |
Posted - 2008-12-04 : 19:34:09
|
nope, db2 in same instance and server. is that matter? |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-12-04 : 20:37:05
|
you need atleast separate instance to replicate. |
|
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2008-12-04 : 20:51:14
|
If both databases are on the same server then just create a trigger in each of the the tables you want to copy and have the trigger apply the changes.If you don't mind having a delay between when the changes happen in the first database and when they are applied in the second, write a stored procedure to compare the tables and make the changes and call the stored procedure from a job, then schedule the job to run as often as necessary. |
|
|
neubie
Starting Member
21 Posts |
Posted - 2008-12-09 : 02:12:29
|
for snSQLsorry, I don't get it. would you explain me more detail? may be step by step, if you don't mind? thanks very well |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-12-09 : 19:32:52
|
He is talking about cross-database triggers to mirror the result or create stored procedure with necessary code and run it with SQL Server Agent as Jobs. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-12-10 : 18:28:33
|
quote: Originally posted by tkizer Read Books Online if you'd like more detail.Booksonline doesn't have information about that. We've got transactional replication setup on many environments as mission critical processes. On two systems, we are replicating to the same instance. We don't see any performance issues, but perhaps it's because we have experienced DBAs that have designed the system.OK that's great.No offenseTara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog
|
|
|
|