Oracle忘记用户名和密码

本文记录了在Oracle Database 12c环境下通过SQL*Plus进行用户管理的过程,包括创建用户、修改密码、授权及验证等操作步骤,并展示了在操作过程中可能遇到的错误提示及其解决办法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Microsoft Windows [版本 10.0.16299.192]
(c) 2017 Microsoft Corporation。保留所有权利。

C:\WINDOWS\system32>echo %ORACLE_SID%
%ORACLE_SID%

C:\WINDOWS\system32>set ORACLE_SID=fast

C:\WINDOWS\system32>sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on 星期五 2月 2 17:03:37 2018

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


连接到:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options


SQL> alter user fast identified by "fast*123";
alter user fast identified by "fast*123"
*
第 1 行出现错误:
ORA-01918: 用户 'FAST' 不存在


SQL> alter user sys identified by fast*123;
alter user sys identified by fast*123
*
第 1 行出现错误:
ORA-00922: 选项缺失或无效


SQL> alter user sys identified by fast*123;
alter user sys identified by fast*123
*
第 1 行出现错误:
ORA-00922: 选项缺失或无效


SQL> alter user sys identified by "fast*123";

用户已更改。

SQL> alter user system identified by "manager";

用户已更改。

SQL> create user fast identified by "fast*123";
create user fast identified by "fast*123"
*
第 1 行出现错误:
ORA-65096: 公用用户名或角色名无效


SQL> create user "c##fast" identified by "fast*123";

用户已创建。

SQL> grant connect,resource,dba to "c##fast"
2
SQL> grant connect,resource,dba to "c##fast";

授权成功。

SQL> commit;

提交完成。

SQL>

用户名不需要使用双引号======用户名不需要使用双引号

===========================================

SQL> create user c##fast identified by "fast*123";

SQL> grant connect,resource,dba to c##fast;

SQL> alter user c##fast identified by "fast*123";

 

转载于:https://www.cnblogs.com/googlegis/p/8406193.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值