Thank you very much! U too, Tommy and Sage. :D Cheers, Mikyung/ "Sage, Christian" wrote: > > Hi, > > simply qualify the table name with the owner's schema name, as in > > SELECT * FROM user1.table1 > > That should do the trick. Alternatively, you could set up a synonym for table1 in >the schema of user2, as in > > CREATE SYNONYM table1 FOR user1.table1 > > and after simply use > > SELECT * FROM table1 > > where connected as user2. That should produce exactly the same result. > > Cheers, > Christian Sage > > -----Ursprüngliche Nachricht----- > Von: M. Jang [mailto:[EMAIL PROTECTED]] > Gesendet am: Dienstag, 18. September 2001 18:16 > An: [EMAIL PROTECTED] > Betreff: Re: Oracle prepare failed? > > Hello, > > I'm sorry to be slightly off topic but how can u access table of > other user? (mean, the syntax) > I made 'user1' and 'user2'. user1 is the owner of table1. > the 'system' granted 'connect' role to user2, and user1 granted > select on table1 to user2. > When user2 tries 'select * from table1', gets the > "ORA00942: table or view does not exist" > while it can see the table1 entry in ALL_TABLES. > > I even granted select_catalog_role to user2 but it did no help. > > Any suggestion? > > Michael Ragsdale wrote: > > > > No, they weren't. However, the username does have "select any table" > > privileges granted to him. I just logged into sqlplus with the same > > username that is in the DBI script and it did indeed work just fine via > > sqlplus. I'm at a loss. ????? > > > > At 04:04 PM 09/17/2001, Dong Wang wrote: > > >are the usernames used in dbi the same as in sqlplus? > > > > > >Since it is a ORA-00942 error, it is possible that > > >1. the user connected through dbi does not own the table > > >2. there is no synonym created for the dbi user so that tables have to be > > >qualified as > > >schema.table_name > > >3. there is no select privilege granted to the dbi user on one of the tables > > > > > > > > > > > > > > > > Dong Wang > > > > Grand Central Networks > > > > [EMAIL PROTECTED] > > > > > > > > >-----Original Message----- > > >From: Michael Ragsdale [mailto:[EMAIL PROTECTED]] > > >Sent: Monday, September 17, 2001 12:01 PM > > >To: [EMAIL PROTECTED] > > >Subject: Oracle prepare failed? > > > > > > > > >I have a query that works just fine in Oracle SQL*Plus, but I receive the > > >following error when run through DBI. Line 35 states: > > > > > >my $sth = $dbh->prepare(qq(SELECT fuser.us_initl, > > > > > >I'm running: Redhat 7.1, > > > Perl 5.6.0, > > > DBI 1.14, > > > DBD::Oracle 1.06 > > > > > >Here is the trace file: > > > > > > DBI 1.14-nothread dispatch trace level set to 2 > > > -> prepare for DBD::Oracle::db (DBI::db=HASH(0x81c17bc)~0x81c17ec > > >'SELECT fuser.us_initl, > > > finventory.inumber, > > > faccounttrans.at_amount, > > > finventory.iposscasenumber, > > > finventory.inotes > > > FROM finventory, > > > fpermittype, > > > ...') > > > !! ERROR: 942 'ORA-00942: table or view does not exist (DBD ERROR: > > >OCIStmtExecute/Describe)' > > > <- prepare= undef at cron.permit_replace.pl line 35. > > > -> DESTROY for DBD::Oracle::st (DBI::st=HASH(0x81c175c)~INNER) > > > <- DESTROY= undef at cron.permit_replace.pl line 66. > > > -> DESTROY for DBD::Oracle::db (DBI::db=HASH(0x81c17ec)~INNER) > > > <- DESTROY= undef at unknown location! > > > -- DBI::END > > > -> disconnect_all for DBD::Oracle::dr > > >(DBI::dr=HASH(0x816e084)~0x81c1804) > > > <- disconnect_all= '' at DBI.pm line 450. > > > -> DESTROY in DBD::_::common for DBD::Oracle::dr > > >(DBI::dr=HASH(0x81c1804)~INNER) > > > <- DESTROY= undef during global destruction. > > > > > > > > >-Mike > > > > -Mike