oracle 11g快递版 - 恢复用户名和密码

时间:2014-02-26 13:05:36

标签: oracle oracle11g

如何恢复Oracle数据库的用户名和密码?

我试过了:

C:\Users\sa>orapwd file=PWDXE.ORA password=new_sys_password entries=10

我将文件复制到C:\oraclexe\app\oracle\product\11.2.0\server\database

位置
C:\Users\sa>set oracle_sid=xe

C:\Users\sa>sqlplus sys/new_sys_password as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Feb 26 13:57:05 2014

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

ERROR:
ORA-12560: TNS:protocol adapter error


Enter user-name:

SQLNET.ORA

TRACE_LEVEL_CLIENT = OFF
#sqlnet.authentication_services = (NONE)
names.directory_path = (TNSNAMES, HOSTNAME)
names.default_domain = world
name.default_zone = world
automatic_ipc = off

的listener.ora

# LISTENER.ORA Network Configuration File: C:\oracle\ora92\network\admin\listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = COMP1A862)(PORT = 1521))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
      )
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN)
      (PROGRAM = extproc)
    )
  )

和tnsnames.ora

# TNSNAMES.ORA Network Configuration File: C:\oracle\ora92\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
XE.WORLD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST =COMP1A862)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

我做错了什么?

P.S。 服务正在运行 enter image description here

1 个答案:

答案 0 :(得分:0)

如果你想重置密码并且你在服务器机器上,你可以(假设你设置了ORACLE_HOME和ORACLE_SID env变量):

sqlplus / as sysdba

然后,您可以解锁或更改任何用户的密码 - 例如更改密码:

更改用户标识;