-
Can some help with the resolution of the following script.
#!/bin/ksh
exec > /home/oracle/dbreport/log.$$
sqlplus -s system/manager@c1n11.world << EOF
column instance_name format a13 heading "INSTANCE_NAME"
column host_name format a13 heading "HOST_NAME"
column startup_time format a13 heading "STARTUP_TIME"
column status format a9 heading "STATUS"
select instance_name, host_name, startup_time, status from v$instance
/
exit
EOF
ERROR RETURN
select instance_name, host_name, status from v
*
ERROR at line 1:
ORA-00942: table or view does not exist
-
Add sys as a qualifier to V$INSTANCE.
Also grant SELECT privilege to system.
-
I made the changes but the error continues.
select instance_name, status from sys.v
*
ERROR at line 1:
ORA-00942: table or view does not exist
Guys please duplicate this script and see if you can fix it. Thanks.
Oisaya
-
Hello
v$instance is a synonym created on the view sys.v_$instance. You can try to change the sctipr so it looks like this.
select
instance_name,
host_name,
startup_time,
status from sys.v_$instance
I tried this and it works. I am not sure why you can't run the script as you have wrote it connecting as system/manager because that owner should have select privileges on any table or view.
Don't be afraid to try something new. Amateurs built the Ark, professionals built the Titanic
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|