標籤:--query許可權即可查看系統有哪些失效的PKG。(我們系統的PKG一般是OPER使用者建立的)select * from all_objects a where a.owner = ‘GNBSOPER‘ and a.status = ‘INVALID‘;--查看系統資料表的約束select * from all_contraints;Type CodeType DescriptionActs On LevelCCheck on a tableColumnORead Only on a
標籤:日期函數SYSDATE--當前系統時間select sysdate from dual; EXTRACT--擷取當前年份select extract(year from sysdate) from dual; --年select extract(month from sysdate) from dual; --月select extract(day from sysdate) from dual; --日 TO_DATE--將字串轉換為日期SELECT TO_DATE(
標籤: Oracle 執行計畫中的buffer sort實際上沒有排序,只是把資料載入到記憶體,不掃描多次表。--製造資料drop table test purge;drop table test1 purge;create table test as select * from dba_objects where rownum<10;create table test1 as select * from dba_objects where rownum<10;
標籤:對於企業級大型系統,Oracle資料庫的重要性不言而喻,作為長期使用Sql server的developer,花了點時間學習了一個Oracle的系列課程,總結一下。1.oracle一些基礎命令 sql*plus是操作Oracle的常用工具,以下一些常用命令: (1)串連資料庫:conn 使用者名稱/密碼 as sysdba/sysoper (2)關閉串連:disc (3)改密碼:psssw, alter user ***
標籤:金蝶BOS裡系統資料表 t_bas_message 表用於存放系統訊息.實際操作中,用戶端預設15分鐘查詢一次是否有新訊息 使用者基本不會去刪除已讀的訊息,這就導致這張表大得驚人,系統運行一年多以來,大約有 450萬條資料.再加上這張表上存在索引,對資料庫而言,一旦操作失誤導致表中索引失效,資料庫會因為全表掃描太多徹底卡死. 之後考濾刪除一個月以前的資料執行SQL語句如下 DELETE FROM t_bas_message t WHERE