IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    Oracle Database 11g:修改SQLPLUS提示符

    Adamhuan发表于 2016-12-26 09:18:13
    love 0

    具体如下:

    [oracle@ora11gdg1 ~]$ ls -ltr $ORACLE_HOME/sqlplus/admin | grep glogin.sql
    -rw-r--r-- 1 oracle oinstall  368 Apr 10  2011 glogin.sql
    [oracle@ora11gdg1 ~]$ 
    [oracle@ora11gdg1 ~]$ cat $ORACLE_HOME/sqlplus/admin/glogin.sql
    --
    -- Copyright (c) 1988, 2011, Oracle and/or its affiliates. 
    -- All rights reserved. 
    --
    -- NAME
    --   glogin.sql
    --
    -- DESCRIPTION
    --   SQL*Plus global login "site profile" file
    --
    --   Add any SQL*Plus commands here that are to be executed when a
    --   user starts SQL*Plus, or uses the SQL*Plus CONNECT command.
    --
    -- USAGE
    --   This script is automatically run
    --
    [oracle@ora11gdg1 ~]$ 
    [oracle@ora11gdg1 ~]$ vi $ORACLE_HOME/sqlplus/admin/glogin.sql
    [oracle@ora11gdg1 ~]$ cat $ORACLE_HOME/sqlplus/admin/glogin.sql
    --
    -- Copyright (c) 1988, 2011, Oracle and/or its affiliates. 
    -- All rights reserved. 
    --
    -- NAME
    --   glogin.sql
    --
    -- DESCRIPTION
    --   SQL*Plus global login "site profile" file
    --
    --   Add any SQL*Plus commands here that are to be executed when a
    --   user starts SQL*Plus, or uses the SQL*Plus CONNECT command.
    --
    -- USAGE
    --   This script is automatically run
    --
    
    set sqlprompt "_user'@'_connect_identifier --> "
    [oracle@ora11gdg1 ~]$ 
    [oracle@ora11gdg1 ~]$ sqlplus / as sysdba
    
    SQL*Plus: Release 11.2.0.4.0 Production on Mon Dec 26 17:13:05 2016
    
    Copyright (c) 1982, 2013, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SYS@dbaplus --> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [oracle@ora11gdg1 ~]$

    ——————————————
    Done。



沪ICP备19023445号-2号
友情链接