1. 口令文件的创建

可以使用oracle的orapwd命令来创建口令文件。口令文件的路径:$ORACLE_HOME/dbs,文件格式:orapw$ORACLE_SID

[oracle@node01 dbs]$ orapwd

Usage: orapwd file= entries= force= ignorecase= nosysdba=

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.

案例:

[oracle@node01 oracle]$ cd $ORACLE_HOME/dbs

[oracle@node01 dbs]$ echo $ORACLE_SID

prod

[oracle@node01 dbs]$ orapwd file=orapwprod password=sys

[oracle@node01 dbs]$ ls

hc_prod.dat  hc_zlf.dat  init.ora  initprod.ora  lkPROD  orapwprod  spfileprod.ora

[oracle@node01 dbs]$

2. 查看口令文件中包含哪些用户(含有sysdba、sysoper、sysasm系统权限)

SQL> select * from v$pwfile_users;

USERNAME                       SYSDB SYSOP SYSAS

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

SYS                            TRUE  TRUE  FALSE

SQL> grant sysdba to scott;

Grant succeeded.

SQL> select * from v$pwfile_users;

USERNAME                       SYSDB SYSOP SYSAS

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

SYS                            TRUE  TRUE  FALSE

SCOTT                          TRUE  FALSE FALSE

SQL> grant sysoper to scott;

Grant succeeded.

SQL> select * from v$pwfile_users;

USERNAME                       SYSDB SYSOP SYSAS

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

SYS                            TRUE  TRUE  FALSE

SCOTT                          TRUE  TRUE  FALSE

3. 控制口令文件的使用

REMOTE_LOGIN_PASSWORDFILE specifies whether Oracle checks for a password file.

Values:

shared

One or more databases can use the password file. The password file can contain SYS as well as non-SYS users.

exclusive

The password file can be used by only one database. The password file can contain SYS as well as non-SYS users.

none

Oracle ignores any password file. Therefore, privileged users must be authenticated by the operating system.

说明:当REMOTE_LOGIN_PASSWORDFILE=none时,管理员用户(具有sysdba、sysoper权限的用户)无法远程管理数据库(关闭、开启),只能通过操作系统认证,进而来管理数据库。

SQL> show parameter remote_login_passwordfile

NAME                                 TYPE        VALUE

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

remote_login_passwordfile            string      EXCLUSIVE

此时,远程登录数据库,并关闭数据库。

SQL> conn sys/sys@demodb as sysdba

已连接。

SQL> shutdown immediate

数据库已经关闭。

已经卸载数据库。

ORACLE 例程已经关闭。

SQL>

SQL> show parameter remote_login_passwordfile

NAME                                 TYPE        VALUE

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

remote_login_passwordfile            string      NONE

SQL> conn sys/sys@demodb as sysdba ERROR: ORA-01017: invalid username/password; logon denied  --此时管理员已经无法远程登录数据库了。

oracle 中的口令管理,oracle口令文件的管理相关推荐

  1. oracle中的guid,在Oracle中使用Guid

    在Oracle中使用Guid 在Oracle中使用Guid 在Oracle中可以用SYS_GUID()来生成一个guid,相当于msSql中的newid(). 在Oracle9i和Oracle 10g ...

  2. oracle数据库insert into,oracle中insert into用法 oracle中insert如何带条件添加数据?

    oracle insert into 脚本怎么写 INSE INTO BOOK(bookid,name,price) VALUES('100123','oracle ',54); 或者 INSE IN ...

  3. oracle中数据文件创建,操作oracle中的数据文件

    收藏于http://dev.yesky.com/296/8090796.shtml Oracle数据库 中管理表空间和数据文件 数据库的三大组成部分:数据文件,控制文件,Redo日志. 表空间分为系统 ...

  4. 浅谈Oracle服务器归档日志,oracle服务器运行时管理归档日志文件不管理联机重做日志文件...

    <Oracle数据库管理与维护实战>--2.4 Oracle后台进程结构 本节书摘来自异步社区出版社<Oracle数据库管理与维护实战>一书中的第2章,第2.4节,作者: 何伟 ...

  5. oracle中xml如何存储过程,oracle存储过程生成xml文件

    oracle存储过程生成xml文件 CREATE OR REPLACE PROCEDURE Pro_OracleToXML(personid varchar2,name varchar2,addres ...

  6. 在oracle中创建一个序列,Oracle(创建序列)

    概念: 所谓序列,在oracle中就是一个对象,这个对象用来提供一个有序的数据列,这个有序的数据列的值都不重复. 1.序列可以自动生成唯一值 2.是一个可以被共享的对象 3.典型的用来生成主键值的一个 ...

  7. oracle中minus什么意思,Oracle Minus关键字

    Oracle Minus关键字 SQL中的MINUS关键字 SQL中有一个MINUS关键字,它运用在两个SQL语句上,它先找出第一条SQL语句所产生的结果,然后看这些结果有没有在第二个SQL语句的结果 ...

  8. oracle中asm磁盘不足,Oracle用户无法访问ASM磁盘组问题

    1. 权限问题引起找不到ASM磁盘组 1.1 确认操作系统用户属主 # 确认属主 Grid Infrastructure Home Owner : grid Primary Group : oinst ...

  9. oracle中dblink怎么用,Oracle中建立了dblink怎么使用

    Oracle应用服务器OS 1.查看数据库的global_name SELECT * FROM GLOBAL_NAME; 2.查看global_name参数是true还是false show para ...

  10. 解锁oracle中的scott用户,Oracle 解锁scott用户

    原因:默认Oracle10g的scott不能登陆. 解决: (1)conn sys/sys as sysdba;//以DBA的身份登录 (2)alter user scott account unlo ...

最新文章

  1. Crystal Reports 财务日记帐凭证套打设计
  2. 年底送点福利,包邮送55本!Python、大数据、人工智能任你挑!
  3. getconnectiontimeoutexception 网络问题排查_通俗解析居家宽带网络问题:光猫设备排查教程篇...
  4. 如何使用PHP发送电子邮件?
  5. Imc连环画《红楼梦》
  6. git报ssh variant 'simple' does not support setting port解决办法
  7. 微信小程序APP(商超营销类)经验总结
  8. 参会邀请 - ISWC2020 | 第十九届国际语义网会议
  9. 删除数组中的负数,输出结果为正数
  10. ArcMap操作技巧
  11. 现代电视原理期末复习
  12. canvas画钟表demo
  13. Windows cmd命令行操作技巧
  14. r语言nonzerocoef函数_文献汇报||Lasso方法在肿瘤基因位点筛选中的应用
  15. 怎样使用secureCRT连接路由器
  16. 原创超简单代码(1.20)
  17. 戴尔电脑重装系统的blos设置
  18. Oracle Flashback之flashback table
  19. 陪你一起看草原 在线Flash,在线歌曲
  20. 什么是docx,pptx等的正确MIME类型?

热门文章

  1. Java中----Font类简介
  2. IT 行业最宜居的城市是哪里?
  3. 如何实现MySQL增量备份与恢复?
  4. 华为路由器负载均衡_华为路由器双出口负载均衡+备份 (2)
  5. 2018年职称英语计算机考试,职称英语考试一般过去时的用法
  6. 2020 豆瓣API使用(代理方法) 解决无key方法 code 104解决方法
  7. 34 Places to Get Design Inspiration - Online and Offin
  8. 总裁面对面压轴秀:且听黄飞说全渠道…
  9. 敲代码时如何快速移动光标_HTML网页代码大全
  10. Go关键字--var