0
点赞
收藏
分享

微信扫一扫

REMOTE_OS_AUTHENT参数详解(原创)

梦想家们 2022-02-13 阅读 44


remote_os_authent概述

Oracle允许用户通过采用外部验证的方式登录数据库。默认情况下,只允许本机的用户采用外部验证登录到数据库中。当将remote_os_authent这个参数设置为true时,则允许远端用户采用外部验证的方式登录到数据库中。

关于外部验证,请参见笔者的下面文章

​​http://czmmiao.iteye.com/blog/1239822​​

示例如下

target数据库上

SQL> show parameter os_aut

NAME                                 TYPE        VALUE

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

os_authent_prefix                    string

remote_os_authent                    boolean     TRUE

SQL> select instance_name from v$instance;

INSTANCE_NAME

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

czmmiao

source数据库上

[hr@ha2 ~]$ id

uid=501(hr) gid=503(hr) groups=501(oinstall),503(hr)

连接到target数据库,其中oookkk为tnsname.ora中的连接字符串

[hr@ha2 ~]$ sqlplus /@oookkk

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Nov 7 17:37:05 2011

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


Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options


SQL> show user;

USER is "HR"


SQL> select instance_name from v$instance;


INSTANCE_NAME

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

czmmiao

将target数据库上的remote_os_authent设置为false

SQL> alter system set remote_os_authent=false scope=spfile;

System altered.


SQL> startup force;

ORACLE instance started.

Total System Global Area  373293056 bytes

Fixed Size                  1219496 bytes

Variable Size             201327704 bytes

Database Buffers          167772160 bytes

Redo Buffers                2973696 bytes

Database mounted.

Database opened.

SQL> show parameter remote_os_authent

NAME                                 TYPE        VALUE

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

remote_os_authent                    boolean     FALSE 

从source数据库登录到target数据库

[hr@ha2 ~]$ sqlplus /@oookkk

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Nov 7 17:39:52 2011

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


ERROR:

ORA-01017: invalid username/password; logon denied


举报

相关推荐

0 条评论