重建口令文件

由于练习机模拟,误删了口令文件,所以不得不重建:

SQL> exit

从 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options 断

C:\>sqlplus sys/[email protected] as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期五 5月 8 13:43:09 2015

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

ERROR:

ORA-01031: insufficient privileges

===================================================

SQL> grant sysdba to sys;

grant sysdba to sys

*

第 1 行出现错误:

ORA-01994: GRANT 失败: 口令文件缺失或已禁用

所以不得不重建口令文件:

Usage: orapwd file=<fname> entries=<users> force=<y/n> ignorecase=<y/n> nosysdba=<y/n>

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.

[[email protected] ~]$ orapwd file=$ORACLE_HOME/dbs/orapw$orcl3939 entries=10 force=y;

Enter password for SYS:

[[email protected] ~]$ sqlplus /  as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期五 5月 8 14:02:48 2015

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

连接到:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select * from v$pwfile_users;

USERNAME                       SYSDB SYSOP SYSAS

------------------------------ ----- ----- -----

SYS                            TRUE  TRUE  FALSE

orapwd file=orapworcl password=oracle force=y

orapwd file=<密码文件的名字orapw<sid>>

password=< sys用户的密码>

entries=<密码文件中的用户数目限制(二进制文件按矩阵计算可存多少数)>

force=<y/n10g可选新增,默认n ,y表示允许覆盖>

官网11gR2:

ORAPWD FILE=filename [ENTRIES=numusers] [FORCE={Y|N}] [IGNORECASE={Y|N}]

Command arguments are summarized in the following table.

Argument Description
FILE Name to assign to the password file. You must supply a complete path. If you supply only a file name, the file is written to the current directory.
ENTRIES (Optional) Maximum number of entries (user accounts) to permit in the file.
FORCE (Optional) If y, permits overwriting an existing password file.
IGNORECASE (Optional) If y, passwords are treated as case-insensitive.

There are no spaces permitted around the equal-to (=) character.

The command prompts for the SYS password and stores the password in the created password file.

Example

The following command creates a password file named orapworcl that allows up to 30 privileged users with different passwords.

orapwd FILE=orapworcl ENTRIES=30

官网(12c):更为详细

orapwd FILE=filename [ENTRIES=numusers] [FORCE={y|n}] [ASM={y|n}]
[DBUNIQUENAME=dbname] [FORMAT={12|legacy}] [SYSBACKUP={y|n}] [SYSDG={y|n}]
[SYSKM={y|n}] [DELETE={y|n}] [INPUT_FILE=input-fname]
orapwd DESCRIBE FILE=filename 

Command arguments are summarized in the following table.

Argument Description
FILE If
the DESCRIBE argument is not included, then specify the name to assign to the new password file. You must supply a complete path. If you supply only a file name, the file is written to the current directory.

If
the DESCRIBE argument is included, then specify the name of an existing password file.

PASSWORD Password
for SYS. You are prompted for the password if it is not specified. The password is stored in the created password file.
ENTRIES (Optional)
Maximum number of entries (user accounts) to permit in the file.
FORCE (Optional)
If y, permits overwriting an existing password file.
ASM (Optional)
If y, create an Oracle ASM password file in an Oracle ASM disk group.

If n, the default, create
a password file in the operating system file system. When the DBUNIQUENAME argument is specified, the password file is a database password file. When the DBUNIQUENAME argument is not specified, the password file can be a database password file or an Oracle
ASM password file.

DBUNIQUENAME Unique
database name used to identify database password files residing in an ASM disk group only. This argument is required when the database password file is stored on an Oracle ASM disk group. This argument is ignored when an Oracle ASM password file is created
by setting the ASM argument to y.
FORMAT (Optional)
If 12, the default, the password file is created in Oracle Database 12c format. This format supports the SYSBACKUP, SYSDG, and SYSKM administrative privileges.

If legacy,
the password file is in legacy format, which is the format before Oracle Database 12c. This argument cannot be set to legacywhen the SYSBACKUP, SYSDG, or SYSKM argument is specified.

SYSBACKUP (Optional)
If y, creates a SYSBACKUP entry in the password file. You are prompted for the password. The password is stored in the created password file.
SYSDG (Optional)
If y, creates a SYSDG entry in the password file. You are prompted for the password. The password is stored in the created password file.
SYSKM (Optional)
If y, creates a SYSKM entry in the password file. You are prompted for the password. The password is stored in the created password file.
DELETE (Optional)
If y, delete the specified password file.

If n, the default, create the specified password file.

INPUT_FILE (Optional)
Name of the input password file. ORAPWD migrates the entries in the input file to a new password file. This argument can convert a password file from legacy format to Oracle Database 12cformat. ORAPWD cannot
migrate an input password that is stored in an Oracle ASM disk group.
DESCRIBE Describes
the properties of the specified password file, including theFORMAT value (12 or legacy) and the IGNORECASE value (y orn)

时间: 2024-10-08 14:12:11

重建口令文件的相关文章

oracle使用口令文件验证和os验证

一.Oracle安装之后默认情况下是启用了OS认证的,这里提到的os认证是指服务器端os认证.OS认证的意思把登录数据库的用户和口令校验放在了操作系统一级.如果以安装Oracle时的用户登录OS,那么此时在登录Oracle数据库时不需要任何验证 1. 使用操作系统验证 2个前提必须同时满足 1)os下建立用户ORA_DBA用户组, 然后可以新建立用户或者把原来的用户加入到ORA_DBA组中,然后使用这个用户在安装了数据库的本地机器登陆或者使用安全的远程连接登陆,可以作为sysdba登录,在数据库

ORACLE模拟临时文件、日志成员、口令文件丢失情况与恢复【weber出品】

一.临时表空间文件.日志文件和口令文件都属于非关键性文件,因为这些文件丢失后并不会影响到整个数据库的完整性. 但是,当这些文件丢失后我们需要快速的找回这些文件.接下来我将模拟临时表空间文件.日志文件和口令文件丢失的情况. 二.如果属于 TEMP 表空间的临时文件丢失或损坏,则 TEMP 表空间将不可用.例如:在执行需要 TEMP 空间进行排序的 SQL 语句过程中,此问题将声明其为错误. 一般会用到临时表空间的场景有: 索引create或rebuild Order by 或 group by D

Oracle非关键文件恢复,日志成员、临时文件、索引表空间、口令文件(密码文件)

关键性与非关键性 非关键性文件是指数据库和大多数应用程序没有它也能继续运行的文件.例如,如果数据库丢失了一个多路复用重做日志文件,仍可使用其它重做日志文件副本来保持数据库持续运行. 虽然丢失非关键性文件不会导致数据库崩溃,但它会削弱数据库的功能.例如: 丢失索引表空间会导致应用程序和查询的运行速度大幅减慢,或者,如果这些索引用于强制实施约束,则丢失后甚至会导致应用程序无法使用. 丢失联机重做日志组(只要不是当前联机日志组)会导致在 LGWR 下一次尝试写入组时数据库操作被挂起,直到生成新的日志文

Oracle OS认证 口令文件 密码丢失处理

Oracle OS认证 口令文件 密码丢失处理 分类: Oracle Basic Knowledge2009-10-19 14:24 5031人阅读 评论(9) 收藏 举报 oracleos数据库sql远程登录login 一.  OS认证 1.1  OS认证介绍 Oracle安装之后默认情况下是启用了OS认证的,这里提到的OS认证是指服务器端OS认证.OS认证的意思把登录数据库的用户和口令校验放在了操作系统一级.如果以安装Oracle时的用户登录OS,那么此时在登录Oracle数据库时不需要任何

【翻译自mos文章】在重建控制文件之前应该考虑的事情

在重建控制文件之前应该考虑的事情 来源于: Things to Consider Before Recreating the Controlfile (文档 ID 1475632.1) 适用于: Oracle Database - Enterprise Edition - Version 10.2.0.1 and later Information in this document applies to any platform. 目的: 突出控制文件的重要性和在重建控制文件之前应该考虑的问题.

关于heritrix安装配置时出现”必须限制口令文件读取访问权限”的解决方法

转载:http://www.floatinglife.cn/关于heritrix安装配置时出现必须限制口令文件读取访问 最近开始写一个RSS聚合程序,需要爬虫支持,于是就整来heritrix,没想到,这东西还挺拽,费了老衲好几个小时来安装配置这个heritrix.最后经过不懈努力,终于起来了,具体步骤如下:你如果在网上找相关配置,大多数都是讲先修改conf/properties文件的用户名和密码以及修改jmxremote.password.template,然后将其改名复制到heritrix根目

【翻译自mos文章】在重建控制文件之后,丢失了数据库补充日志信息(Missed Database Supplemental Log Information)

在重建控制文件之后,丢失了数据库补充日志信息(Missed Database Supplemental Log Information) 参考原文: Missed Database Supplemental Log Information After Recreate Controlfile In 10g Database. (Doc ID 1474952.1) 适用于: Oracle Server - Enterprise Edition - Version 10.1.0.2 and late

postgres口令文件.pgpass

口令文件: 如果在客户端命令执行时没有提供该文件,PostgreSQL的所有客户端命令均会被口令输入提示中断. 在当前用户的HOME目录下,创建文件名为 .pgpass的口令文件,这样就可以在我们连接PostgreSQL服务器时,客户端命令自动读取该文件已获得登录时所需要的口令信息.该文件的格式如下: hostname:port:database:username:password 以上数据是用冒号作为分隔符,总共分为五个字段,分别表示服务器主机名(IP).服务器监听的端口号.登录访问的数据库名

重建控制文件详解

http://note.youdao.com/share/?id=d3991566cad33723db8b92183dcd9161&type=note 完整图文最新版 创造"重建控制文件脚本"需要在mount或open下进行. alter database backup controlfile to trace as '/tmp/ctl..sql'; 执行"重建控制文件脚本"需要在nomount的时候. -- The following are curren