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.
    
        | 
                
                    | 
                            
                                | Author | Topic |  
                                    | imarchenkoYak Posting Veteran
 
 
                                        57 Posts | 
                                            
                                            |  Posted - 2008-01-21 : 19:05:25 
 |  
                                            | Hello!I have been asked to help with replication related problem. Database with replication enabled has been restored on a different server. Developer issued:backup log SBMSData with TRUNCATE_ONLYand got a message: The log was not truncated because records at the beginning of the log are pending replication. Ensure the Log Reader Agent is running or use sp_repldone to mark transactions as distributed.We tried:EXEC sp_repldone @xactid = NULL, @xact_segno = NULL, @numtrans = 0,    @time = 0, @reset = 1but got an error: The database is not published. (which is true)If I issue DBCC OPENTRAN in this database, I get:Transaction information for database 'SBMSData'.Replicated Transaction Information:        Oldest distributed LSN     : (341120:377:1)        Oldest non-distributed LSN : (341116:174:1)DBCC execution completed. If DBCC printed error messages, contact your system administrator.  Copy we restored will be used for development purposes. I was thinking of rebuilding log on database in question. Is this the proper way of handling this problem?  Database in question is publisher in production. We don't need replication in development enviroment.Thanks,Igor |  |  
                                    | rmiaoMaster Smack Fu Yak Hacker
 
 
                                    7266 Posts | 
                                        
                                          |  Posted - 2008-01-21 : 19:58:28 
 |  
                                          | Turn off publisher with sp_dboption. |  
                                          |  |  |  
                                    | imarchenkoYak Posting Veteran
 
 
                                    57 Posts | 
                                        
                                          |  Posted - 2008-01-22 : 14:02:09 
 |  
                                          | sp_dboption 'SBMSData','published'returns off for database in question. I assume that replication is off. Is that what you meant?Thanks,Igor |  
                                          |  |  |  
                                    | rmiaoMaster Smack Fu Yak Hacker
 
 
                                    7266 Posts | 
                                        
                                          |  Posted - 2008-01-22 : 23:00:07 
 |  
                                          | Then try clean up with sp_repldone. |  
                                          |  |  |  
                                    | dinakarMaster Smack Fu Yak Hacker
 
 
                                    2507 Posts | 
                                        
                                          |  Posted - 2008-01-23 : 00:04:12 
 |  
                                          | Try sp_removedbreplication.Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |  
                                          |  |  |  
                                    | imarchenkoYak Posting Veteran
 
 
                                    57 Posts | 
                                        
                                          |  Posted - 2008-01-23 : 16:24:11 
 |  
                                          | I executed:sp_removedbreplication 'SBMSData'But where trying to reclaim space (backup log SBMSData with TRUNCATE_ONLY), I am getting the same error: The log was not truncated because records at the beginning of the log are pending replication. Ensure the Log Reader Agent is running or use sp_repldone to mark transactions as distributed. |  
                                          |  |  |  
                                    | rmiaoMaster Smack Fu Yak Hacker
 
 
                                    7266 Posts | 
                                        
                                          |  Posted - 2008-01-23 : 23:09:45 
 |  
                                          | Did you try sp_repldone then? |  
                                          |  |  |  
                                    | imarchenkoYak Posting Veteran
 
 
                                    57 Posts | 
                                        
                                          |  Posted - 2008-01-24 : 16:41:12 
 |  
                                          | quote:I did and got an error:The database is not published. (which is true)Originally posted by rmiao
 Did you try sp_repldone then?
 
 |  
                                          |  |  |  
                                |  |  |  |