| Author | 
                                
                                 Topic  | 
                            
                            
                                    | 
                                         jpotucek 
                                        Constraint Violating Yak Guru 
                                         
                                        
                                        273 Posts  | 
                                        
                                        
                                            
                                            
                                             Posted - 2008-04-13 : 08:10:07
                                            
  | 
                                             
                                            
                                            Had an application upgrade this weekend and two new tables were added to a databases that we are replicating (transactional replication) to a differnt server.before the upgrade, stopped the log reader for replication.The application upgrade itself created the new tables.I then added both of the new tables as articles to be replicated. turned back on the log reader.Tables existed in both the publisher and subscriber so I thought we were good.  This morning I was alerted to the fact that some totals don't match so I checked the new tables on the subscriber and I neglected to add a primary key for replication.added those in ALTER TABLE [tower].[AgMisc] ADD 	CONSTRAINT [PK_AgMisc] PRIMARY KEY  CLUSTERED 	(		[towid]	) WITH  FILLFACTOR = 90  ON [PRIMARY] GO--ALTER TABLE [tower].[bAgMisc] ADD 	CONSTRAINT [PK_bAgMisc] PRIMARY KEY  CLUSTERED 	(		[towid]	) WITH  FILLFACTOR = 90  ON [PRIMARY] GO and then waited for the replication Distribution agent to kick off on it's schedule.    after it ran, It did not replicate the 8 records one of the tables.  So not I have 8 records in the agmisc table on the publisher that are not in the subscriber table..   I'm by no means a replication expert..  can someone tell me what I might have done wrong? | 
                                             
                                         
                                     | 
                            
       
                            
                       
                          
                            
                                    | 
                                     rmiao 
                                    Master Smack Fu Yak Hacker 
                                     
                                    
                                    7266 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2008-04-13 : 15:45:16
                                          
  | 
                                         
                                        
                                          | Did you start snapshot after adding new articles?  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                  
                            
                       
                          
                            
                                    | 
                                     jpotucek 
                                    Constraint Violating Yak Guru 
                                     
                                    
                                    273 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2008-04-14 : 02:10:09
                                          
  | 
                                         
                                        
                                          | yes. what I got back was 'a snapshot was not generated because no subscriptions needed initialization'   ??  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                  
                            
                       
                          
                            
                                    | 
                                     jpotucek 
                                    Constraint Violating Yak Guru 
                                     
                                    
                                    273 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2008-04-14 : 10:42:40
                                          
  | 
                                         
                                        
                                          | I see another discrepency.  for each table that is replicated, there are three stored procedures on the subscriber: sp_MSins_MyTable sp_MSupd_MyTable sp_MSdel_MyTableand these 3 stored procedures do not exist on the subscriber for these two new tables.     Do I have to do some kind of initial push or something for these new tables?????  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                  
                            
                       
                          
                            
                                    | 
                                     sodeep 
                                    Master Smack Fu Yak Hacker 
                                     
                                    
                                    7174 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2008-04-14 : 12:09:57
                                          
  | 
                                         
                                        
                                          | You have to initialize subscription  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                  
                            
                       
                          
                            
                                    | 
                                     jpotucek 
                                    Constraint Violating Yak Guru 
                                     
                                    
                                    273 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2008-04-14 : 12:33:27
                                          
  | 
                                         
                                        
                                          | how do I do initialize the subscription???   I see a 'reinitialze all subscriptions' option..   is that what you're talking about?   is it disruptive?  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                  
                            
                       
                          
                            
                                    | 
                                     sodeep 
                                    Master Smack Fu Yak Hacker 
                                     
                                    
                                    7174 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2008-04-14 : 13:34:27
                                          
  | 
                                         
                                        
                                          | only subscription you want  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                  
                            
                       
                          
                            
                                    | 
                                     jpotucek 
                                    Constraint Violating Yak Guru 
                                     
                                    
                                    273 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2008-04-14 : 14:11:00
                                          
  | 
                                         
                                        
                                          | when I reinitialize my subscription I get this: "subscription cannot be initialized automatically because it was initialized manually when it was created"  ??  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                  
                            
                       
                          
                            
                                    | 
                                     rmiao 
                                    Master Smack Fu Yak Hacker 
                                     
                                    
                                    7266 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2008-04-14 : 22:44:35
                                          
  | 
                                         
                                        
                                          | Looks like you didn't initial subscriber with snapshot when set replication, may need redo it.  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                  
                            
                       
                          
                            
                                    | 
                                     jpotucek 
                                    Constraint Violating Yak Guru 
                                     
                                    
                                    273 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2008-04-15 : 09:24:32
                                          
  | 
                                         
                                        
                                          | in case anyone is interested, here is what I did to fix thissp_helpsubscription  @publication =  'MY publication'  Did NOT see my new Article (new table(s)sp_addsubscription @publication = 'MY publication' ,  @article =  'New article' , @subscriber =  'MY subscriber' Added my new Article (new table(s)sp_helpsubscription  @publication =  'MY publication' to make sure my new Articles show upstart SnaphotStart REPL distribution Job  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                  
                            
                            
                                | 
                                    
                                      
                                     
                                    
                                 |