473,394 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Run SQL Script under SYS for other Schema

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.
Jul 19 '05 #1
4 8771
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

Jul 19 '05 #2
je***@hypershell.com (Jeff Lambert) wrote in message news:<f1**************************@posting.google. com>...
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.


Note this group has been superceded by comp.databases.oracle.* (where
* is server for this type of question).

http://download-west.oracle.com/docs.../doc/index.htm

http://groups.google.com/groups?hl=e...rn.newsguy.com

jg
--
@home.com is bogus.
http://www.automobilemag.com/auto_sh..._chevcorvette/
Jul 19 '05 #3
> Note this group has been superceded by comp.databases.oracle.* (where
* is server for this type of question).
Allright see I always thought the server NG was for actual "physical"
server maintenance. I'm sorry I'm just a C++ programmer trying to play
the role of a DBA. I'll keep it in mind for future posts.
http://download-west.oracle.com/docs.../doc/index.htm

http://groups.google.com/groups?hl=e...rn.newsguy.com


Perfect! Thank you.
Jul 19 '05 #4
Jeff Lambert wrote:
Note this group has been superceded by comp.databases.oracle.* (where
* is server for this type of question).
Allright see I always thought the server NG was for actual "physical"
server maintenance. I'm sorry I'm just a C++ programmer trying to play
the role of a DBA. I'll keep it in mind for future posts.


In those cases, you want to head for comp.databases.oracle.misc Since
cdo itself was voted out in the mid 90's, some ISPs don't carry it and
some of our senior people don't have direct access.
http://download-west.oracle.com/docs.../doc/index.htm

http://groups.google.com/groups?hl=e...rn.newsguy.com


Perfect! Thank you.


One minor additional point: SYS is superuser, SYSTEM is 'master' DBA.
If at all possible avoid using SYS (simply because a slip of the fingers
could destroy your database).
Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: wishkid via DBMonster.com | last post by:
hey guys i would be really appriciate if any of u guys can share a script with me which check each database wether they take backups.since we dont need to check the intigrity of the backps,script ...
6
by: Ollie Riches | last post by:
Is it possible to generate the t-sql script for a database schema and the data from .Net(C#) at all? Cheers Ollie Riches
3
by: nednieuws | charles | last post by:
I've been asked to send the init-script along with the dump. Where can I find it? -- Regards, Charles.
6
by: bikkaran | last post by:
Hi . I have to write a Shell script like ... IF "select value from tablnema where condition;" = some_value then depending upon the this value I will call some other script.sql This...
9
by: sohan | last post by:
Hi, I want to know how to connect and execute a db2 query from inside a UNIX shell script. Details: We have a unix shell script. We need to execute multiple db2 sql queries from this shell...
0
by: mvsguy | last post by:
I'm running a script from the PC Command Center to a z/OS DB2 at v8.1.5. In mid script, the schema changes, despite my setting it explicitly at the start of the script. Does anyone know what...
4
by: Jeff Lambert | last post by:
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; ...
0
debasisdas
by: debasisdas | last post by:
This code genenates a script to rebuld all the indexes with height greater than 3 for all the users except for SYS user. The script needs to be executed from SYS schema. This can also be executed...
0
debasisdas
by: debasisdas | last post by:
The following script is used to create a read only schema of any existing schema in the same database. The readonly schema is granted only read permisions on the tables and views of the existing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.