ORA-01555 快照太旧、Undo表空间、一致性读、延时块清除

 

ORA-01555 快照太旧、Undo表空间、一致性读、延时块清除

回滚与撤销

回滚与撤销:

为了保证数据库中多个用户间的读一致性和能够回退事务,Oracle必须拥有一种机制,能够为变更的数据构造一种前镜像(before image)数据(保存修改之前的旧值),以保证那够回滚或撤销对数据库所作的修改,同时为数据恢复以及一致性读服务。

这就是回滚(或撤销)。在之前的日志中已经提到Redo,我们说Redo是用来保证在故障时事务可以被恢复,那么Undo则是用来保证事务可以被回滚或者撤销。

什么是回滚和撤销

  

 


                                            

                                                        
                                                        

 

 

 

 

 

 

 

  

  

 

 

  

 

 

  

 

 

   

   

  

  

 



>            >

>            

>                                             >

                                                                
>               
>                                            >      >
                               
                                                         

      



              

               

             

             

             

            

            


                

                



                

                

                

                

                 

             

            <>

             <<<<<<<>

             <<<<<





             


            >

            >
                                                                     

                                                                           
                                                                   
                                                                    
                                                                        
                                                                 
                                                                         
                                                                        
                                                                         
                                                                            
                                                                    
                                                                          
                                                                           
                                                                         
                                                                         

            >



                                  

                                                           

            >
                                          

                                                             
                                                        
                                                          
                                                        
                                                          
                                                        
                                                        
                                                          
                                                        
                                                          
                                                         


            >
                  

                     
            >

            >       

             

             
             
                          
                                    
                          
             
             
               
                              
                        
             
             
               
               
               
             <>
               
               
               

             
             
             
             
             
             <>
             
             
             

             
                       
                       

             
               
               
               
                
                
             

                                                          
             
                              
                             

                             

             <>



                                  

                                                          

            >

            >

            >

            >

             
             
             
             
             
             
             
                     
             
             
             
             
             

             
             
             
            <>
             
             
             


                 

                                

                            
                            
                            
                            
                            

                
                        
                
             
             

             

             

               
              

               

                
                        
                
             
             

             

             

                
              

               

                
                        
                    
             
             

             

                
              

               

            >
              
              <>
              
                                          

                                                                         
                                                                         
                                                                         
                                                                         
                                                                         
                                                                         

            >
                                                                     

                                                                           
                                                                   
                                                                    
                                                                        
                                                                 
                                                                         
                                                                        
                                                                        
                                                                            
                                                                    
                                                                          
                                                                           
                                                                         
                                                                         

            >
              
              
              <>
              
                                          

                                                                         
                                                                         

                                                                         
                                                                         
                                                                         
                                                                         
                                                                         
                                                                         


            >

             
             
             
             
            <>
             
             
             
             

                
                 
                 

                                                       
                    
                    

                                                          
             
                            

                 

              
              
              
              
              
              
              
             
              

              
              
              
              
              
              
              
             
              

              
              
              
              
              
              
              
             
              

            >

            >

            >

            >

            >

            >   

            >   

            >       

             
             
             
            <>
             
             
             
             

                
                 
                 

                                                       
                    
                    

              
              
              
              
              
              
              
             
              

              
              
              
              
              
              
              
             
              

              
              
              
              
              
              
              
             
              

                                                          
             
                              

            >
            >
                                                                     

                                                                           
                                                                   
                                                                    
                                                                        
                                                                 
                                                                        
                                                                        
                                                                        
                                                                            
                                                                    
                                                                          
                                                                           
                                                                         
                                                                         

                          

                               
                           

                      
                      
                      
                       
                    

                   
                    
                      
                      
                      
                     

            >
                                                                     

                                                                           
                                                                   

                          

                               
                           

                      
                      
                      
                      
                      

                   
                    
                      
                      
                      
                     

            >   

             
             
             
             
             
             
             
             
             
             
             

             
             
             
            <>
             
             
             
             

                
                 
                 

                                                       
                    
                    

            >   

              
              
              
              
              
              
              
             
              

              
              
              
              
              
              
              
             
              

              
              
              
              
              
              
              
             
              


             
             
             
             
             
             
             
             
             

             
             
             
            <>

                  

                                

                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
                    

                
                       
                    
             
             

             

               
              

              

                
                       
                
             
             

             

             

               
              

              

                
                       
                
             
             

             

             

               
              

              










             









































            <<<
            <<<





            ><









                    

                     




























              



                  

              








             



















             
















































































                































































              



              



              



































































































































































                


















































































































































             

             

             

             

             

             

             

             

             

             

             

            >

             

                             

             

             

             

             

            >

             

                    

                     

                     

             

            >

             

                                          

                                               

                                               

             

            >

             

             

             

             

             

                                                             

                         

                         

                         

             

             

             

             

             

             

            >

             

             

             

            >

             

                                                  

                                                                       

             

             

             

             

             

             

            >

             

                                                             

                         

                         

                         

             

             

             

             

             

            >

             

                                      

             

            >

             

                                    

             

            >

             

                                 

             

             

             

             

             

             

             

             

            >

                                   

             

            >

             

                  

                            

             

             

             

             

             

            >

             

             

             

             

             

             

             

                         

             

             

             

             

                    

                             

                        

              

              

             

               

                  

                

                

             

             

             

             

             

              

              

              

             

             

            >

             

             

             

             

             

             

             



             

             

              

              

               
                   

               
               
               

               

              

               

               

               

              

              
               
            >

                                   

                                      

            >

            >

                                   

                                      

              

              

             

               
              

              

              

            >

                                   

                                      

                                       

                                          

              
            >

                            

                        
                        
                       
                        
                        
                        
                        
                        
                        
                        
                        
                        


               
               
               

                         

                         
                 

                  
                  
                  
                  
                  
                  
                   
                  
                  

              

              

               
               
               

                                                                     

                                                                      

              

              

             
              
             
             
             
               
             
             
             
             
             
             
             
             
                 
             
             
             
             
               

             
              
              
              
              

              
            >
            >
            >
            >
               
               
               
               
               

                                           

                                                                   
                                                           
                                                     
                                                     
                                                           
                                                           
                                                           
                                                            
                                                            
                                                           
                                                            
                                                           
                                                           

            >

            >

                                     

                               
                               
                               
            >

            >

                                     

                               
                               
                               

            >
               
               
               
               
               

                                           

                                                                   
                                                     
                                                     
                                                     
                                                           
                                                           
                                                           
                                                           
                                                           
                                                           
                                                           
                                                     
                                                           
                                                           
                                                           
                                                     
                                                     
                                                      
                                                      
                                                     
                                                            
                                                     
                                                     

               

            >
              
               
               
               
               
              

                                           

                                                                   
                                                     
                                                     
                                                     
                                                           
                                                           
                                                           
                                                           
                                                           
                                                           
                                                           
                                                     
                                                           
                                                           
                                                           
                                                     
                                                     
                                                      
                                                      
                                                     
                                                      
                                                     
                                                     

              

            >

               

            >
               
               
               
               
               

                                           

                                                                   
                                                           
                                                           
                                                           
                                                           
                                                           
                                                           
                                                           
                                                           
                                                           
                                                           

              

               
              
              



              

             

              

              

             

             

             

             

               

              


              

            1. >
                   
                   
            2. >
                   
                   

              >
                   
                   

            3. >

              >
                       
                          
                          
                              
                        
                         
                         
                       
                   

             

            •  
              1. >

             
             

              

              

              

              

              

              

              
              




                

            时间: 2024-09-23 23:39:09

            ORA-01555 快照太旧、Undo表空间、一致性读、延时块清除的相关文章

            监控和管理Oracle UNDO表空间的使用

                对Oracle数据库UNDO表空间的监控和管理是我们日常最重要的工作之一,UNDO表空间通常都是Oracle自动化管理(通过undo_management初始化参数确定):UNDO表空间是用于存储DML操作的前镜像数据,它是实例恢复,数据回滚,一致性查询功能的重要组件:我们常常会忽略对它的监控,这会导致UNDO表空间可能出现以下问题:1).空间使用率100%,导致DML操作无法进行.2).告警日志中出现大量的ORA-01555告警错误.3).实例恢复失败,数据库无法正常打开. 一.对Or

            Oracle管理UNDO表空间

            创建undo talespace有两种方式: (1)数据库创建时创建undo tablespace; (2)在一个已经存在的数据库创建. 在undo tablespace中不能创建数据库对象,这是因为这个表空间是为数据库recover而准备的. 1.创建数据库时创建undo tablespace 在创建数据库的时候可以通过指定undo子句来创建undo tablespace,但是这个子句不是必须的. 如果在创建数据库时,系统指定是auto模式,但是没有指明undo tablespace的名字,那

            undo 表空间使用案例分析(使用率100%,enq:US-contention,释放undo)

             Undo参数SQL> show parameter undoNAME                                         TYPE                   VALUE----------------------------------- ----------  --------------------undo_management            string AUTOundo_retention                     integ

            oracle 9i数据库UNDO表空间释放

            今天早上在检查数据库文件的磁盘使用空间时,发现undo表空间在这个周末居然用了4G之多.达到 了24G! 按照平常的事物量,不会增长这么快,现在磁盘还剩几个G有点危险了,于是决定对undo表空间进行切换到一个比较新的数据文件中. 首先使用sys 用户创建一个undo表空间 undotbs02 初始大小为2G ,自动扩展属性关闭,磁盘空间只剩3G多:( sql>create undo tablespace undotbs02 datafile '/usr/oracle/oradata/db/und

            【DBA及开发必备】全解ORA-1555快照太旧错误原理及解决方案

            不论你的工作是管理Oracle数据库,还是开发.维护Oracle上的应用程序,通常来讲你都遇到过ORA-01555:snapshot too old这样的错误.本文为你详解错误产生的原因以及最佳解决方案.  ORA-01555产生的过程   我们先来看看ORA-01555是怎样产生的: 错误记录在哪?   通常,这个错误可能会在以下文件中出现: 1 Alert 告警日志文件  报错信息类似: ORA-01555: snapshot too old: rollback segment number

            关于undo表空间配置错误的ORA-30012

                  undo表空间是Oracle体系结构的重要组成部分,为什么我们可以回滚,就是因为有它.数据库任意数据的修改都会在undo表空间里生成前镜像,一是可以回滚,二是可以实现并发,以及一致性查询.因此undo也是Oracle数据库在创建和配置参数时必要的组成部分.本文描述的是错误的配置undo表空间之后故障的解决.       有关undo表空间的基础知识可以参考:             Oracle 回滚(ROLLBACK)和撤销(UNDO)            检查及设置合理的und

            收缩undo表空间

                  通常情况下,如果undo表空间的处于自动扩展且未指定最大值的情形,对于使用小表空间模式的数据库,undo表空间可能会一再增长,直到达到32GB.或者是在指定了自动扩展及其最大值而月底或年末的批量数据计算导致undo表空间疯狂超范围增长后不再释放.对于这些情形我们需要手动收缩表空间以达到节省空间资源以及数据库管理开销,如rman备份等.本文列出了收缩undo表空间的基本步骤并给出示例.      有关表空间,undo表空间的文章可参考:           Oracle 表空间与数据文

            检查及设置合理的undo表空间

                  UNDO是用于实现并发控制以及构建一致性读,也就是在数据变更之前产生前镜像,以保证用户能够回滚或撤销对数据库所作的修改.是Oracle数据库完整性的重要组成部分.因此合理的设计及配置undo以及使用undo都将对数据库有较大的影响.通常情况下,对于大规模数据的删除,更新操作,我们建议使用分批删除分次提交以减少对undo的占用和冲击.那么对于undo的大小到底应该设置多大?是启用自动扩展还是关闭自动扩展?这个问题仁者见仁,智者见智,见下文.   1.当前数据库环境及undo配置信息 s

            undo表空间管理方法

            (1)建立新的undo表空间(处于active状态的undo tablespace 不能offline 和 drop),可以建 立多个undo表空间,但一个时刻只有一个处于active. SQL> create undo tablespace   2  undotbs datafile '/u01/app/oracle/oradata/anny/undotbs01.dbf' size 100m   3  autoextend on next 10m maxsize 500m; Tablespac