[comp.databases] table ownership under Oracle

scott@prism.gatech.EDU (Scott Holt) (06/13/90)

Does anyone know of a quick way to change the ownership of an
Oracle table in release 6.0.30? I had considered simply changing
the appropriate fields in the sys.obj$ table, but I am not 
very comfortable with this since I don't know all the ramifications.

We are migrating to release 6.0.30 from release 5.1.22 and 
are also changing all our accounts to "automatic" (OPS$) in
a database we use for instructional support.

- Scott

dsimson@oracle.com (David Simson) (06/13/90)

> Does anyone know of a quick way to change the ownership of an
> Oracle table in release 6.0.30? I had considered simply changing
> the appropriate fields in the sys.obj$ table, but I am not 
> very comfortable with this since I don't know all the ramifications.

I don't know all the ramifications either, but I'd never do it!

> We are migrating to release 6.0.30 from release 5.1.22 and 
> are also changing all our accounts to "automatic" (OPS$) in
> a database we use for instructional support.

Since you're doing a v5 to v6 upgrade you'll be exporting each user.
Instead of doing a full database export that preserves user names,
export and import each user individually.  That way, when you import
the tables they'll be owned by the new OPS$ user.

> - Scott

Dave Simson
dsimson@oracle.com
(415) 598-8013

scott@prism.gatech.EDU (Scott Holt) (06/14/90)

In article <DSIMSON.90Jun13091737@arthur.oracle.com> dsimson@oracle.com (David Simson) writes:
>
>
>Since you're doing a v5 to v6 upgrade you'll be exporting each user.
>Instead of doing a full database export that preserves user names,
>export and import each user individually.  That way, when you import
>the tables they'll be owned by the new OPS$ user.
>

We had considered this a last resort - the particular database in
question is used for instructional support. Each student (we have
12,000+) is granted an account in the database. Of course, only a few
ever do database course work or pursue independent study with databases,
but there are still 200-300 users with tables in the database. The above
method can get tedious, but I'm sure it too could be automated to some
degree.

- Scott
-- 
This is my signature. There are many like it, but this one is mine.
Scott Holt, Systems Analyst		Internet: scott@prism.gatech.edu
Georgia Tech 				BITNET:	  CCUSESH@GITNVE2
Office of Computing Services		404-894-6168

kbittner@oracle.uucp (Kurt Bittner) (07/06/90)

In article <DSIMSON.90Jun13091737@arthur.oracle.com> dsimson@oracle.com (David Simson) writes:
>
>> Does anyone know of a quick way to change the ownership of an
>> Oracle table in release 6.0.30? I had considered simply changing
>> the appropriate fields in the sys.obj$ table, but I am not 
>> very comfortable with this since I don't know all the ramifications.
>
>I don't know all the ramifications either, but I'd never do it!

I wouldn't do it either.  If you don't want to do the export/import scenario,
grant access to the table to the new user, CREATE tablename as select * from
old_user.tablename, and then drop the old user's table.  This is safer, and 
takes less time than export/import (unless you do the import during the upgrade).

Kurt Bittner@oracle.com

"The only way to re-can a can of worms is to use a larger can."