新装完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.
?
?
?