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  | 
                             
                            
                                    | 
                                         khanhhv 
                                        Starting Member 
                                         
                                        
                                        1 Post  | 
                                        
                                        
                                            
                                            
                                             Posted - 2011-06-02 : 04:35:34
                                            
  | 
                                             
                                            
                                            | My case is:I have any databases: A,B,C,...I didn't setup backup with Database -> I haven't backup file (I always stop service  before copy file data)Yesterday, I Want to update view, procedure from A data to B data.I open A data and generate SQL Script (I have check in "All Table", "All View", "All Procedure",...) -> Script a.sqlAfter that, open SQL Query Analyzer of B data, run Script file a.sqlwhen run complete, B Database is empty.Question:- rollback or Restore?- I haven't got backup file. How do Restore full?P/s: Is master file store data of B Database? method to restore or backup from master file but haven't backup file?Thank you. | 
                                             
                                         
                                     | 
                             
       
                            
                       
                          
                            
                                    | 
                                     nigelrivett 
                                    Master Smack Fu Yak Hacker 
                                     
                                    
                                    3385 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2011-06-02 : 05:18:10
                                          
  | 
                                         
                                        
                                          | >> I didn't setup backup with Database -> I haven't backup file (I always stop service before copy file data)An indication that the database isn't important - rebuild it from scratch (I assume that was your recovery policy?).Not really sure what your issue is though - it sounds like scripting the database has failed which isn't much of a problem. Maybe just try it again.If you have a copy of the database files you could try an attach but you should have tested that if it is how you want to run your backups.Going forward backup the databases to files and archive those. ALso periodically run test restores - on every backup if it is important.>> P/s: Is master file store data of B Database? method to restore or backup from master file but haven't backup file?No idea what this is about.==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy.  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     GilaMonster 
                                    Master Smack Fu Yak Hacker 
                                     
                                    
                                    4507 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2011-06-02 : 05:19:00
                                          
  | 
                                         
                                        
                                          | Unless you started a transaction before running that, you can't roll back. I do hope someone took a backup of the DB...--Gail ShawSQL Server MVP  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     RickD 
                                    Slow But Sure Yak Herding Master 
                                     
                                    
                                    3608 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2011-06-02 : 05:19:42
                                          
  | 
                                         
                                        
                                          | You don't, you learn the lesson that in the future you ensure that you have a backup. Backups are more important than anything else you will ever do in SQL.  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                            
                                | 
                                    
                                      
                                     
                                    
                                 | 
                             
                         
                     | 
                 
             
         |   
     
     
            
              
	     |  
		
			
     
          
		 |