Oracle修改提示符方法sqlplus启动的时候会读取glogin.sql脚本,在$Oracle_HOME/sqlplus/admin目录中,写在里面就可以了。给你个例子。[php]---- 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 compatibilitySET SERVEROUTPUT ON SIZE 1000000SET TRIMSPOOL ONSET LONG 5000SET LINESIZE 100SET PAGESIZE 9999SET SQLPLUSCOMPATIBILITY 8.1.7COLUMN global_name new_value gnameSET TERMOUT OFFselect lower(user) || "@" || decode(global_name,"Oracle8.WORLD","8.0","ORA8I.WORLD","8i",global_name) global_name from global_name;SET SQLPROMPT "&gname>"SET TERMOUT ON-- Used by Trusted OracleCOLUMN ROWLABEL FORMAT A15-- Used for the SHOW ERRORS commandCOLUMN LINE/COL FORMAT A8COLUMN ERROR FORMAT A65 WORD_WRAPPED-- Used for the SHOW SGA commandCOLUMN name_col_plus_show_sga FORMAT a24-- Defaults for SHOW PARAMETERSCOLUMN name_col_plus_show_param FORMAT a36 HEADING NAMECOLUMN value_col_plus_show_param FORMAT a30 HEADING VALUE-- Defaults for SET AUTOTRACE EXPLAIN reportCOLUMN id_plus_exp FORMAT 990 HEADING iCOLUMN parent_id_plus_exp FORMAT 990 HEADING pCOLUMN plan_plus_exp FORMAT a80COLUMN object_node_plus_exp FORMAT a8COLUMN other_tag_plus_exp FORMAT a29COLUMN other_plus_exp FORMAT a44[/php]D:Temp>;sqlplusSQL*Plus: Release 9.2.0.4.0 - Production on Tue Dec 16 12:07:06 2003Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.Enter user-name: scott/tiger@ora921.hl3Connected to:Oracle9i Enterprise Edition Release 9.2.0.4.0 - ProductionWith the Partitioning, OLAP and Oracle Data Mining optionsJServer Release 9.2.0.4.0 - ProductionWelcome to Seraphim"s SQL*PLUS!You are connected to ORA921.IAGENT as SCOTTSQL>;实现这种效果,在glogin.sql中加入以下行:set heading offprompt Welcome to Seraphim"s SQL*PLUS!select "You are connected to " || global_name || " as " || user from global_name;set serveroutput onset heading on或COLUMN host_name new_value hnameSET TERMOUT OFFselect SYS_CONTEXT("USERENV","HOST") host_name from dual;SET SQLPROMPT "&hname>;"SET TERMOUT ONMySQL修改root密码的各种方法整理Oracle数据库访问参数文件的顺序相关资讯 oracle
- [INS-32052] Oracle基目录和Oracle (07/22/2014 07:41:41)
- Oracle 4个大对象(lobs)数据类型 (02/03/2013 12:33:05)
- Oracle按时间段分组统计 (07/26/2012 10:36:48)
| - [Oracle] dbms_metadata.get_ddl的 (07/12/2013 07:37:30)
- Liferay Portal 配置使用Oracle和 (07/31/2012 20:07:18)
- Concurrent Request:Inactive (07/20/2012 07:44:05)
|
本文评论 查看全部评论 (0)