能够具体说一下,我是真小白,我是真不懂,刚学,把步骤说一下吧,谢了 这位哥的意思是,平时一般不用sys或者system进行操作数据库,这两个用户的权限比较大,万一发生误操作,就会对数据库造成很大影响,可能无法启动之类的。 建普通用户方法(这里只是举个例子,并一定要这样建,具体根据实际情况): 先建一个用户用的表空间 create tablespace test20140916 datafile 'e:/oracle/product/10.2.0/oradata/plmdemo/test20140916.dbf' size 100m autoextend on next 30m maxsize 1g extent management local; 然后创建一个普通用户 create user test20140916 identified by test20140916 default tablespace test20140916 quota unlimited on test20140916 ; 授予普通用户权限 grant resource,connect to test20140916
conn sys/pwd as sysdba alter user xx account unlock;
在命令行下输入sqlplus sys/你的密码 as sysdba然后修改alter user xx account unlock
楼主 这是输入多次错误密码锁用户了,所以楼主可以用sys上去alter user XXX account unlock;解锁。PS:这个输入错误密码次数是oracle的一种保护机制,这个也可以调整的。
sqlplus / as sysdba ;alter user "SDF" account unlock;
C:\>sqlplus "test/test"SQL*Plus: Release 11.2.0.1.0 Production on 星期三 2月 11 13:39:15 2015Copyright (c) 1982, 2010, Oracle. All rights reserved.ERROR: ORA-28000: the account is locked 请输入用户名: C:\>sqlplus "/as sysdba"SQL*Plus: Release 11.2.0.1.0 Production on 星期三 2月 11 13:39:30 2015Copyright (c) 1982, 2010, Oracle. All rights reserved. 连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> alter user test account unlock ;用户已更改。SQL> exit 从 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options 断 开C:\>sqlplus "test/test"SQL*Plus: Release 11.2.0.1.0 Production on 星期三 2月 11 14:10:45 2015Copyright (c) 1982, 2010, Oracle. All rights reserved. 连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL>
Microsoft Windows [版本 5.2.3790] (C) 版权所有 1985-2003 Microsoft Corp.C:\Documents and Settings\Administrator>sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on 星期三 2月 11 14:59:50 2015Copyright (c) 1982, 2010, Oracle. All rights reserved. 连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> alter user system account unlock;用户已更改。SQL>
在安装数据库的时候,你没有给指定的账户解锁。解锁就可以了alter user system account unlock;
sqlplus / as sysdba alter user system account unlock; sys与system两个权限较大,如果你用这两个用户操作,那你一旦操作失败,容易产生严重的后果,所以建议你自己新建一个用户才联系学习oracle
SQL> conn system@orcl 输入口令: 已连接。 SQL> create profile MyPfile LIMIT 2 sessions_per_user 1 3 failed_login_attempts unlimited 4 password_life_time unlimited 5 password_lock_time 1 6 password_grace_time 1 7 ;配置文件已创建SQL> alter user scott identified by tiger profile mypfile account unlock;用户已更改。
alter user system account unlock;
进入到sqlplus之后,执行后续代码
oracle用户解锁三种方法
这位哥的意思是,平时一般不用sys或者system进行操作数据库,这两个用户的权限比较大,万一发生误操作,就会对数据库造成很大影响,可能无法启动之类的。
建普通用户方法(这里只是举个例子,并一定要这样建,具体根据实际情况):
先建一个用户用的表空间
create tablespace test20140916
datafile 'e:/oracle/product/10.2.0/oradata/plmdemo/test20140916.dbf'
size 100m
autoextend on
next 30m maxsize 1g
extent management local;
然后创建一个普通用户
create user test20140916 identified by test20140916
default tablespace test20140916
quota unlimited on test20140916
;
授予普通用户权限
grant resource,connect to test20140916
C:\>sqlplus "test/test"SQL*Plus: Release 11.2.0.1.0 Production on 星期三 2月 11 13:39:15 2015Copyright (c) 1982, 2010, Oracle. All rights reserved.ERROR:
ORA-28000: the account is locked
请输入用户名:
C:\>sqlplus "/as sysdba"SQL*Plus: Release 11.2.0.1.0 Production on 星期三 2月 11 13:39:30 2015Copyright (c) 1982, 2010, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> alter user test account unlock ;用户已更改。SQL> exit
从 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断
开C:\>sqlplus "test/test"SQL*Plus: Release 11.2.0.1.0 Production on 星期三 2月 11 14:10:45 2015Copyright (c) 1982, 2010, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL>
(C) 版权所有 1985-2003 Microsoft Corp.C:\Documents and Settings\Administrator>sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on 星期三 2月 11 14:59:50 2015Copyright (c) 1982, 2010, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> alter user system account unlock;用户已更改。SQL>
alter user system account unlock;
sys与system两个权限较大,如果你用这两个用户操作,那你一旦操作失败,容易产生严重的后果,所以建议你自己新建一个用户才联系学习oracle
输入口令:
已连接。
SQL> create profile MyPfile LIMIT
2 sessions_per_user 1
3 failed_login_attempts unlimited
4 password_life_time unlimited
5 password_lock_time 1
6 password_grace_time 1
7 ;配置文件已创建SQL> alter user scott identified by tiger profile mypfile account unlock;用户已更改。