DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: V$instance error

  1. #1
    Join Date
    Oct 2000
    Posts
    42
    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

  2. #2
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    Add sys as a qualifier to V$INSTANCE.

    Also grant SELECT privilege to system.

  3. #3
    Join Date
    Oct 2000
    Posts
    42
    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

  4. #4
    Join Date
    Oct 2000
    Location
    Halifax, Nova Scotia
    Posts
    197
    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
  •  


Click Here to Expand Forum to Full Width