Home » SQL & PL/SQL » SQL & PL/SQL » Granting Permissions for create type/procedure (Oracle 10g CentOS 5)
Granting Permissions for create type/procedure [message #507830] Wed, 18 May 2011 03:27 Go to next message
Vackar
Messages: 81
Registered: October 2007
Member
Hi,

I have a question regarding how to grant create type and create procedure roles correctly.

Currently if I do this:

create user vackar_temp identified by "123456789";
grant create type  to vackar_temp ;


Then as vackar_temp:

create type temp_col as table of number;


I get the following error:
ORA-01031: insufficient privileges


I've also tried:
grant resource to vackar_temp ;

But that doesn't work either


If I run this:
select
  lpad(' ', 2*level) || granted_role "User, his roles and privileges"
from
  (
  /* THE USERS */
    select 
      null     grantee, 
      username granted_role
    from 
      dba_users
    where
      username like upper('%vackar_temp%')
  /* THE ROLES TO ROLES RELATIONS */ 
  union
    select 
      grantee,
      granted_role
    from
      dba_role_privs
  /* THE ROLES TO PRIVILEGE RELATIONS */ 
  union
    select
      grantee,
      privilege
    from
      dba_sys_privs
  )
start with grantee is null
connect by grantee = prior granted_role;


I can see that the user does have the create type role:
User, his roles and privileges 
------------------------------ 
  VACKAR_TEMP                  
    CREATE TYPE                
    RESOURCE                   
      CREATE CLUSTER           
      CREATE INDEXTYPE         
      CREATE OPERATOR          
      CREATE PROCEDURE         
      CREATE SEQUENCE          
      CREATE TABLE             
      CREATE TRIGGER           
      CREATE TYPE              
    UNLIMITED TABLESPACE     



Does anyone have any advice on this?

Thanks,
Vackaf
Re: Granting Permissions for create type/procedure [message #507832 is a reply to message #507830] Wed, 18 May 2011 03:38 Go to previous messageGo to next message
Littlefoot
Messages: 21824
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Works fine for me:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

SQL> create user pato identified by pato;

User created.

SQL> grant create session,
  2        create type
  3  to pato;

Grant succeeded.

SQL> connect pato/pato@ora10
Connected.

SQL> create type temp_col as table of number
  2  /

Type created.

SQL>
Re: Granting Permissions for create type/procedure [message #507840 is a reply to message #507830] Wed, 18 May 2011 03:53 Go to previous messageGo to next message
Michel Cadot
Messages: 68757
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Always post your Oracle version, with 4 decimals.

Use SQL*Plus and copy and paste your session, the WHOLE session.

Regards
Michel
Re: Granting Permissions for create type/procedure [message #507935 is a reply to message #507840] Wed, 18 May 2011 09:36 Go to previous messageGo to next message
Vackar
Messages: 81
Registered: October 2007
Member
Apologies, this was an error on my part, I misunderstood how my client was working.

It has an option with allows you to select a schema, I thought that this connected you to the schema as the schema owner, but in reality it didn't.

Thanks for looking into this though.

Vackar
Re: Granting Permissions for create type/procedure [message #507994 is a reply to message #507935] Wed, 18 May 2011 15:36 Go to previous messageGo to next message
Littlefoot
Messages: 21824
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Which client is it, if I may ask?

(I hope I'll make Michel's day)
Re: Granting Permissions for create type/procedure [message #508045 is a reply to message #507994] Thu, 19 May 2011 03:19 Go to previous messageGo to next message
Vackar
Messages: 81
Registered: October 2007
Member
DBSolo, it's quite good for most things, but I was caught out this time.

Thanks again for looking into it.

Vackar
Re: Granting Permissions for create type/procedure [message #508052 is a reply to message #508045] Thu, 19 May 2011 03:54 Go to previous messageGo to next message
Littlefoot
Messages: 21824
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Gee, no joy for Michel today.

OK, thank you!
Re: Granting Permissions for create type/procedure [message #508071 is a reply to message #508052] Thu, 19 May 2011 05:27 Go to previous messageGo to next message
Vackar
Messages: 81
Registered: October 2007
Member
Quote:

Gee, no joy for Michel today.


Were you expecting a particular client?
Re: Granting Permissions for create type/procedure [message #508077 is a reply to message #508071] Thu, 19 May 2011 05:49 Go to previous message
Littlefoot
Messages: 21824
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Sure I was! TOAD (shame on me).
Previous Topic: Doc number Genration
Next Topic: fuctional index
Goto Forum:
  


Current Time: Tue May 20 15:16:40 CDT 2025