基本上我試圖通過命令行獲得'DESC HR.EMPLOYEES'的輸出。消除從命令行執行的sqlplus查詢中的不需要的消息
我創建了一個名爲「file.sql」
DESC hr.employees;
exit;
然後我在UNIX命令行中執行此文件:
sqlplus username/password @file.sql
我的輸出看起來是這樣,但我想消除所有額外的消息,並希望只看到相關的查詢結果。這有可能嗎?基本上可以做一個沉默的登錄/註銷。
SQL*Plus: Release 12.1.0.1.0 Production on Mon Sep 15 19:04:53 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
ERROR:
ORA-28002: the password will expire within 7 days
Last Successful login time: Mon Sep 15 2014 19:04:06 -04:00
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
Name Null? Type
----------------------------------------- -------- ----------------------------
EMPLOYEE_ID NOT NULL NUMBER(6)
FIRST_NAME VARCHAR2(20)
LAST_NAME NOT NULL VARCHAR2(25)
EMAIL NOT NULL VARCHAR2(25)
PHONE_NUMBER VARCHAR2(20)
HIRE_DATE NOT NULL DATE
JOB_ID NOT NULL VARCHAR2(10)
SALARY NUMBER(8,2)
COMMISSION_PCT NUMBER(2,2)
MANAGER_ID NUMBER(6)
DEPARTMENT_ID NUMBER(4)
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
我在sqlplus中使用了-s選項。並消除了大部分不需要的消息。但我仍然得到ERROR: ORA-28002: the password will expire within 7 days
好的我用sqlplus的-s選項。並消除了大部分不需要的消息。但我仍然得到 錯誤: ORA-28002:密碼將在7天內過期 – Nikhil 2014-09-23 06:39:28
請勿在註釋中添加其他信息。相反,你應該*編輯你的問題*,使其更好,更清晰。 – APC 2014-09-23 07:56:26
類似的問題在這裏http://stackoverflow.com/questions/1095871/how-do-i-turn-off-oracle-password-expiration – 2014-09-23 07:59:30