Linux记录sqlplus密码,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;

columnprivilege format a20;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值