修改oracle數據庫密碼


 

1.用Xshell遠程連接安裝數據庫的服務器,切換到安裝oracle數據庫的用戶下,(我的oracle數據庫就安裝在oracle用戶下)

命令: su - oracle;

 

2.進入oracle控制台
命令: sqlplus /nolog;
以dba角色進入
命令: conn /as sysdba;

 

3.連接成功后,查看用戶列表
命令: select username from dba_user;

 

4.若修改某一個用戶密碼,修改用戶口令格式為: alter user username identified by newpassword;
例如修改用戶demo的密碼:
命令: alter user demo identified by demo123;

 

5.修改成功

以下為修改詳細過程:

Xshell for Xmanager Enterprise 4 (Build 0182)
Copyright (c) 2002-2011 NetSarang Computer, Inc. All rights reserved.

Type `help' to learn how to use Xshell prompt.
Xshell:\> 

Connecting to 192.168.1.24:22...
Connection established.
Escape character is '^@]'.

Last login: Sun Oct  9 09:09:31 2016 from 172.16.5.212
[root@kdyd01 ~]# SU - oracle
-bash: SU: command not found
[root@kdyd01 ~]# su - oracle
[oracle@kdyd01 ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.4.0 Production on Thu Oct 20 13:45:13 2016

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

SQL> conn /as sysdba
Connected.
SQL> select username from dba_users;

USERNAME
------------------------------
DSG
TMR
PLATFORM
SDQN
SYS
SYSTEM
BJUSER
FLOWS_FILES
MDSYS
ORDSYS
EXFSYS

USERNAME
------------------------------
DBSNMP
SCOTT
WMSYS
ORACLE_OCM
APPQOSSYS
XS$NULL
APEX_030200
OWBSYS_AUDIT
MDDATA
ORDDATA
CTXSYS

USERNAME
------------------------------
ANONYMOUS
OUTLN
DIP
APEX_PUBLIC_USER
SYSMAN
XDB
SPATIAL_CSW_ADMIN_USR
SPATIAL_WFS_ADMIN_USR
ORDPLUGINS
OWBSYS
MGMT_VIEW

USERNAME
------------------------------
SI_INFORMTN_SCHEMA
OLAPSYS

35 rows selected.

SQL> alter user bjuser identified by BJUser;

User altered.

SQL> exit;
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@kdyd01 ~]$ sqlplus bjuser/BJUser

SQL*Plus: Release 11.2.0.4.0 Production on Thu Oct 20 14:02: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> 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM