Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

70

积分

0

好友

22

主题
1#
发表于 2012-12-7 10:19:13 | 查看: 4389| 回复: 2
数据库版本:oracle 10.2.0.5  Rac(4节点)

操作系统:hp-ux 11.31


遇到的问题:

oracle 有如下用户:

business 业务用户

bxproxy 代理用户


原来开发链接数据库是通过business链接数据库

现在想通过用户代理的方式 用 bxproxy 用户 链接数据库 不开放business的用户名和密码。


alter user business grant connect through bxproxy;

conn  bxproxy/xxxx

select * from tab;


为空



有几点疑问的向大家请教一下:

1、为什么看不到任何 business的对象?

2、代理用户是用来做什么的呢?

3、适合用来解决上述问题的吗?

3#
发表于 2013-1-25 11:20:22
谢谢您了!

回复 只看该作者 道具 举报

2#
发表于 2012-12-7 21:26:04
Proxy authentication is the fifth method that can be used in Oracle databases to help deal with some of the potential issues around middle tier connections.

Oracle Proxy Authentication Options

If the user is either a database user or an enterprise user (maintained via Oracle Internet Directory with a distinguished name) then Oracle offers a solution based on the fact that the end user is actually known to the database. In either of these cases, a pass-through approach or re-authentication approach can be used.

Oracle also has a proxy method that can be used for situations where the end user is known only to the application and not directly to the database. This method is known as an application user model. In this case, the user is tracked via an assigned identifier and the activities can be audited using that identifier rather than end user information.

我的理解 在三层应用中 ,通过proxy user可以实现 只有应用程序识别用户 而不让database直接关联用户。
  1. SQL> create user          proxy_user
  2.   2  identified by        pw_proxy
  3.   3  default tablespace   users
  4.   4  temporary tablespace temp;

  5. User created.

  6. SQL> create user          target_user
  7.   2  identified by        pw_target
  8.   3  default tablespace   users
  9.   4  temporary tablespace temp
  10.   5  quota unlimited on   users;

  11. User created.

  12. SQL> alter user target_user grant connect through proxy_user;

  13. User altered.

  14. SQL> grant create session,
  15.   2        create table
  16.   3  to    target_user;

  17. Grant succeeded.

  18. SQL> connect target_user/pw_target
  19. Connected.
  20. select instance_name from v$instance
  21.                           *
  22. ERROR at line 1:
  23. ORA-00942: table or view does not exist


  24. SQL> create table targets_table (
  25.   2    col  varchar2(10)
  26.   3  );

  27. Table created.

  28. SQL> insert into targets_table values ('foo');

  29. 1 row created.

  30. SQL> commit;

  31. Commit complete.

  32. SQL> connect proxy_user[target_user]/pw_proxy
  33. Connected.
  34. select instance_name from v$instance
  35.                           *
  36. ERROR at line 1:
  37. ORA-00942: table or view does not exist


  38. SQL> select * from targets_table;

  39. COL
  40. ----------
  41. foo

  42. SQL> conn proxy_user/pw_proxy
  43. ERROR:
  44. ORA-01045: user PROXY_USER lacks CREATE SESSION privilege; logon denied


  45. Warning: You are no longer connected to ORACLE.
  46. SQL> conn / as sysdba
  47. Connected.

  48. INSTANCE_NAME
  49. ----------------
  50. VRAC1

  51. SQL> grant dba to proxy_user;

  52. Grant succeeded.

  53. SQL> conn proxy_user/pw_proxy
  54. \Connected.

  55. INSTANCE_NAME
  56. ----------------
  57. VRAC1

  58. SQL> \


  59. SQL> SQL> SQL> SQL> SQL>
  60. SQL>
  61. SQL>
  62. SQL> select  * from tab;

  63. no rows selected
复制代码

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-11-16 09:24 , Processed in 0.053341 second(s), 21 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569