oracle设置scott用户,Oracle 11G 创建scott用户

新装完Oracle 11GR2数据库后准备使用scott登录

$ sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Sun Sep 29 15:29:41 2013

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Enter user-name: scott

Enter password:

ERROR:

ORA-01017: invalid username/password; logon denied

Omg~ 居然没有,不得己建立一个scott用户.

Oracle 11G中建立scott用户使用utlsampl.sql脚本

SQL> !echo $ORACLE_HOME

/u01/oracle

SQL> @/u01/oracle/rdbms/admin/utlsampl.sql

登录验证

SQL> conn scott/tiger

Connected.

SQL> select * from cat;

TABLE_NAME TABLE_TYPE

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

BONUS TABLE

DEPT TABLE

EMP TABLE

SALGRADE TABLE

顺便给scott用户指定一个单独的表空间

$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sun Sep 29 15:51:36 2013

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> CREATE TABLESPACE SCOTT_TBS DATAFILE '/u01/oradata/leadercoo/scott_tbs01.dbf' size 100m;

Tablespace created.

SQL> ALTER USER SCOTT DEFAULT TABLESPACE SCOTT_TBS QUOTA UNLIMITED ON SCOTT_TBS;

User altered.

SQL> REVOKE UNLIMITED TABLESPACE FROM SCOTT;

Revoke succeeded.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值