PIXNET Logo登入

DanBrother的部落格

跳到主文

歡迎光臨DanBrother在痞客邦的小天地. 部落格文章同步於=> http://blog.xuite.net/gem083/dba

部落格全站分類:數位生活

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 6月 29 週四 201717:53
  • Enable SQL Trace For a Single Oracle DB User

Enable SQL Trace For a Single Oracle DB User
-- Create Logon Trigger
create trigger t_scott_logon_trace after logon on scott.schema
begin
    execute immediate 'alter session set timed_statistics=true';
    dbms_session.set_identifier('
TRACE_SCOTT');
end;
/
(繼續閱讀...)
文章標籤

DanBrother 發表在 痞客邦 留言(0) 人氣(43)

  • 個人分類:Oracle SQL Tuning
▲top
  • 2月 11 週二 201416:38
  • SYS_OP_C2C Causing FULL Table Scan Instead of Index Range Scan

Symptom: SYS_OP_C2C Causing FULL Table Scan Instead of Index Range Scan

SYS_OP_C2C is the implicit function that is used to convert the column between NCHAR and CHAR;
(繼續閱讀...)
文章標籤

DanBrother 發表在 痞客邦 留言(0) 人氣(72)

  • 個人分類:Oracle SQL Tuning
▲top
  • 1月 09 週四 201416:56
  • PL/SQL Interpreted & Native Compilation Comparison Testing

PL/SQL Interpreted & Native Compilation Comparison Testing
conn testuser
Enter password:
Connected.
(繼續閱讀...)
文章標籤

DanBrother 發表在 痞客邦 留言(0) 人氣(21)

  • 個人分類:Oracle SQL Tuning
▲top
  • 1月 09 週四 201414:30
  • Oracle 11g: PL/SQL native compilation know-how

Oracle 11g: PL/SQL native compilation know-how

Start with Oracle 11gR1, PL/SQL native compiler can generate native code (machine code) directly, instead of translating it to C programs and have the C compiler generate native code as of Oracle 9i and 10g do.
Thus, the performance can be enhanced significantly.
The natively compiled program units are stored within the database in the SYSTEM tablespace.
(繼續閱讀...)
文章標籤

DanBrother 發表在 痞客邦 留言(0) 人氣(57)

  • 個人分類:Oracle SQL Tuning
▲top
  • 5月 18 週五 201217:10
  • Query sessions that are being locked

Query sessions that are being locked:
select s.username as username,
s.program as program,
s.osuser as osuser,
s.sid as sid,
s.serial# as serial#,
s.logon_time as logon_time
from v$locked_object o, v$session s
where o.session_id = s.sid
order by s.logon_time;
Query SQL Text for locked session:
select t.sql_text as sql_text
from v$session s, v$sqltext_with_newlines t
where decode(a.sql_hash_value,0,prev_hash_value,sql_hash_value) = b.hash_value
and a.sid = '{get_from_above}'
order by piece;
Kill locked session by using:
alter system kill session 'sid ,serial# ';
(繼續閱讀...)
文章標籤

DanBrother 發表在 痞客邦 留言(0) 人氣(3)

  • 個人分類:Oracle SQL Tuning
▲top
  • 1月 05 週四 201211:16
  • Tuning SQL Statement using DBMS_XPLAN Package (11g)


For AWR (Automatic Workload Repository) Report (generated by running $ORACLE_HOME/rdbms/admin/awrrpt.sql), it's convenient to have SQL IDs listed for tuning any particular sql statement.
DISPLAY_AWR Function of DBMS_XPLAN Package
Its syntax is as follows:
DBMS_XPLAN.DISPLAY_AWR(
   sql_id                             IN VARCHAR2,
   plan_hash_value    IN  NUMBER       DEFAULT NULL,
   db_id                              IN  NUMBER      DEFAULT NULL,
   format                           IN  VARCHAR2 DEFAULT TYPICAL);
To display the execution plans associated with the SQL ID '3pw0jftkr7u42';
SELECT * FROM table(DBMS_XPLAN.DISPLAY_AWR('3pw0jftkr7u42'));
(繼續閱讀...)
文章標籤

DanBrother 發表在 痞客邦 留言(0) 人氣(39)

  • 個人分類:Oracle SQL Tuning
▲top
1

廣告

個人資訊

DanBrother
暱稱:
DanBrother
分類:
數位生活
好友:
累積中
地區:

熱門文章

  • (58,074)祝福禱告文-為工作祝福
  • (49,259)Excel 2007 中文字顯示亂碼之修復步驟
  • (2,928)ORA-24247: 存取控制清單 (ACL) 拒絕網路存取
  • (626)OSQL公用程式的使用方法
  • (456)Oracle11g Tracefile Housekeeping by ADRCI (Automatic Diagnostic Repository Command Interpreter)
  • (135)FORFILES command to remove older files or folders (Windows Server 2008)
  • (69)srvctl command usage
  • (19)Use EVERYDAY_WINDOW for DEFAULT_MAINTENANCE_PLAN
  • (17)Re-Installation Issue: you do not have sufficient permissions to access the inventory
  • (5)RPM & SRPM

文章分類

  • Android (1)
  • Java (1)
  • MongoDB (1)
  • MariaDB (7)
  • Python (10)
  • HTML (1)
  • ORDS (1)
  • Apache Tomcat (1)
  • Oracle Streams (1)
  • Javascript (1)
  • Oracle Data Guard (2)
  • Oracle VirtualBox (3)
  • Grid Infrastructure (4)
  • Oracle SQL Tuning (6)
  • OEM11g / 12c (28)
  • IT Links (1)
  • 心靈饗宴 (161)
  • Oracle Clusterware (5)
  • ORACLE RAC (21)
  • Oracle ASM (18)
  • Oracle Export/Import (10)
  • MySQL (22)
  • Windows Series (18)
  • Oracle HTTP Server (8)
  • Linux (49)
  • Microsoft Office (6)
  • SQL SERVER (19)
  • Install Apache & PHP (2)
  • Oracle in General (111)
  • RMAN (15)
  • SQL / PL/SQL (30)
  • 未分類文章 (1)

最新文章

  • MySQL Array Simulation in Stored Procedure
  • Extracts, orders, and then prints grants for MySQL user accounts (pt-show-grants)
  • MySQL Stored Procedure - Nested Loop Example
  • Metabase H2 DB Migration to MySQL 5.7
  • Steps for Upgrading Percona-Toolkit to the Latest Version
  • MySQL Slave - Skip Replication for A Particular Table
  • MySQL - Export & Import Table Data Based on the SQL Query
  • MySQL Table Fragmentation Detection and De-fragmentation Implementation
  • Multiple Log File Viewer (Linux Bash)
  • Solving MySQL slave lag Issues

最新留言

  • [21/08/16] jwang0189 於文章「祝福禱告文-為工作祝福...」留言:
    非常實用的文章,謝謝提供,已點廣告表示支持 https://...
  • [20/04/23] 廣利 於文章「祝福禱告文-為工作祝福...」留言:
    129:8 過路的也不說,願耶和華所賜的福,歸於你們;我們在...
  • [17/10/30] 66國語言翻譯公司 於文章「Download Google Chro...」留言:
    不了走會點中見你隻有果新家而去十走相隻把見作樣 95國...
  • [17/05/06] 50國語言翻譯公司 於文章「Python >>> a, b = b...」留言:
    之的不會然文道果三那大這年來來年物月用理學, 115國...
  • [16/10/13] KK 於文章「How to Change Defaul...」留言:
    感謝您分享的工作禱詞! 真的太感謝了!! 願 平安...
  • [15/08/23] 洪秀柱 於文章「如何在UltraEdit中正常顯示韓文?...」留言:
    此破解法可用於 UEstudio UltraEdit V2...

動態訂閱

文章精選

文章搜尋

誰來我家

參觀人氣

  • 本日人氣:
  • 累積人氣:

留言板