Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Query v$ views from shell script fail

AljaroFeb 23 2012 — edited Dec 3 2012
Hi everybody,


the query below is runing well with a SQL*PLUS (database is mounted and not open)

SQL> SELECT member FROM v$logfile;

MEMBER
--------------------------------------------------------------------------------
+DATA/testgfi/onlinelog/group_1.298.773871647
+DATA/testgfi/onlinelog/group_2.294.773871647
+DATA/testgfi/onlinelog/group_3.295.773871647



But Giving error if I run it from Shell script ???

$ sqlplus -s '/ as sysdba' << EOF
SELECT member FROM v$logfile;
EOF
SELECT member FROM v
*
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only..


Please help..

Thanks..

Aljaro
This post has been answered by sb92075 on Feb 23 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 31 2012
Added on Feb 23 2012
3 comments
4,550 views