21. 在ORACLE TABLE中如何抓取MEMO類型字段為空的資料記錄?
select remark from oms_flowrec where trim(' ' from remark) is not null ;
22. 如何用BBB表的資料去更新AAA表的資料(有關聯的字段)
UPDATE AAA SET BNS_SNM=(SELECT BNS_SNM FROM BBB WHERE AAA.DPT_NO=BBB.DPT_NO) WHERE BBB.DPT_NO IS NOT NULL;
23. P4計算機安裝方法
將SYMCJIT.DLL改為SYSMCJIT.OLD
24. 何查詢SERVER是不是OPS?
SELECT * FROM V$OPTION;
如果PARALLEL SERVER=TRUE則有OPS能
25. 何查詢每個用戶的權限?
SELECT * FROM DBA_SYS_PRIVS;
26. 如何將表移動表空間?
ALTER TABLE TABLE_NAME MOVE TABLESPACE_NAME;
27. 如何將索引移動表空間?
ALTER INDEX INDEX_NAME REBUILD TABLESPACE TABLESPACE_NAME;
28. 在LINUX,UNIX下如何激活DBA STUDIO?
OEMAPP DBASTUDIO
29. 查詢鎖的狀況的對象有?
V$LOCK, V$LOCKED_OBJECT, V$SESSION, V$SQLAREA, V$PROCESS ;
查詢鎖的表的方法:
SELECT S.SID SESSION_ID, S.USERNAME, DECODE(LMODE, 0, 'None', 1, 'Null', 2, 'Row-S (SS)', 3, 'Row-X (SX)', 4, 'Share', 5, 'S/Row-X (SSX)', 6, 'Exclusive', TO_CHAR(LMODE)) MODE_HELD, DECODE(REQUEST, 0, 'None', 1, 'Null', 2, 'Row-S (SS)', 3, 'Row-X (SX)', 4, 'Share', 5, 'S/Row-X (SSX)', 6, 'Exclusive', TO_CHAR(REQUEST)) MODE_REQUESTED, O.OWNER||'.'||O.OBJECT_NAME||' ('||O.OBJECT_TYPE||')', S.TYPE LOCK_TYPE, L.ID1 LOCK_ID1, L.ID2 LOCK_ID2 FROM V$LOCK L, SYS.DBA_OBJECTS O, V$SESSION S WHERE L.SID = S.SID AND L.ID1 = O.OBJECT_ID ;
30. 如何解鎖?
ALTER SYSTEM KILL SESSION ‘SID,SERIR#’;