下图清楚地描述了Oracle Database Administrator的身份验证模式。
<a href="http://images.cnblogs.com/cnblogs_com/hyddd/WindowsLiveWriter/PasswordFile_8717/%E9%AA%8C%E8%AF%81%E6%A8%A1%E5%BC%8F.png"></a>
<b>Oracle的验证模式有2种:</b>
(1).<b>Os Authentication</b>:通过登陆操作系统的账号验证身份。
(2).<b>Password Authentication</b>:通过与Password file中的账号做匹对来验证身份。
从上图可以知道,我们有5种方式调用上面2种验证模式:
<b>1.验证方式1</b>
<a href="http://images.cnblogs.com/cnblogs_com/hyddd/WindowsLiveWriter/PasswordFile_8717/Path1.png"></a>
所谓“<b>Local</b>”包括两种情况:
(1).你直接登陆本机的Linux(界面/命令行)。
(2).你用putty等工具连接一个远端的Linux服务器,并登陆Linux(命令行)。
登陆之后,你就可以对数据库进行操作了。
<a href="http://images.cnblogs.com/cnblogs_com/hyddd/WindowsLiveWriter/PasswordFile_8717/Path1Id.png"></a>
如果你登陆系统的账号是属于dba这个Group的话。那么你就可以通过验证方式1直接登陆sqlplus,并操作数据库。
<a href="http://images.cnblogs.com/cnblogs_com/hyddd/WindowsLiveWriter/PasswordFile_8717/Path1Login.png"></a>
这里sqlplus并不要求我们输入登陆的账号密码,直接就可以登录sqlplus并对数据库进行操作。这是因为,我们登陆Linux的账号属于Group=502(dba)。而Oracle认为,如果操作系统账号已经属于dba这个组,那么这个操作系统的账号已经有足够权限对Oracle进行任何操作,所以sqlplus不会再要求在登录时输入sysdba的账号密码(也就说:不需要使用password file)。它的验证方式就如图1所示。
<b>2.验证方式2</b>
<a href="http://images.cnblogs.com/cnblogs_com/hyddd/WindowsLiveWriter/PasswordFile_8717/Path2.png"></a>
如果当登陆Linux的账号不属于group=501(dba)呢?比如:root。见下图:
<a href="http://images.cnblogs.com/cnblogs_com/hyddd/WindowsLiveWriter/PasswordFile_8717/Path2Login_1.png"></a>
当登陆系统的账号不属于group=501(dba)时,就算是root,也必须输入Oracle账号密码才能通过验证,也就是所谓的“使用Password file”。
<b>3.验证方式3</b>
<a href="http://images.cnblogs.com/cnblogs_com/hyddd/WindowsLiveWriter/PasswordFile_8717/Path3.png"></a>
什么是Remote呢?
比如:现在我们在Window下用sqlplus/其他工具连接处于远端的Oracle数据。此时,对于Oracle数据库而言,我们处在远端(Remote)。
什么是Secure Connection呢?
所谓Secure Connection,就是使用SSL或者其他加密算法对传输内容进行加密。比如:你在使用Net Configuration Assistent连接数据库时,会有这样一个选项:
<a href="http://images.cnblogs.com/cnblogs_com/hyddd/WindowsLiveWriter/PasswordFile_8717/Pass3Secure.png"></a>
其中,TCPS就代表Secure的意思!
当你选择使用TCPS协议时,你就可以使用OS Authentication的方式认证。
<b>4.</b><b>验证方式4</b>
<a href="http://images.cnblogs.com/cnblogs_com/hyddd/WindowsLiveWriter/PasswordFile_8717/Path4.png"></a>
与验证方式3同理,不过使用的是Password file这种验证方式。
<b>5.验证方式5</b>
<a href="http://images.cnblogs.com/cnblogs_com/hyddd/WindowsLiveWriter/PasswordFile_8717/Path5.png"></a>
在使用工具连接远端数据库时,如果不使用Secure Connection,那么就只能使用Password file验证用户身份。
本文转自hyddd博客园博客,原文链接:http://www.cnblogs.com/hyddd/archive/2009/08/20/1550398.html,如需转载请自行联系原作者。