Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> sysdba role in script
Hello,
I am writing a script. This script will create a tablespace, a user,
switch that user, create more tablespaces, etc. Thanks to some
friendly people I have a mostly working script. Mostly working
because when I switch to the user in the script the sysdba privledges
are not dropped.
This does not work
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;
The data2 tablespace isn't created in the right area.
This works:
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;
exit sqlplus and launch sqlplus again
connect harry/potter
create tablespace data2 datafile '/u03/oradata/prod/data201.dbf' SIZE
300M;
The data2 tablespace is created correctly.
What am I doing wrong? I am using Oracle 10.2.0.1
Thanks, Received on Tue Feb 06 2007 - 21:35:47 CST