---
title: "oracle工具---orapwd使用及查看"
author: "zhoucl"
date: "2012-06-18T17:14:40Z"
tags: ["Oracle", "orapwd"]
categories: ["数据库"]
slug: "oracle-orapwd"
draft: false
lastmod: "2012-06-18T17:15:20Z"
id: 1563274
url: "https://zhoucl.iteye.com/blog/1563274"
---

本小记主要就前面手动创建Oracle database的时候，有一步叫做：选择数据库管理员的认证方法，里面的基于口令文件的认证，前面还有点模糊，通过查阅些资料和文档，对其有一些了解，故作记录如下：

一、简介  
    orapwd工具，是oracle提供的创建口令文件的工具，旨在创建一个口令文件，在数据库处于nomount状态下登陆数据的。  
    $ orapwd  
    Usage: orapwd file=&lt;fname&gt; entries=&lt;users&gt; force=&lt;y/n&gt; ignorecase=&lt;y/n&gt; nosysdba=&lt;y/n&gt;  
     
    where  
        file - name of password file (required),  
        password - password for SYS will be prompted if not specified at command line,  
        entries - maximum number of distinct DBA (optional),  
        force - whether to overwrite existing file (optional),  
        ignorecase - passwords are case-insensitive (optional),  
        nosysdba - whether to shut out the SYSDBA logon (optional Database Vault only).

        There must be no spaces around the equal-to (=) character.  
     
二、使用方法  
    $ orapwd file=orapw&lt;SID&gt; password=\*\*\*\*\** entries=10  
    则在当前目录生成orapw&lt;SID&gt;的文件，可以保存sysdba/sysoper用户的密码。  
     
    【注1】在数据库中，修改sysdba/sysoper用户的密码，可以同步到口令文件当中;  
    【注2】select * from v$pwfile\_users语句，查询口令文件中的用户。  
     
\[2012/6/18]