The DBMS_System Package
The DBMS_System Package
The DBMS_System package contains a number of routines that can be useful on occasion. Oracle clearly state that these routines are not supported so proceed at your own risk.
ksdwrt
Used to write messages to the alertlog and/or trace files.
EXEC DBMS_System.ksdwrt(n, message); EXEC DBMS_System.ksdwrt(2, 'My Test Alertlog Message');
Where the value of "n" indicates the destination.
- 1 - Write to trace file.
- 2 - Write to alertlog.
- 3 - Write to both.
Set_Sql_Trace_In_Session
Used to set trace on or off in another users session.
EXEC DBMS_System.Set_Sql_Trace_In_Session(sid, serial#, true ); EXEC DBMS_System.Set_Sql_Trace_In_Session(31, 97, true );
The values for SID and SERIAL# can be found using the V$SESSION view.
Set_Ev
Used to set trace on for a specific event.
EXEC DBMS_System.Set_Ev(sid, serial#, event, level, name); EXEC DBMS_System.Set_Ev(31, 97, 10046, 4, '');
Where level indicates the following levels of trace.
- 1 - Standard SQL_TRACE functionality.
- 4 - As level 1 plus tracing of bind variables.
- 8 - As level 1 plus wait events.
- 12 - As level 1 plus bind variables and wait events.
Read_Ev
Used to check if a specific event is currently being traced.
EXEC DBMS_System.Read_Ev(event, output);
If output = 1 the event is being traced.
Hope this helps. Regards Tim...
url:http://www.oracle-base.com/articles/8i/dbms_system.php
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9838838/viewspace-1131584/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 使用dbms_system 追蹤sqlSQL
- not an rpm package (or package manifest):Package
- not an rpm package (or package manifest)Package
- packagePackage
- Package Specification 和 Package Body 及 Package有什麼區別? (轉)Package
- 深入安卓Package Manager和Package Installer安卓Package
- 建立packagePackage
- Package ssh is not available, but is referred to by another package 錯誤PackageAI
- ORA-04042 procedure, function, package, or package body does not existFunctionPackage
- java 包(package)JavaPackage
- alter package/procedurePackage
- Package and ClassPath (轉)Package
- flutter package get 卡FlutterPackage
- Go package time 用法GoPackage
- yum error - package is a duplicate withErrorPackage
- package.jsonPackageJSON
- utl_mail packageAIPackage
- Oracle 基礎 ----packageOraclePackage
- Rust Package Manager:CargoRustPackageCargo
- java中不帶package和帶package的編譯執行方式JavaPackage編譯
- 包頭(Package)與包體(Package body)的學習與應用Package
- Laravel Package 中文文件LaravelPackage
- Android APIs (Package Index)AndroidAPIPackageIndex
- Go package(1) time 用法GoPackage
- github package的使用教程GithubPackage
- PL/SQL 09 包 packageSQLPackage
- create a nodejs npm packageNodeJSNPMPackage
- SSIS Package 命名規則Package
- deploy package outside of jbossPackageIDE
- Java_util_package(轉)JavaPackage
- 在OpenWrt中新增packagePackage
- 如何處理Eclipse錯誤訊息 The declared package does not match the expected packageEclipsePackage
- package.json詳解PackageJSON
- package.json 詳解PackageJSON
- golang package time 用法詳解GolangPackage
- package.json 入門PackageJSON
- Vagrant package 打包 Homestead boxPackage
- Python Package Import 之痛PythonPackageImport