If the synonyms are missing, then he has bigger problems
than a perl script not working, as a number of other problems
may appear in the database.


Jared

On Friday 01 June 2001 17:16, Michael A. Chase wrote:
> Along with the other problems already mentioned (grants and ""
> interpolation), you might not have a synonym defined for the view.  The
> base views are actually in the form V_$% in the SYS schema (e.g.,
> sys.v_$database).
>
> use strict and -w are almost always good ideas.
>
> $DBI::errstr always referees to the most recently used DBI handle's errstr.
> --
> Mac :})
> ** I normally forward private database questions to the DBI mail lists. **
> Give a hobbit a fish and he'll eat fish for a day.
> Give a hobbit a ring and he'll eat fish for an age.
> ----- Original Message -----
> From: "Linda Xu" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 01, 2001 14:05
> Subject: ORA-00942 when query from Dynamic view table
>
> > I need to get information from V$ dynamic table from Oracle. But receive
>
> an
>
> > Orac-00942 error : table or view not exists
> > I am using system as connect user.
> >
> > Here is my code:
> >
> > use DBI;
> >
> > $dbuser='system/manager';
> > $dbh=DBI->connect('dbi:Oracle:host=X.X.X.X;sid=X;port=1521', $dbuser,'')
> >           or die "Cannot connect to database: $DBI::errstr";
> > $dbh->{RaiseError}=1;
> >
> > $locksql=$dbh->prepare ("select to_char(sysdate, 'mm/dd/yy hh24:mi:ss')
> > ,s.machine, s.program, l.sid, l.addr,l.kaddr,l.type,
> > l.id1,l.id2,l.lmode, l.request, l.ctime, l.block
> >                         from v$session s, v$lock l  where s.sid=l.sid")
> >                         or die "Cannot prepare: ".$dbh->errstr();
> > $locksql->execute() or die "Cannot execute: ".$locksql->errstr();
> > @lock = $locksql->fetchrow_array;
> > print @lock;
> >
> >
> > Does any body know how to query from V$ dynamic table?
> >
> > TKS
> >
> > Linda XU
> > Oracle DBA
> > General Magic
> > [EMAIL PROTECTED]

Reply via email to