By
Kamran Agayev A.
According to the Oracle documentation, when you connect with
SYSDBA or SYSOPER privilege, you connect with a default schema, not
with the schema that is generally associated with your username. See
the following example:
01 SQL> create user usr1 identified by
test;
02
03 User created.
04
05 SQL> grant
sysdba to usr1;
06
07 Grant succeeded.
08
09 SQL> conn
usr1/test
10 ERROR:
11 ORA-01045: user USR1 lacks CREATE SESSION privilege; logon denied
12 Warning:
You are no longer connected to ORACLE.
13 SQL> conn / as
sysdba
14
Connected.
15 SQL> grant dba to usr1;
16
17 Grant succeeded.
18
19 SQL> conn
usr1/test
20 Connected.
21 SQL> create table table1 (id number);
22
23 Table created.
24
25 SQL> conn
usr1/test as sysdba
26 Connected.
27
28 SQL> create
table table2 (id number);
29
30 Table created.
31
32 SQL> col owner
format a35
33 SQL> col object_name format a35
34 SQL> select owner, object_name from
dba_objects where object_name like 'TABLE_';
35
36 OWNER
OBJECT_NAME
37 -----------------------------------
-----------------------------------
38 SYS TABLE2
39 USR1 TABLE1
40
41 SQL> show user
42 USER is
"SYS"
43
SQL>
44
45 SQL>
drop user usr1 cascade;
46
47 User dropped.
48
49 SQL>
50
As you see, although you've granted SYSDBA privilege, the user can't
connect to the database and as you connected with SYSDBA privilege,
the table you've created is not created under the schema of the
connected user, but is created under the SYS schema, because you're
acting as SYS user by connecting with SYSDBA privilege
|
|
|
|
Get the Complete
Oracle Tuning Details
The landmark book
"Oracle
Tuning: The Definitive Reference Second Edition" has been
updated with over 1,150 pages of expert performance tuning tips.
It's packed with scripts and tools to hypercharge Oracle 11g
performance and you can
buy it for 40% off directly from the publisher.
|
|
|
Download your Oracle scripts now:
www.oracle-script.com
The
definitive Oracle Script collection for every Oracle professional DBA
|
|
| |
| |

Copyright ©
1996 -2011 by Burleson Enterprises. All rights reserved.
Oracle® is the registered trademark of Oracle
Corporation. SQL Server® is the registered trademark of Microsoft
Corporation. Many of the designations used by computer vendors to distinguish their
products are claimed as Trademarks
|
|