如何從BasicFile遷移到SecureFile存儲(二)

SYS_IL0000072118C00005$$       INDEX PARTITION      ASSM                 SYS_IL_P177  BASICFILES                                            
SYS_IL0000072118C00006$$       INDEX PARTITION      ASSM                 SYS_IL_P185  BASICFILES                                            
SYS_IL0000072118C00006$$       INDEX PARTITION      ASSM                 SYS_IL_P188  BASICFILES                                            
SYS_IL0000072118C00006$$       INDEX PARTITION      ASSM                 SYS_IL_P187  BASICFILES                                            
SYS_IL0000072118C00006$$       INDEX PARTITION      ASSM                 SYS_IL_P186  BASICFILES                                            
SYS_IL0000072144C00005$$       INDEX PARTITION      ASSM                 SYS_IL_P194  SECUREFILES                                           
SYS_IL0000072144C00005$$       INDEX PARTITION      ASSM                 SYS_IL_P193  SECUREFILES                                           
SYS_IL0000072144C00005$$       INDEX PARTITION      ASSM                 SYS_IL_P195  SECUREFILES                                           
SYS_IL0000072144C00005$$       INDEX PARTITION      ASSM                 SYS_IL_P196  SECUREFILES                                           
SYS_IL0000072144C00006$$       INDEX PARTITION      ASSM                 SYS_IL_P204  SECUREFILES                                           
SYS_IL0000072144C00006$$       INDEX PARTITION      ASSM                 SYS_IL_P203  SECUREFILES                                           
SYS_IL0000072144C00006$$       INDEX PARTITION      ASSM                 SYS_IL_P202  SECUREFILES                                           
SYS_IL0000072144C00006$$       INDEX PARTITION      ASSM                 SYS_IL_P201  SECUREFILES                                           
SYS_LOB0000072118C00005$$      LOB PARTITION        ASSM                 SYS_LOB_P173 BASICFILES                                            
SYS_LOB0000072118C00005$$      LOB PARTITION        ASSM                 SYS_LOB_P176 BASICFILES                                            
SYS_LOB0000072118C00005$$      LOB PARTITION        ASSM                 SYS_LOB_P175 BASICFILES                                            
SYS_LOB0000072118C00005$$      LOB PARTITION        ASSM                 SYS_LOB_P174 BASICFILES                                            
SYS_LOB0000072118C00006$$      LOB PARTITION        ASSM                 SYS_LOB_P184 BASICFILES                                            
SYS_LOB0000072118C00006$$      LOB PARTITION        ASSM                 SYS_LOB_P183 BASICFILES                                            
SYS_LOB0000072118C00006$$      LOB PARTITION        ASSM                 SYS_LOB_P181 BASICFILES                                            
SYS_LOB0000072118C00006$$      LOB PARTITION        ASSM                 SYS_LOB_P182 BASICFILES                                            
SYS_LOB0000072144C00005$$      LOB PARTITION        SECUREFILE           SYS_LOB_P191 SECUREFILES                                           
SYS_LOB0000072144C00005$$      LOB PARTITION        SECUREFILE           SYS_LOB_P192 SECUREFILES                                           
SYS_LOB0000072144C00005$$      LOB PARTITION        SECUREFILE           SYS_LOB_P189 SECUREFILES                                           
SYS_LOB0000072144C00005$$      LOB PARTITION        SECUREFILE           SYS_LOB_P190 SECUREFILES                                           
SYS_LOB0000072144C00006$$      LOB PARTITION        SECUREFILE           SYS_LOB_P198 SECUREFILES                                           
SYS_LOB0000072144C00006$$      LOB PARTITION        SECUREFILE           SYS_LOB_P199 SECUREFILES                                           
SYS_LOB0000072144C00006$$      LOB PARTITION        SECUREFILE           SYS_LOB_P197 SECUREFILES                                           
SYS_LOB0000072144C00006$$      LOB PARTITION        SECUREFILE           SYS_LOB_P200 SECUREFILES                                           
TICKETS                        TABLE PARTITION      ASSM                 STS_PENDING  USERS                                                 
TICKETS                        TABLE PARTITION      ASSM                 STS_OTHER    USERS                                                 
TICKETS                        TABLE PARTITION      ASSM                 STS_OPEN     USERS                                                 
TICKETS                        TABLE PARTITION      ASSM                 STS_CLOSED   USERS                                                 
TICKETS_PK_IDX                 INDEX                ASSM                              USERS                                                 

                                                   BasicFile和SecureFile LOB元數(shù)據(jù)
                                                              (來自DBA_LOBS)

                                                                                      Stored  Encryp- Compre- DeDupli- Secure  Parti-       
Table          Column     Segment                    Tablespace   Logging  Cacheing   In Row  tion    ssion   cation   File?   tioned       
-------------- ---------- -------------------------- ------------ -------- ---------- ------- ------- ------- -------- ------- -------      
SECURE_TICKETS DOCUMENT   SYS_LOB0000072118C00005$$  BASICFILES   NONE     NO         YES     NONE    NONE    NONE     NO      YES          
SECURE_TICKETS SCRNIMG    SYS_LOB0000072118C00006$$  BASICFILES   NONE     NO         YES     NONE    NONE    NONE     NO      YES          
TICKETS        DOCUMENT   SYS_LOB0000072144C00005$$  SECUREFILES  NONE     YES        NO      NO      NO      NO       YES     YES          
TICKETS        SCRNIMG    SYS_LOB0000072144C00006$$  SECUREFILES  NONE     CACHEREADS NO      NO      NO      NO       YES     YES          

                                         BasicFile和SecureFile分區(qū)LOB默認設(shè)置
                                                            (來自DBA_PART_LOBS)

Table     Column       Cached       Tablespace   SecureFile   Compressed   DeDuplicated Encrypted                                
----- ------------ ------------ ------------ ------------ ------------ ------------ ------------                             
SECURE_TICKETS     DOCUMENT     NO           BASICFILES   NO           NONE         NONE         NONE                                     
SECURE_TICKETS     SCRNIMG      NO           BASICFILES   NO           NONE         NONE         NONE                                     
TICKETS              DOCUMENT     YES          SECUREFILES  YES          NO           NO           NO                                       
TICKETS              SCRNIMG      CACHEREADS   SECUREFILES  YES          NO           NO           NO                                       

                                                  BasicFile和SecureFile LOB分區(qū)
                                                         (來自DBA_LOB_PARTITIONS)

                              Stored in               Stored                           DeDupli-                                             
Table    Column     Partition    Cacheing   In Row     Encrypted  Compressed cated      SecureFile                                
---- ------------ ------------ ---------- ---------- ---------- ---------- ---------- ----------                                
SECURE_TICKETS   DOCUMENT     STS_OTHER    NO         YES        NONE       NONE       NONE       NO                                        
SECURE_TICKETS   DOCUMENT     STS_CLOSED   NO         YES        NONE       NONE       NONE       NO                                        
SECURE_TICKETS   DOCUMENT     STS_OPEN     NO         YES        NONE       NONE       NONE       NO                                        
SECURE_TICKETS   DOCUMENT     STS_PENDING  NO         YES        NONE       NONE       NONE       NO                                        
SECURE_TICKETS   SCRNIMG      STS_OTHER    NO         YES        NONE       NONE       NONE       NO                                        
SECURE_TICKETS   SCRNIMG      STS_CLOSED   NO         YES        NONE       NONE       NONE       NO                                        
SECURE_TICKETS   SCRNIMG      STS_PENDING  NO         YES        NONE       NONE       NONE       NO                                        
SECURE_TICKETS   SCRNIMG      STS_OPEN     NO         YES        NONE       NONE       NONE       NO                                        
TICKETS          DOCUMENT     STS_OTHER    YES        NO         NO         HIGH       LOB        YES                                       
TICKETS          DOCUMENT     STS_PENDING  YES        NO         NO         NO         NO         YES                                       
TICKETS          DOCUMENT     STS_CLOSED   YES        NO         NO         MEDIUM     LOB        YES                                       
TICKETS          DOCUMENT     STS_OPEN     YES        NO         NO         NO         NO         YES                                       
TICKETS          SCRNIMG      STS_PENDING  CACHEREADS NO         NO         MEDIUM     LOB        YES                                       
TICKETS          SCRNIMG      STS_OPEN     CACHEREADS NO         NO         MEDIUM     NO         YES                                       
TICKETS          SCRNIMG      STS_CLOSED   CACHEREADS NO         NO         HIGH       LOB        YES                                       
TICKETS          SCRNIMG      STS_OTHER    CACHEREADS NO         NO         HIGH       LOB        YES

臨滄ssl適用于網(wǎng)站、小程序/APP、API接口等需要進行數(shù)據(jù)傳輸應(yīng)用場景,ssl證書未來市場廣闊!成為成都創(chuàng)新互聯(lián)公司的ssl證書銷售渠道,可以享受市場價格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:18980820575(備注:SSL證書合作)期待與您的合作!


  2、DBMS_SPACE

這是另一個Oracle古老支持包,它的SPACE_USAGE存儲過程提供關(guān)于BasicFile和SecureFile LOB的空間利用率,我在TRBTKT.PKG_SECUREFILES包中引入了兩個存儲過程:CALC_SPACE_BASICFILES和CALC_SPACE_SECUREFILES。但遺憾的是,這個功能只能在啟用了自動段空間管理(ASSM)的表空間上使用,而且,它也不會考慮任何BasicFile LOB塊的空間利用率,在清單5中,我對表TRBTKT.TICKETS和TRBTKT.SECURE_TICKETS分別調(diào)用了這些存儲過程,并返回了相應(yīng)的輸出。

清單5 確定BasicFile和SecureFile LOB的空間利用率

SET SERVEROUTPUT ON
-- BasicFile存儲利用率:
BEGIN
    trbtkt.pkg_securefiles.calc_space_basicfiles (
         ownname => 'TRBTKT'
        ,tabname => 'SECURE_TICKETS'
        ,colname => 'DOCUMENT'
        ,partname => 'STS_OPEN'
    );
    trbtkt.pkg_securefiles.calc_space_basicfiles (
         ownname => 'TRBTKT'
        ,tabname => 'SECURE_TICKETS'
        ,colname => 'DOCUMENT'
        ,partname => 'STS_PENDING'
    );
    trbtkt.pkg_securefiles.calc_space_basicfiles (
         ownname => 'TRBTKT'
        ,tabname => 'SECURE_TICKETS'
        ,colname => 'DOCUMENT'
        ,partname => 'STS_CLOSED'
    );
    trbtkt.pkg_securefiles.calc_space_basicfiles (
         ownname => 'TRBTKT'
        ,tabname => 'SECURE_TICKETS'
        ,colname => 'DOCUMENT'
        ,partname => 'STS_OTHER'
    );
    trbtkt.pkg_securefiles.calc_space_basicfiles (
         ownname => 'TRBTKT'
        ,tabname => 'SECURE_TICKETS'
        ,colname => 'SCRNIMG'
        ,partname => 'STS_OPEN'
    );
    trbtkt.pkg_securefiles.calc_space_basicfiles (
         ownname => 'TRBTKT'
        ,tabname => 'SECURE_TICKETS'
        ,colname => 'SCRNIMG'
        ,partname => 'STS_PENDING'
    );
    trbtkt.pkg_securefiles.calc_space_basicfiles (
         ownname => 'TRBTKT'
        ,tabname => 'SECURE_TICKETS'
        ,colname => 'SCRNIMG'
        ,partname => 'STS_CLOSED'
    );
    trbtkt.pkg_securefiles.calc_space_basicfiles (
         ownname => 'TRBTKT'
        ,tabname => 'SECURE_TICKETS'
        ,colname => 'SCRNIMG'
        ,partname => 'STS_OTHER'
    );
END;
/
============================================================
Space Usage for BasicFile LOB TRBTKT.SECURE_TICKETS.DOCUMENT
Partition Name: STS_OPEN                                    
------------------------------------------------------------
Full Blocks: 123 KB: .96                                    
Unformatted Blocks: 379 KB: 2.96                            
Total Blocks: 123 Total KB: .96                             
============================================================
============================================================
Space Usage for BasicFile LOB TRBTKT.SECURE_TICKETS.DOCUMENT
Partition Name: STS_PENDING                                 
------------------------------------------------------------
Full Blocks: 20 KB: .16                                     
Unformatted Blocks: 482 KB: 3.77                            
Total Blocks: 20 Total KB: .16                              
============================================================
============================================================
Space Usage for BasicFile LOB TRBTKT.SECURE_TICKETS.DOCUMENT
Partition Name: STS_CLOSED                                  
------------------------------------------------------------
Full Blocks: 37 KB: .29                                     
Unformatted Blocks: 465 KB: 3.63                            
Total Blocks: 37 Total KB: .29                              
============================================================
============================================================
Space Usage for BasicFile LOB TRBTKT.SECURE_TICKETS.DOCUMENT
Partition Name: STS_OTHER                                   
------------------------------------------------------------
Full Blocks: 0 KB: 0                                        
Unformatted Blocks: 0 KB: 0                                 
Total Blocks: 0 Total KB: 0                                 
============================================================
============================================================
Space Usage for BasicFile LOB TRBTKT.SECURE_TICKETS.SCRNIMG 
Partition Name: STS_OPEN                                    
------------------------------------------------------------
Full Blocks: 420 KB: 3.28                                   
Unformatted Blocks: 82 KB: .64                              
Total Blocks: 420 Total KB: 3.28                            
============================================================
============================================================
Space Usage for BasicFile LOB TRBTKT.SECURE_TICKETS.SCRNIMG 
Partition Name: STS_PENDING                                 
------------------------------------------------------------
Full Blocks: 66 KB: .52                                     
Unformatted Blocks: 436 KB: 3.41                            
Total Blocks: 66 Total KB: .52                              
============================================================
============================================================
Space Usage for BasicFile LOB TRBTKT.SECURE_TICKETS.SCRNIMG 
Partition Name: STS_CLOSED                                  
------------------------------------------------------------
Full Blocks: 144 KB: 1.13                                   
Unformatted Blocks: 358 KB: 2.8                             
Total Blocks: 144 Total KB: 1.13                            
============================================================
============================================================
Space Usage for BasicFile LOB TRBTKT.SECURE_TICKETS.SCRNIMG 
Partition Name: STS_OTHER                                   
------------------------------------------------------------
Full Blocks: 0 KB: 0                                        
Unformatted Blocks: 0 KB: 0                                 
Total Blocks: 0 Total KB: 0                                 
============================================================
-- SecureFile存儲利用率:
BEGIN
    trbtkt.pkg_securefiles.calc_space_securefiles (
         ownname => 'TRBTKT'
        ,tabname => 'TICKETS'
        ,colname => 'DOCUMENT'
        ,partname => 'STS_OPEN'
    );
    trbtkt.pkg_securefiles.calc_space_securefiles (
         ownname => 'TRBTKT'
        ,tabname => 'TICKETS'
        ,colname => 'DOCUMENT'
        ,partname => 'STS_PENDING'
    );
    trbtkt.pkg_securefiles.calc_space_securefiles (
         ownname => 'TRBTKT'
        ,tabname => 'TICKETS'
        ,colname => 'DOCUMENT'
        ,partname => 'STS_CLOSED'
    );
    trbtkt.pkg_securefiles.calc_space_securefiles (
         ownname => 'TRBTKT'
        ,tabname => 'TICKETS'
        ,colname => 'DOCUMENT'
        ,partname => 'STS_OTHER'
    );
    trbtkt.pkg_securefiles.calc_space_securefiles (
         ownname => 'TRBTKT'
        ,tabname => 'TICKETS'
        ,colname => 'SCRNIMG'
        ,partname => 'STS_OPEN'
    );
    trbtkt.pkg_securefiles.calc_space_securefiles (
         ownname => 'TRBTKT'
        ,tabname => 'TICKETS'
        ,colname => 'SCRNIMG'
        ,partname => 'STS_PENDING'
    );
    trbtkt.pkg_securefiles.calc_space_securefiles (
         ownname => 'TRBTKT'
        ,tabname => 'TICKETS'
        ,colname => 'SCRNIMG'
        ,partname => 'STS_CLOSED'
    );
    trbtkt.pkg_securefiles.calc_space_securefiles (
         ownname => 'TRBTKT'
        ,tabname => 'TICKETS'
        ,colname => 'SCRNIMG'
        ,partname => 'STS_OTHER'
    );
END;
/

============================================================
Space Usage for SecureFile LOB TRBTKT.TICKETS.DOCUMENT      
Partition Name: STS_OPEN                                    
------------------------------------------------------------
Segment Blocks: 1024 KB: 8192    &nbs

網(wǎng)站題目:如何從BasicFile遷移到SecureFile存儲(二)
分享URL:http://muchs.cn/article0/pjjsio.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供、虛擬主機外貿(mào)網(wǎng)站建設(shè)、建站公司、企業(yè)網(wǎng)站制作、服務(wù)器托管

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

小程序開發(fā)