[root@localhost notify]# cat notify.sh
sqlplus /nolog << EOF
connect system/12345
@names_sid.sql
quit
EOF
[root@localhost notify]# cat names_sid.sql
spool /home/siltech/name.log
select name from v$database
/
spool off
[root@localhost notify]# cat /home/siltech/name.log
NAME
---------
XE
No comments:
Post a Comment