LINUX下SQLPLUS等工具的歷史記錄功能
儲存歷史記錄(rlwrap)
vim ~/.bashrc
------------------------------------------------------
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
alias lsnrctl='rlwrap lsnrctl'
vim $oracle_home$\sqlplus\admin\glogin.sql
------------------------------------------------------
define _editor=vim
define gname=idle
set arraysize 1000
set auto off
set line 80
set linesize 120
set feedback on
set pagesize 9999
set newpage none
set long 5000
set trimspool on
-- set timing on
-- set time on
set auto off
set serveroutput on size 1000000 format wrapped
--alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';
--alter session set nls_language=American;
column global_name new_value gname
set termout off
select lower(user)||'@'||substr(global_name,1,
decode(dot,0,length(global_name),dot-1)) global_name
from (select global_name,instr(global_name,'.') dot from global_name);
set sqlprompt '&gname> '
set termout on
column tablespace_name format a15 heading tablespace|name;
column ts_name format a15;
column table_name format a15;
column name format a40;
column owner format a10;
column file_name format a40;
column segment_name format a15;
column segment_type format a15;
column status format a15;
column username format a15;
column user_name format a15;
column program format a40;
column member format a40;
column type format a15;
column object_name format a30;
column grantee format a12;
column granted_role format a20;
column parameter format a35;
column value format a40;
column object_type format a20;
column tablespace_name format a15;
column ts_name format a15;
column table_name format a15;
column name format a40;
column owner format a10;
column file_name format a40;
column segment_name format a15;
column segment_type format a15;
column status format a15;
column username format a15;
column user_name format a15;
column program format a30;
column machine format a30
column member format a40;
column type format a15;
column object_name format a30;
column grantee format a12;
column granted_role format a20;
column parameter format a35;
column value format a40;
column object_type format a20;
column sql_text format a60;
column directory_path format a60;
column directory_name format a30;
column column_name format a30;
column cluster_name format a30;
column clu_column_name format a30;
column tab_column_name format a30;
column dest_name format a20;
column destination format a60;
column database_role format a20;
column switcover_status format a20;
column db_unique_name format a20;
column protection_level format a20;
column recovery_mode format a20;
column platform_name format a40;
column role format a20;
column privilege format a20;
vim ~/.bashrc
------------------------------------------------------
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
alias lsnrctl='rlwrap lsnrctl'
vim $oracle_home$\sqlplus\admin\glogin.sql
------------------------------------------------------
define _editor=vim
define gname=idle
set arraysize 1000
set auto off
set line 80
set linesize 120
set feedback on
set pagesize 9999
set newpage none
set long 5000
set trimspool on
-- set timing on
-- set time on
set auto off
set serveroutput on size 1000000 format wrapped
--alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';
--alter session set nls_language=American;
column global_name new_value gname
set termout off
select lower(user)||'@'||substr(global_name,1,
decode(dot,0,length(global_name),dot-1)) global_name
from (select global_name,instr(global_name,'.') dot from global_name);
set sqlprompt '&gname> '
set termout on
column tablespace_name format a15 heading tablespace|name;
column ts_name format a15;
column table_name format a15;
column name format a40;
column owner format a10;
column file_name format a40;
column segment_name format a15;
column segment_type format a15;
column status format a15;
column username format a15;
column user_name format a15;
column program format a40;
column member format a40;
column type format a15;
column object_name format a30;
column grantee format a12;
column granted_role format a20;
column parameter format a35;
column value format a40;
column object_type format a20;
column tablespace_name format a15;
column ts_name format a15;
column table_name format a15;
column name format a40;
column owner format a10;
column file_name format a40;
column segment_name format a15;
column segment_type format a15;
column status format a15;
column username format a15;
column user_name format a15;
column program format a30;
column machine format a30
column member format a40;
column type format a15;
column object_name format a30;
column grantee format a12;
column granted_role format a20;
column parameter format a35;
column value format a40;
column object_type format a20;
column sql_text format a60;
column directory_path format a60;
column directory_name format a30;
column column_name format a30;
column cluster_name format a30;
column clu_column_name format a30;
column tab_column_name format a30;
column dest_name format a20;
column destination format a60;
column database_role format a20;
column switcover_status format a20;
column db_unique_name format a20;
column protection_level format a20;
column recovery_mode format a20;
column platform_name format a40;
column role format a20;
column privilege format a20;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22558114/viewspace-1086379/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- linux 清空歷史執行記錄Linux
- Linux檢視歷史記錄小技巧Linux
- 修改Kali Linux終端歷史記錄大小Linux
- Chrome Extension 歷史記錄、下載記錄和儲存管理Chrome
- TcxMRUEdit 最近歷史記錄
- Linux中多種方法實時記錄歷史命令Linux
- Dynamics CRM 在表單上顯示更改歷史記錄(稽核歷史記錄)
- win10怎樣看歷史記錄_win10檢視歷史記錄的方法Win10
- 如何禁止input輸入的歷史記錄?
- linux系統安全問題,如何清除你的cli操作歷史記錄Linux
- Linux下快速執行歷史命令的方法Linux
- git log檢視提交歷史記錄Git
- EBS:銷售訂單歷史記錄
- 查詢SQL Server的歷史執行記錄SQLServer
- 清除 GitHub 歷史記錄的隱私資訊Github
- 清除“遠端桌面連線”的歷史記錄
- win10怎麼清除更新歷史記錄 win10電腦如何清除更新歷史記錄Win10
- 透過歷史記錄執行本地模型模型
- Git 學習記錄之演變歷史Git
- ClipboardManager for Mac(剪貼簿歷史記錄管理)Mac
- win10如何關閉工作列歷史記錄_win10工作列歷史記錄怎麼關閉Win10
- win10如何關閉活動歷史記錄_win10系統關閉活動歷史記錄的步驟Win10
- Win10系統下剪貼簿歷史記錄失效的解決方法Win10
- 【工具】火狐瀏覽器歷史版本下載瀏覽器
- Git新手教程-檢視倉庫的歷史記錄(四)Git
- 使用 JavaScript 操作瀏覽器歷史記錄 APIJavaScript瀏覽器API
- SqlServer查詢資料改動歷史記錄SQLServer
- Linux發展歷史Linux
- 一次保留訂單歷史記錄的方案討論
- Mac上的Safari瀏覽器如何檢視歷史記錄?Mac瀏覽器
- 7 個實用的操作 Bash 歷史記錄的快捷方式
- 如何刪除遠端桌面歷史連線記錄
- git-清空歷史提交記錄(保留原倉庫)Git
- [20211220]記錄使用sqlplus的小問題.txtSQL
- 你應該知道的Linux歷史Linux
- Win10系統下如何顯示或禁用App購買歷史記錄Win10APP
- win10 自帶播放器有歷史記錄嗎_windows10自帶的影片播放器怎麼檢視歷史記錄Win10播放器Windows
- win10 自帶播放器有歷史記錄嗎_windows10自帶的視訊播放器怎麼檢視歷史記錄Win10播放器Windows
- 如何下載jmeter的歷史版本JMeter