Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Permission problem on v$datafile, v$logfile, v$controlfile

Re: Permission problem on v$datafile, v$logfile, v$controlfile

From: Andrew May <amay_at_home.com>
Date: Tue, 23 Feb 1999 03:58:32 GMT
Message-ID: <36D227AE.C48F6855@home.com>


I hope this is not too obvious. Did you try backslashing the $ ?

Gerry West wrote:
>
> Hi All,
>
> I am having problems accessing the v$ tables from a unix Bourne shell
> script.
> Obviously this is a permissions problem.
> Oracle Tech support has not been a great help on this.
>
> So far I have:
>
> grant select on v_$datafile to system;
> grant select on v_$logfile to system;
> grant select on v_$controlfile to system;
>
> I have tried executing my script as SYS and SYSTEM from the oracle8 unix id
> and
> I get the Oracle error: ORA-00942 table or view does not exist.
>
> If I select from the above v$ tables via a stored procedure or sqlplus it
> works,
> the v$ tables are found.
>
> Below is this simple script that creates another script to perform part of a
> cold backup.
> $1 and $2 being sys/password or system/password.
>
> #!/bin/sh
>
> ORACLE_HOME=.usr/oracle8/product
> ORACLE_SID=nvod
> export ORACLE_HOME
> export ORACLE_SID
>
> $ORACLE_HOME/bin/sqlplus $1/$2 << ENDIT > run_cold_backup.sql
> set echo off
> set heading off
>
> select 'cp '|| name || '/destination_dir' from v$datafile;
> select 'cp '|| member || '/destination_dir' from v$logfile;
> select 'cp '|| name || '/destination_dir' from v$controlfile;
>
> ENDIT
> exit
>
> Thanks in advance,
> Gerry
Received on Mon Feb 22 1999 - 21:58:32 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US