- 论坛徽章:
- 3
|
还是用sqlplus自身的方法来解决吧
写一个head.sql
more head.sql
set line 145
set pages 99
set line 1500
set feed off
alter session set nls_date_format='YYYY-MM-DD HH24:MI:SS';
set feed on
set time on
set timi on
select sysdate from dual;
more conn
#!/bin/ksh
export ORACLE_SID=TESTDB
sqlplus " / as sysdba" @head.sql
sh conn
SQL*Plus: Release 10.2.0.4.0 - Production on Thu Jun 21 12:52:01 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SYSDATE
-------------------
2012-06-21 12:52:01
1 row selected.
Elapsed: 00:00:00.00
12:52:01 SQL> |
|