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 -> sysdba role in script

sysdba role in script

From: <bofh1234_at_hotmail.com>
Date: 6 Feb 2007 19:35:47 -0800
Message-ID: <1170819347.603792.156380@a75g2000cwd.googlegroups.com>


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

Original text of this message

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