Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 ask - mirror database with only some tables

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.
Go to Top of Page

neubie
Starting Member

21 Posts

Posted - 2008-12-04 : 01:54:45
can replication do recurring? how then?
thanks
Go to Top of Page

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?
Go to Top of Page

neubie
Starting Member

21 Posts

Posted - 2008-12-04 : 19:34:09
nope, db2 in same instance and server. is that matter?
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-12-04 : 20:37:05
you need atleast separate instance to replicate.
Go to Top of Page

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.
Go to Top of Page

neubie
Starting Member

21 Posts

Posted - 2008-12-09 : 02:12:29
for snSQL
sorry, I don't get it. would you explain me more detail? may be step by step, if you don't mind? thanks very well
Go to Top of Page

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.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-12-09 : 23:27:18
You do not need separate instances to replicate. We replicate to the same instance on one particular system.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-12-10 : 09:46:35
quote:
Originally posted by tkizer

You do not need separate instances to replicate. We replicate to the same instance on one particular system.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog




Never tried this one. But Why you would take overhead of publisher,distributor,subscribers in same server? I would go with Stored procedure way if it was with same instances.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-12-10 : 13:06:29
Who said distributor was on the same server? We are using the stored procedure approach in transactional replication already.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-12-10 : 13:19:45
quote:
Originally posted by tkizer

Who said distributor was on the same server?

I said it could be.
We are using the stored procedure approach in transactional replication already.

Didn't get it? How?
Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog


Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-12-10 : 13:46:36
Read Books Online if you'd like more detail. 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.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

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 offense

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog


Go to Top of Page
   

- Advertisement -