10g添加用户 oracle_oracle 10g R2 创建用户时默认表空间改变

在10g以前,如果我们创建用户时 要是没指定默认表空间,系统就会把默认表空间指向system表空间

这样在这个用户下建立的所有表都放在system表空间,会影响到系统表空间

而10g在这方面做了改进,要是创建用户没指定表空间 ,默认放在user表空间下

以下是测试验证过程:

1:oracle 9i

C:\Documents and Settings\Paul Yi>sqlplus "/as sysdba"

SQL*Plus: Release 9.2.0.4.0 - Production on Wed May 7 15:16:54 2008

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Connected to:

Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.4.0 - Production

SQL> create user paul identified by paul;

User created.

SQL> conn /as sysdba

Connected.

SQL> grant connect to paul;

Grant succeeded.

SQL> grant resource to paul;

Grant succeeded.

SQL> conn paul/paul

Connected.

SQL> create table test as select rownum id from dual;

Table created.

SQL> select table_name,tablespace_name from user_tables;

TABLE_NAME                     TABLESPACE_NAME

------------------------------ ------------------------------

TEST                           SYSTEM

SQL> conn /as sysdba

Connected.

SQL> select username,default_tablespace from dba_users where username='PAUL';

USERNAME                       DEFAULT_TABLESPACE

------------------------------ ------------------------------

PAUL                           SYSTEM

SQL>

2:ORACLE 10g R2

SQL> conn sys/abcdefg@oracle10g as sysdba

Connected.SQL> create user paul identified by paul;

User created.

SQL> grant connect to paul;

Grant succeeded.

SQL> grant resource to paul;

Grant succeeded.

SQL> conn paul/paul@oracle10g

Connected.

SQL> create table test as select rownum id from dual;

Table created.

SQL> select table_name,tablespace_name from user_tables;

TABLE_NAME                     TABLESPACE_NAME

------------------------------ ------------------------------

TEST                           USERS

SQL> conn sys/abcdefg@oracle10g as sysdba

Connected.

SQL> select username,default_tablespace from dba_users where username='PAUL';

USERNAME                       DEFAULT_TABLESPACE

------------------------------ ------------------------------

PAUL                           USERS

SQL>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值