Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: drop user
Since a schema is 'a collection of objects owned by a user', the answer must
be no.
But there are users and then there are users. Oracle itself, for example, has a requirement for particular sets of tables/index/other objects to be stored in the database, and creates 'dummy' users to be their schema owners. For example, OUTLN owns the stored outline tables; PERFSTAT owns the tables needed for statspack to do its stuff. And when you use OEM to manage your databases, you create a 'repository owner' to own the tables needed for the Management Server to do its stuff.
All these users would be visible with a 'select username from dba_users', so they're "real" users -but no-one in their right mind would log on as OUTLN, or expect to do any meaningful database work whilst connected as REPOWNER. Hence, they are at the end of the day, just 'schema placeholders'.
You can take advantage of much the same sort of approach for your own problem: create a user to be the schema holder, create all the requisite objects (tables, etc), grant permissions on those objects to "real" users, and then simply 'alter user <SCHEMA_HOLDER> account lock'. The fact that the schema owner himself is locked out of the database doesn't stop anyone else querying or modifying the contents of the schema owner's tables (provided you did the permission grants properly in the first place).
Regards
HJR
"xx32" <i.dont.want.sp_at_m.com> wrote in message
news:3D9495CB.6060305_at_m.com...
> is it possible to have a schema without a user?
>
Received on Fri Sep 27 2002 - 22:46:16 CDT