Script: To Display Active Transactions in Rollback Segments_1019467.6
Script: To Display Active Transactions in Rollback Segments (Doc ID 1019467.6)
Abstract | |
---|---|
This script displays active transactions (by user and terminal) in rollback segments. |
|
Product Name, Product Version |
Oracle Server, 7.3.4 to 10.2 |
Platform | Platform Independent |
Date Created | 08-Jul-1996 |
Instructions | |
Execution Environment: SQL, SQL*Plus Access Privileges: Requires DBA access privileges to be executed. Usage: sqlplus user/ |
|
Description | |
The following is a short script which returns the username, OS login name and terminal from the dynamic performance tables for any user with a lock on a rollback segment. |
|
References | |
|
|
Script | |
SET ECHO off REM NAME: TFSATRBS>SQL REM USAGE:"@path/tfsatrbs" REM -------------------------------------------------------------------------- REM REQUIREMENTS: REM SELECT privileges on v$rollback tables REM -------------------------------------------------------------------------- REM PURPOSE: REM The purpose of this script is to show the current holders of locks REM in rollback segments. The script will display both Oracle username REM and the OS username for each lock. REM -------------------------------------------------------------------------- REM Main text of script follows: column rr heading 'RB Segment' format a18 column us heading 'Username' format a15 column os heading 'OS User' format a10 column te heading 'Terminal' format a10 SELECT r.name rr, nvl(s.username,'no transaction') us, s.osuser os, s.terminal te FROM v$lock l, v$session s,v$rollname r WHERE l.sid = s.sid(+) AND trunc(l.id1/65536) = r.usn AND l.type = 'TX' AND l.lmode = 6 ORDER BY r.name / ============== Sample Output: ============== RB Segment Username OS User Terminal --------------- --------------- ---------- ---------- R01 SCOTT usupport ttyq1 |
|
Disclaimer | |
EXCEPT WHERE EXPRESSLY PROVI DED OTHERWISE, THE INFORMATION, SOFTWARE, PROVIDED ON AN "AS IS" AND "AS AVAILABLE" BASIS. ORACLE EXPR ESSLY DISCLAIMS ALL WARRANTIES OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ORACLE MAKES NO WARRANTY THAT: (A) THE RESULTS THAT MAY BE OBTAINED FROM THE USE OF THE SOFTWARE WILL BE ACCURATE OR RELIABLE; OR (B) THE INFORMATION, OR OTHER MATERIAL OBTAINED WILL MEET YOUR EXPECTATIONS. ANY CONTENT, MATERIALS, INFORMATION OR SOFTWARE DOWNLOADED OR OTHERWISE OBTAINED IS DONE AT YOUR OWN DISCRETION AND RISK. ORACLE SHALL HAVE NO RESPONSIBILITY FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR LOSS OF DATA THAT RESULTS FROM THE DOWNLOAD OF ANY CONTENT, MATERIALS, INFORMATION OR SOFTWARE. ORACLE RESERVES THE RIGHT TO MAKE CHANGES OR UPDATES TO THE SOFTWARE AT ANY TIME WITHOUT NOTICE. |
|
Limitation of Liability | |
IN NO EVENT SHALL ORACLE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES, OR DAMAGES FOR LOSS OF PROFITS, REVENUE, DATA OR USE, INCURRED BY YOU OR ANY THIRD PARTY, WHETHER IN AN ACTION IN CONTRACT OR TORT, ARISING FROM YOUR ACCESS TO, OR USE OF, THE SOFTWARE. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OR EXCLUSION OF LIABILITY. ACCORDINGLY, SOME OF THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU. |
|
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-1136163/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [Oracle Script] Rollback Segment UsageOracle
- [Oracle Script] check active sessionOracleSession
- Script to Collect Data Guard Physical and Active Standby Diagnostic InformationORM
- fast_start_parallel_rollback與v$fast_start_servers和v$fast_start_transactionsASTParallelServer
- Transactions and beyond it..
- SESSIONS, PROCESSES, TRANSACTIONSSession
- fast_start_parallel_rollback和並行rollbackASTParallel並行
- Commit Transactions (143)MIT
- Overview of Autonomous Transactions (150)View
- display:flex與display:box 區別Flex
- Shipping Transactions Date 相關
- rollback相關知識
- display:flex和display:box的區別Flex
- tabBar DisplaytabBar
- Script
- parallel rollback引數總結Parallel
- SMON故障造成的parallel rollbackParallel
- active sqlSQL
- Fragment Transactions和Activity狀態丟失Fragment
- MySQL 5.5 -- Metadata Locking Within TransactionsMySql
- css之displayCSS
- export DISPLAY=:0.0Export
- Script Browser & Script Analyzer 1.3更新發布
- 執行計劃函式display和display_cursor函式
- DISPLAY 尚未設定。請設定 DISPLAY 後重試。
- Shell Script
- shell script
- oracle scriptOracle
- script win
- bat scriptBAT
- 引數FAST_START_PARALLEL_ROLLBACKASTParallel
- Oracle redo undo commit rollback剖析Oracle RedoMIT
- MySQL儲存過程SAVEPOINT ROLLBACK toMySql儲存過程
- [Active Learning] Multi-Criteria-based Active Learning
- Oracle 19c Concepts(10):TransactionsOracle
- Laravel 之巢狀事務 transactions 實現Laravel巢狀
- limit active sessionsMITSession
- css display 屬性CSS