| Author | Topic | 
                            
                                    | neubieStarting 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 |  | 
       
                            
                       
                          
                            
                                    | snSQLMaster 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. |  
                                          |  |  | 
                            
                       
                          
                            
                                    | neubieStarting Member
 
 
                                    21 Posts | 
                                        
                                          |  Posted - 2008-12-04 : 01:54:45 
 |  
                                          | can replication do recurring? how then?thanks |  
                                          |  |  | 
                            
                       
                          
                            
                                    | sodeepMaster 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? |  
                                          |  |  | 
                            
                       
                          
                            
                                    | neubieStarting Member
 
 
                                    21 Posts | 
                                        
                                          |  Posted - 2008-12-04 : 19:34:09 
 |  
                                          | nope, db2 in same instance and server. is that matter? |  
                                          |  |  | 
                            
                       
                          
                            
                                    | sodeepMaster Smack Fu Yak Hacker
 
 
                                    7174 Posts | 
                                        
                                          |  Posted - 2008-12-04 : 20:37:05 
 |  
                                          | you need atleast separate instance to replicate. |  
                                          |  |  | 
                            
                       
                          
                            
                                    | snSQLMaster 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. |  
                                          |  |  | 
                            
                       
                          
                            
                                    | neubieStarting 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 |  
                                          |  |  | 
                            
                       
                          
                            
                                    | sodeepMaster 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. |  
                                          |  |  | 
                            
                       
                          
                            
                                    | tkizerAlmighty SQL Goddess
 
 
                                    38200 Posts |  | 
                            
                       
                          
                            
                                    | sodeepMaster Smack Fu Yak Hacker
 
 
                                    7174 Posts |  | 
                            
                       
                          
                            
                                    | tkizerAlmighty SQL Goddess
 
 
                                    38200 Posts |  | 
                            
                       
                          
                            
                                    | sodeepMaster Smack Fu Yak Hacker
 
 
                                    7174 Posts |  | 
                            
                       
                          
                            
                                    | tkizerAlmighty SQL Goddess
 
 
                                    38200 Posts |  | 
                            
                       
                          
                            
                                    | sodeepMaster 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
 
 |  
                                          |  |  | 
                            
                            
                                |  |