Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: sysdba role in script

Re: sysdba role in script

From: <saad4u_at_gmail.com>
Date: 7 Feb 2007 14:55:11 -0800
Message-ID: <1170888911.849367.253390@v33g2000cwv.googlegroups.com>

Dude, did you try after granting "dba" instead of "sysdba"? If you notice closely, you are granting the user "sysdba" but while connecting, you are not conning "as sysdba"!! Thats why it is preferred to grant dba instead of sysdba, provided that there are no security constraints.
Please let us know if that works.

Saad

On Feb 7, 4:33 pm, bofh1..._at_hotmail.com wrote:
> To recap:
>
> This is the script:
> connect sys as sysdba
> create tablespace test datafile '/u03/oradata/prod/test01.dbf size
> 200M;
> create user harry identified by password default tablespace test
> temporary tablespace temp quota 24M on test;
> grant connect, resource, sysdba to harry;
> conn harry/potter
> create tablespace data2 datafile '/u03/oradata/prod/data201.dbf' SIZE
> 300M;
>
> When I run the above script I get
> Tablespace created.
> User created.
> Grant succeeded.
> Connected.
> CREATE TABLESPACE data2 DATAFILE '/u03/oradata/prod/data201.dbf' SIZE
> 3M
> *
> ERROR at line 1:
> ORA-01031: insufficient privileges
>
> If I create the user, grant the rights, exit sqlplus, login as harry
> the create tablesspace data2 .... works fine.
>
> Thanks,
Received on Wed Feb 07 2007 - 16:55:11 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US