转自:http://blog.sina.com.cn/s/blog_7ffb8dd501013eap.html
用SYS (或SYSTEM)用户登录。
CONN SYS/PASS_WORD AS SYSDBA;
使用如下语句修改用户的密码。
ALTER USER user_name IDENTIFIED BY newpass;
注意:密码不能全是数字。并且不能是数字开头。否则会出现:ORA-00988: 口令缺失或无效
二、忘记SYS用户,或者是SYSTEM用户的密码。
如果是忘记SYSTEM用户的密码,可以用SYS用户登录。然后用ALTER USER 密令
修改密码。
CONN SYS//PASS_WORD AS SYSDBA;
ALTER USER SYSTEM IDENTIFIED BY newpass;
如果是忘记SYS用户的密码,可以用SYSTEM用户登录。然后用ALTER USER 密令
修改密码。
CONN SYSTEM//PASS_WORD ;
ALTER USER SYSTEM IDENTIFIED BY newpass;
三、如果SYS,SYSTEM用户的密码都忘记或是丢失。
这一项尤其重要。
可以使用ORAPWD.EXE 工具修改密码。
开始菜单->运行->输入‘CMD’,打开命令提示符窗口,输入如下命令:
orapwd file=D:\oracle\product\10.2.0\db_1\database\pwdctcsys.ora
password=newpass
这个命令重新生成了数据库的密码文件。密码文件的位置在ORACLE_HOME目录下
的\database目录下。 这个密码是修改sys用户的密码。除sys和system其他用户的密码不会改变。
1.如果不记得sys用户的密码了,采用如下方法可以修改密码:
(1)打开cmd,输入sqlplus /nolog,回车。
(2)输入“conn / as sysdba”;
(3)输入“alter user sys identified by 新密码;”(新密码必须以字母开头,另外每条SQL语句后得分号不能忘)
其他用户方式同理
2.(1)在cmd中启动sqlplus;
附:Oracle
Username | Password | Description | See Also |
CTXSYS | CTXSYS | The | Oracle |
DBSNMP | DBSNMP | The account used by the Management Agent component of | Oracle |
LBACSYS | LBACSYS | The | Oracle |
MDDATA | MDDATA | The schema used by | Oracle |
MDSYS | MDSYS | The | Oracle |
DMSYS | DMSYS | The | Oracle Oracle |
OLAPSYS | MANAGER | The account used to create OLAP metadata structures. It owns the OLAP Catalog (CWMLite). | Oracle |
ORDPLUGINS | ORDPLUGINS | The | Oracle |
ORDSYS | ORDSYS | The | Oracle |
OUTLN | OUTLN | The account that supports plan stability. Plan stability enables you to maintain the same execution plans for the same SQL statements. OUTLN acts as a role to centrally manage metadata associated with stored outlines. | Oracle |
SI_INFORMTN_SCHEMA | SI_INFORMTN_SCHEMA | The account that stores the information views for the SQL/MM Still Image Standard | Oracle |
SYS | CHANGE_ON_INSTALL | The account used to perform database administration tasks | Oracle |
SYSMAN | CHANGE_ON_INSTALL | The account used to perform | Oracle |
SYSTEM | MANAGER | Another account used to perform database administration tasks. |
我补充,查看所有用户的语句:
查看所有表:
select table_name from user_tables; 此句显示出来的是当前默认USERS表空间中的所有表信息,出现很多奇怪的表
应该(也建议)用下面的语句:
select table_name,owner from all_tables where Owner='TEST'; 注意,用户名在此处严格区分大小写。这一句只会列出该用户自己建立的表。
但,有时用上面的语句可能遗漏特殊权限的表,查询dba_tables则不会遗漏,all_tables只显示经过授权过的表,没授权的表查不到 语句如下:select table_name,owner from dba_tables where Owner='test' ;