今天在公司的資料庫上看到這樣的一個RMAN備份指令碼:run { allocate channel c1 type disk maxpiecesize = 2G; allocate channel c2 type disk maxpiecesize = 2G; backup incremental level 1 database format '/backup/osedb_osedb01/data/%d_DF_%T_%s_%p.bak' plus
在編寫PL/SQL中,有時需要程式中暫停幾秒鐘再繼續執行,查了一下,Oracle內建有這個功能dbms_lock.sleep(10);不過dbms_lock包需要使用者自己安裝,示範如下:C:\Documents and Settings\andyleng>sqlplus /nolog SQL*Plus: Release 11.2.0.1.0 Production on&nb
ora-00600 [12700]的故障一般是由於table或index的資料區塊有錯誤故障現象:使用者反映,在執行以下一條簡單的select命令時報錯select * from in_passenger t where t.hotelcode = 'xxxxx'其中xxxxx是索引列,不使用索引列則不報錯。處理過程:1. 查看追蹤檔案中發生錯誤的SQL2. 對引發錯誤的表的資料區塊進行檢查,命令如下analyze table xxxxx validate
只是要繞過hibernate 調用jdbc API,當然事務還是由hibernate業管理: 假如我們建立了以下預存程序: create or replace procedure batchUpdateCustomer(p_age in number) as begin update CUSTOMERS set AGE=AGE+1 where AGE>p_age; end; 預存程序中有一個參數p_age,代表客戶的年齡,應用程式可按照以下方式調用預存程序: 代碼內容 tx =
1 move時實驗 SQL> create table my_objects_move tablespace ASSM as select * from all_objects where rownum < 20000;Table created SQL> select value 2 from v$mystat, v$statname 3 where
在Linux中,對資料庫進行RMAN不完全恢複。執行recover database until time 'xxxx' 時報錯:ORA-01841 (full) year must be between -4713 and +4713 / +9999 and must not be 0怎麼改格式都無效。解決方案是,設定作業系統的NLS_LANG環境變數,例如 export