---
title: "Oracle更改system和sys用户名和密码"
author: "xiaomanetjava"
date: "2010-10-29T15:58:10Z"
tags: []
categories: ["编程语言"]
slug: "oracle-system-sys"
draft: false
lastmod: "2010-10-29T15:58:10Z"
id: 797768
url: "https://xiaomanetjava.iteye.com/blog/797768"
---

原先安装oracle时就没设置和管理默认oracle的 dba和 scott 的用户肯定会碰见进不了，如果没有用户密码，这是我在网上找的修改方法，很实用！

D:\\oracle\\ora92\\bin&gt;sqlplus /nolog 这句话是说不登陆数据库，只启动sqlplus

SQL\*Plus: Release 9.2.0.1.0 - Production on 星期四 8月 16 11:32:22 2007

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SQL&gt; conn /as sysdba  
已连接。  
SQL&gt; alter user system identified by password;

用户已更改。

SQL&gt; alter user sys identified by password;

用户已更改。

SQL&gt; alter user system identified by manger;

用户已更改。

SQL&gt; exit

&lt;!---------------------------------------------------------------------

      钦波友情提示:

      如果你想修改用户的话请用下面的语句:

      conn   /   as   sysdba

     alter   user   sys   identified   by   sys;

     alter   user   system   identified   by   system;

      ...

-------------------------------------------------------------&gt;

&lt;!---------------------------------------------------------------------

      钦波友情提示:

      如果你想修改scott用户的话请先解锁(因为默认scott用户是被锁住的)用下面的语句:

      conn   /   as   sysdba

     

     alter   user scott account unlock;

     alter   user   scott   identified   by   password;

     alter   user   system   identified   by   tiger;

      ...

-------------------------------------------------------------&gt;

从Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production  
With the Partitioning, OLAP and Oracle Data Mining options  
JServer Release 9.2.0.1.0 - Production中断开

D:\\oracle\\ora92\\bin&gt;sqlplus

SQL\*Plus: Release 9.2.0.1.0 - Production on 星期四 8月 16 11:40:37 2007

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

请输入用户名:  system  
请输入口令:

连接到:  
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production  
With the Partitioning, OLAP and Oracle Data Mining options  
JServer Release 9.2.0.1.0 - Production

SQL&gt; select instance\_name from v$instance;

INSTANCE\_NAME  
\----------------  
orcl（ [http://huiqinbo.iteye.com](http://huiqinbo.iteye.com)）