Basically Im trying to get the output of 'DESC HR.EMPLOYEES' via command line.
I have created a file called 'file.sql'
DESC hr.employees;
exit;
Then I execute this on unix command line:
sqlplus username/password @file.sql
My output looks like this, however I want to eliminate all extra messages and want to see only the relevant query result. Any way this is possible? Basically someway to do a silent login / logoff.
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
I used the -s option with sqlplus. and that eliminated most of the unwanted messages. But I still get ERROR: ORA-28002: the password will expire within 7 days