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

Home -> Community -> Usenet -> comp.databases.oracle -> Re: Run SQL Script under SYS for other Schema

Re: Run SQL Script under SYS for other Schema

From: Frank van Bortel <fvanbortel_at_netscape.net>
Date: Thu, 08 Jan 2004 21:34:26 +0100
Message-ID: <btkeaf$99l$1@news4.tilbu1.nb.home.nl>

Jeff Lambert wrote:

> Using Oracle 8i on Win2k. Here's my problem:
>
> I can connect with SYS and can select from any table from schema JEFFX
> by prefixing tables with said schema name. eg: SELECT * FROM
> JEFFX.PROJ;
>
> However I want to run a "recompile all invalid objects" script on my
> JEFFX user / schema. Namely, RDBMS\ADMIN\utlrp.sql. Running it under
> SYS yields no errors. When I try to run it when connected as JEFFX, I
> get errors such as:
>
> PLS-00201: identifier 'OBJ$' must be declared
>
> The user JEFFX has very limited rights indeed and that's how I want to
> keep it. I want to be able to run the script under SYS but for the
> JEFFX schema. I tried this command:
>
> ALTER SESSION SET CURRENT_SCHEMA = JEFFX;
>
> But it doesn't do much it seems? In fact it's like I'm back to using
> the stripped down user, right? I'm sure there's a very simple
> explanation to this. I'm also willing to add the required right to
> this user provided it doesn't turn him into a full blown DBA.
>
> Thanks in advance!
>
> Jeff Lambert
> Hypershell, Inc.

dbms_utility.recompile_schema('JEFFX', false);

-- 

Regards,
Frank van Bortel
Received on Thu Jan 08 2004 - 14:34:26 CST

Original text of this message

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