码迷,mamicode.com
首页 > 其他好文 > 详细

关于Scott用户

时间:2016-09-25 21:59:43      阅读:179      评论:0      收藏:0      [点我收藏+]

标签:

一:典型安装的情况下包括Scott用户 ,默认情况下是锁定的状态,可以通过命令行来进行解锁;

-:SQL> alter user scott account unlock identefied bu tiger;
alter user scott account unlock identefied bu tiger
                                *
ERROR at line 1:
ORA-00922: missing or invalid option


SQL>

_:缺失或者无效的选择

然后进行查找看看有没有这个Scott

SQL> select username from dba_users where username=‘scott‘;

no rows selected

 

二:如果环境中没有Scott用户,那么可以利用Oracle自带的脚本来进行创建

SQL>
SQL> @?/rdbms/admin/utlsampl.sql
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@localhost ~]$
[oracle@localhost ~]$
[oracle@localhost ~]$ sqlplus scott/tiger

SQL*Plus: Release 11.2.0.4.0 Production on Sun Sep 25 20:27:44 2016

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
BONUS                          TABLE
DEPT                           TABLE
EMP                            TABLE
SALGRADE                       TABLE

SQL>

SQL> select tname from tab;

TNAME
------------------------------
BONUS
DEPT
EMP
SALGRADE

SQL>

(*?是指操作系统中环境变量$ORACLE_HOME)

 

关于Scott用户

标签:

原文地址:http://www.cnblogs.com/material/p/5906812.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!