Re: Export user DDL and privileges?

  • From: Norman Dunbar <oracle@xxxxxxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx, denis.sun@xxxxxxxxx
  • Date: Fri, 27 Jul 2012 07:21:26 +0100

Morning Denis,


On 26/07/12 01:28, Denis wrote:

> rem script: user_cr_ddl.sql
> rem  Purpose: generate create user script with privs
> rem
> rem  Usage: user_cr_ddl <username>
> rem
> rem  Note:
> rem   If ORA-31608 encountered, it means the user does not
> rem   have grants in that category. Edit the spooled script
> rem   as ncessary

A nice script and very timely, I was just in the middle of doing my own 
one - you saved me the bother. Thanks.

I have noticed a possible bug in DBMS_METADATA though. When a user has 
quota on a tablespace, then the generation works OK, but, if the quota 
is unlimited it fails with the ORA-31608 error telling me that there are 
no tablespace quota objects. Hmmm.

I would have assumed that if they were in DBA_TS_QUOTAS that there would 
have been an "object".

Still, it's not the end of the world and I've only tried on on a 10g 
database so far.

Thanks again.

Cheers,
Norm.


-- 
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
Thorpe House
61 Richardshaw Lane
Pudsey
West Yorkshire
United Kingdom
LS28 7EL

Company Number: 05132767


--
//www.freelists.org/webpage/oracle-l


Other related posts: