- 论坛徽章:
- 0
|
$ cat foo.pl
#! /usr/bin/perl -w
my @output = `sqlplus / as sysdba << END
select * from v\\\$database;
exit
END
`;
print "@output\n";
$ ./foo.pl
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Nov 6 13:58:21 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL>
DBID NAME CREATED RESETLOGS_CHANGE# RESETLOGS_TI
---------- ------------------ ------------ ----------------- ------------
PRIOR_RESETLOGS_CHANGE# PRIOR_RESETL LOG_MODE CHECKPOINT_CHANGE#
----------------------- ------------ ------------------------ ------------------
ARCHIVE_CHANGE# CONTROLFILE_TY CONTROLFILE_ CONTROLFILE_SEQUENCE#
--------------- -------------- ------------ ---------------------
CONTROLFILE_CHANGE# CONTROLFILE_ OPEN_RESETLOGS VERSION_TIME
------------------- ------------ ---------------------- ------------
.
.
.
. |
|