在使用vi或者vim編輯檔案是,在存檔退出的時候,應該使用:wq或者:x退出,但是有時候可能不小心按了:X,
這時體統會提示:
Enter encryption key:
如果你沒有仔細看提示,比如繼續輸入:x,
Enter encryption key: *
Enter same key again: *
那麼實際上就給這個檔案加密了,下次開啟就會要求你輸入密鍵,例如:
[oracle@ts01 admin]$ vim $ORACLE_HOME/sqlplus/admin/glogin.sql
Enter encryption key: *
--
-- Copyright (c) Oracle Corporation 1988, 2000. All Rights Reserved.
--
-- NAME
-- glogin.sql
--
-- DESCRIPTION
-- SQL*Plus global login startup file.
--
-- Add any sqlplus commands here that are to be executed when a user
-- starts SQL*Plus on your system
--
-- USAGE
-- This script is automatically run when SQL*Plus starts
--
-- For backward compatibility
SET PAGESIZE 14
SET SQLPLUSCOMPATIBILITY 8.1.7
-- Used by Trusted Oracle
COLUMN ROWLABEL FORMAT A15
-- Used for the SHOW ERRORS command
COLUMN LINE/COL FORMAT A8
COLUMN ERROR FORMAT A65 WORD_WRAPPED
-- Used for the SHOW SGA command
COLUMN name_col_plus_show_sga FORMAT a24
-- Defaults for SHOW PARAMETERS
COLUMN name_col_plus_show_param FORMAT a36 HEADING NAME
COLUMN value_col_plus_show_param FORMAT a30 HEADING VALUE
-- Defaults for SET AUTOTRACE EXPLAIN report
COLUMN id_plus_exp FORMAT 990 HEADING i
COLUMN parent_id_plus_exp FORMAT 990 HEADING p
COLUMN plan_plus_exp FORMAT a60
COLUMN object_node_plus_exp FORMAT a8
COLUMN other_tag_plus_exp FORMAT a29
COLUMN other_plus_exp FORMAT a44
set linesize 132
set serveroutput on size 1000000
set timing on
--set trimspool on
set long 5000
set linesize 132
set pagesize 9999
column plan_plus_exp format a80
column global_name new_value gname
set termout off
define gname=idle
column global_name new_value gname
define gname=idle
column global_name new_value gname
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
[oracle@ts01 admin]$
否則就顯示亂碼。
要接觸密碼,步驟如下:
vim file
Enter encryption key: 輸入密碼
:set key=
:w!
例如:
[oracle@ts01 admin]$ vim $ORACLE_HOME/sqlplus/admin/glogin.sql
Enter encryption key: * 輸入密碼
。。。。。。。。檔案本文原文
:set key=
:w! 存檔
現在這個密碼的口令限制就解除了,呵呵。