{"id":136,"date":"2017-01-07T19:23:16","date_gmt":"2017-01-07T11:23:16","guid":{"rendered":"http:\/\/118.89.218.129\/?p=136"},"modified":"2020-01-06T16:13:06","modified_gmt":"2020-01-06T08:13:06","slug":"database_vault","status":"publish","type":"post","link":"http:\/\/www.rao-bing.cn\/index.php\/2017\/01\/07\/136\/","title":{"rendered":"\u4f7f\u7528\u6280\u672f\u624b\u6bb5\u9650\u5236DBA\u7684\u5371\u9669\u64cd\u4f5c"},"content":{"rendered":"<p><span style=\"color: #5b9bd5; font-size: 28pt;\"><span style=\"font-family: Calibri Light;\"><br \/>\n<\/span><\/span><\/p>\n<h1>\u6982\u8ff0<\/h1>\n<p>\u4f17\u6240\u5468\u77e5\uff0c\u5728\u4e1a\u52a1\u9ad8\u5cf0\u671f\uff0c\u67d0\u4e9b\u9488\u5bf9Oracle\u6570\u636e\u5e93\u7684\u64cd\u4f5c\u5177\u6709\u5f88\u9ad8\u7684\u98ce\u9669\uff0c\u6bd4\u5982\u4fee\u6539\u8868\u7ed3\u6784\u3001\u4fee\u6539\u5b9e\u4f8b\u53c2\u6570\u7b49\u7b49\uff0c\u5982\u679c\u6ca1\u6709\u5145\u5206\u8bc4\u4f30\u548c\u4e86\u89e3\u8fd9\u4e9b\u64cd\u4f5c\u6240\u5e26\u6765\u7684\u5f71\u54cd\uff0c\u8fd9\u4e9b\u64cd\u4f5c\u5f88\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6545\u969c\uff0c\u8f7b\u5219\u5bfc\u81f4\u5e94\u7528\u9519\u8bef\uff0c\u91cd\u5219\u5bfc\u81f4\u6570\u636e\u5e93\u670d\u52a1\u4e0d\u53ef\u7528\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u5728\u975e\u4e1a\u52a1\u9ad8\u5cf0\u671f\uff0c\u67d0\u4e9b\u770b\u4f3c\u98ce\u9669\u4e0d\u5927\u7684\u64cd\u4f5c\u4e5f\u53ef\u80fd\u4f1a\u5bfc\u81f4\u4e25\u91cd\u540e\u679c\uff0c\u6bd4\u5982\u4e0d\u6309\u7ba1\u7406\u6d41\u7a0b\u4fee\u6539\u8868\u7ed3\u6784\uff0c\u5982\u679c\u8fd9\u4e2a\u8868\u6b63\u597d\u662fOracle GoldenGate\u590d\u5236\u7ec4\u7684\u4e00\u90e8\u5206\uff0c\u4fee\u6539\u4e86\u6e90\u7aef\u7ed3\u6784\u800c\u6ca1\u6709\u901a\u77e5OGG\u7684\u76f8\u5173\u4eba\u5458\uff0c\u6ca1\u6709\u5728\u76ee\u6807\u7aef\u8fdb\u884c\u76f8\u540c\u7684\u64cd\u4f5c\uff0c\u800cDDL\u590d\u5236\u529f\u80fd\u4e5f\u6ca1\u6709\u6253\u5f00\u7684\u60c5\u51b5\u4e0b\uff0c\u5c31\u4f1a\u5bfc\u81f4\u590d\u5236\u8fdb\u7a0b\u6545\u969c\uff0c\u5bfc\u81f4\u6570\u636e\u4e0d\u4e00\u81f4\uff0c\u5728\u67d0\u4e9b\u5e94\u7528\u573a\u666f\u4e0b\uff0c\u8fd9\u4e5f\u662f\u5f88\u4e25\u91cd\u7684\u751f\u4ea7\u4e8b\u6545\u3002<\/p>\n<p>\u76ee\u524d\uff0c\u4f20\u7edf\u7684\u5e94\u5bf9\u65b9\u6cd5\u8fd8\u662f\u5f3a\u8c03\u7ba1\u7406\uff0c\u4e0d\u7ba1\u662f\u5ba2\u6237\u8fd8\u662f\u670d\u52a1\u5546\u90fd\u5728\u4e0d\u65ad\u5f3a\u8c03\u5236\u5ea6\u548c\u89c4\u8303\uff0c\u5e0c\u671b\u4ece\u5236\u5ea6\u5efa\u8bbe\u548c\u5de5\u7a0b\u5e08\u7684\u804c\u4e1a\u7d20\u517b\u4e0a\u7740\u624b\uff0c\u9632\u6b62DBA\u7684\u8fd9\u79cd\u968f\u610f\u7684\u5371\u9669\u64cd\u4f5c\u3002<\/p>\n<p>\u4f46\u662f\uff0c\u7ba1\u7406\u5236\u5ea6\u6bd5\u7adf\u662f&#8221;\u8f6f\u6027&#8221;\u7684\uff0c\u628a\u5e0c\u671b\u5bc4\u6258\u5728\u5de5\u7a0b\u5e08\u81ea\u89c9\u5730\u9075\u5b88\u5236\u5ea6\u548c&#8221;\u81ea\u6211\u4fee\u517b&#8221;\u4e0a\uff0c\u5e76\u4e0d\u80fd\u4fdd\u8bc1\u4e07\u65e0\u4e00\u5931\u3002<\/p>\n<p>Oracle\u63d0\u4f9b\u7684\u5b89\u5168\u7ec4\u4ef6\uff0c\u53ef\u4ee5\u7528\u6765\u9650\u5236\u3001\u963b\u65ad\u8fd9\u79cd\u968f\u610f\u7684\u5371\u9669\u64cd\u4f5c\uff0c\u7528\u6280\u672f\u624b\u6bb5\u4fdd\u8bc1\u7ba1\u7406\u5236\u5ea6\u88ab\u9075\u5b88\u3002<\/p>\n<h1>Oracle Database Vault\u7b80\u4ecb<\/h1>\n<p>\u6211\u4eec\u8981\u8ba8\u8bba\u7684\u662fOracle\u6570\u636e\u5e93\u7684\u5b89\u5168\u7ec4\u4ef6\u4e4b\u4e00: Oracle Database Vault\uff08DV\uff09\uff0c\u5b83\u7684\u4e3b\u8981\u529f\u80fd\u662f\u4fdd\u62a4\u654f\u611f\u6570\u636e\u548c\u804c\u8d23\u5206\u79bb\u3002<\/p>\n<p>DV\u4fdd\u62a4\u654f\u611f\u6570\u636e\u4e3b\u8981\u901a\u8fc7Realm\uff08\u5b89\u5168\u57df\uff09\uff0cRealm\u53ef\u4ee5\u7b80\u5355\u7406\u89e3\u4e3a\u654f\u611f\u6570\u636e\u7684\u96c6\u5408\uff0cDV\u901a\u8fc7realm\u7684\u914d\u7f6e\u6765\u6307\u5b9a\u7528\u6237\u662f\u5426\u53ef\u4ee5\u8bbf\u95eeRealm\u4fdd\u62a4\u7684\u6570\u636e\uff0c\u5982\u679c\u5728DV\u4e2d\u6ca1\u6709\u7ed9\u8bbf\u95ee\u6743\u9650\uff0c\u5373\u4f7f\u662fsysdba\u4e5f\u65e0\u6743\u8bbf\u95ee\u53d7Realm\u4fdd\u62a4\u7684\u6570\u636e\uff0c\u8fd9\u662fDV\u7684\u6838\u5fc3\u529f\u80fd\uff0c\u4f46\u4e0d\u662f\u672c\u6587\u7684\u91cd\u70b9\u3002<\/p>\n<p>DV\u8fd8\u6709\u4e00\u4e2a\u5f88\u91cd\u8981\u7684\u529f\u80fd\uff0cCommand Rules\uff0c\u5c31\u662f\u53ef\u4ee5\u6309\u4e00\u5b9a\u7684\u5224\u65ad\u6761\u4ef6\uff0c\u5141\u8bb8\u6216\u963b\u6b62\u6570\u636e\u5e93\u7528\u6237\u6267\u884cDDL\u3001DML\u4ee5\u53caDCL\u547d\u4ee4\uff0c\u800c\u4e14\u5bf9\u7279\u6743\u7528\u6237\uff0c\u5305\u62ecsysdba\u90fd\u6709\u6548\u3002\u8fd9\u4e2a\u529f\u80fd\u6b63\u597d\u53ef\u4ee5\u6ee1\u8db3\u6211\u4eec\u9650\u5236dba\u7684\u9700\u6c42\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/118.89.218.129\/wp-content\/uploads\/2017\/01\/010717_1123_1.png\" alt=\"\" \/><\/p>\n<p>\u5927\u5bb6\u5982\u679c\u60f3\u8be6\u7ec6\u4e86\u89e3DV\u7684\u529f\u80fd\uff0c\u53ef\u4ee5\u8bbf\u95eeOracle\u5b98\u7f51\uff1a<a href=\"http:\/\/www.oracle.com\/technetwork\/database\/options\/database-vault\/index-085211.html\">http:\/\/www.oracle.com\/technetwork\/database\/options\/database-vault\/index-085211.html<\/a><\/p>\n<p>Oracle Database Vault\u6700\u4f4e\u652f\u6301\u7684\u6570\u636e\u5e93\u7248\u672c\u662f9.2.0.8\uff0c\u65e9\u671f\u662f\u5355\u72ec\u7684\u4e00\u4e2a\u5b89\u88c5\u5305\u3002\u4ece11g\u5f00\u59cb\uff0cOracle\u7684\u6570\u636e\u5e93\u5b89\u88c5\u4ecb\u8d28\u4e2d\u5305\u542b\u4e86\u8fd9\u4e2a\u7ec4\u4ef6\uff0c\u60f3\u8981\u4f7f\u7528\u8fd9\u4e2a\u7ec4\u4ef6\u7684\u7528\u6237\u9700\u8981\u5728\u5b89\u88c5\u65f6\u52fe\u9009Database Vault\u9009\u9879\u3002\u9664\u4e86\u5b89\u88c5\u76f8\u5173\u7684\u8f6f\u4ef6\u7ec4\u4ef6\uff0c\u8fd8\u9700\u8981\u5728\u521b\u5efa\u6570\u636e\u5e93\u65f6\uff0c\u521b\u5efa\u76f8\u5173\u7684\u6570\u636e\u5e93\u5bf9\u8c61\u3002<\/p>\n<p>Database Vault\u53ef\u4ee5\u4f7f\u7528\u76f8\u5173\u7684\u5b58\u50a8\u8fc7\u7a0b\u6765\u5b9e\u73b0\u547d\u4ee4\u884c\u65b9\u5f0f\u7684\u914d\u7f6e\u3001\u7ba1\u7406\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7web\u7ba1\u7406\u754c\u9762\u6765\u7ba1\u7406\uff0c\u5728\u65e9\u671f\uff0c\u5fc5\u987b\u5b89\u88c5EM\uff0c\u624d\u80fd\u4f7f\u7528web\u7ba1\u7406\u754c\u9762\uff0c\u4ece11gR2\u8d77\uff0c\u6570\u636e\u5e93\u81ea\u5e26\u7684dbcontrol\u4e5f\u53ef\u4ee5\u8fdb\u884cweb\u754c\u9762\u7684\u7ba1\u7406\u4e86\u3002<\/p>\n<p>\u9664\u4e86\u524d\u9762\u8bb2\u5230\u7684Realm\u548cCommand Rules\uff0c\u8fd8\u6709\u4e24\u4e2a\u6982\u5ff5\u8981\u4ecb\u7ecd\u4e00\u4e0b\uff0c\u4e00\u4e2a\u662fFactor\uff08\u8ba4\u8bc1\u56e0\u5b50\uff09\uff0c\u53e6\u4e00\u4e2a\u662fRule sets\uff08\u89c4\u5219\u96c6\uff09\u3002<\/p>\n<p>Factor\uff08\u8ba4\u8bc1\u56e0\u5b50\uff09\u5c31\u662f\u53ef\u4ee5\u7528\u4e8e\u8fdb\u884c\u6761\u4ef6\u5224\u65ad\u7684\u56e0\u7d20\uff0c\u6bd4\u5982\u5ba2\u6237\u7aef\u4e3b\u673a\u540d\uff0c\u5ba2\u6237\u7aefIP\u7b49\u7b49\uff0cOracle\u5185\u7f6e\u4e86\u4e00\u4e9b\u5e38\u7528\u7684Factor\uff0c\u7528\u6237\u4e5f\u53ef\u4ee5\u81ea\u5df1\u521b\u5efaFactor\uff0cFactor\u53ef\u4ee5\u662f\u4e00\u4e2a\u8868\u8fbe\u5f0f\uff0c\u4e5f\u53ef\u4ee5\u662f\u4e00\u4e2a\u5b58\u50a8\u8fc7\u7a0b\u7684\u8fd4\u56de\u503c\u3002<\/p>\n<p>Rule Sets\u7b80\u5355\u8bf4\u5c31\u662f\u5224\u65ad\u6761\u4ef6\u7684\u96c6\u5408\uff0c\u7c7b\u4f3cSQL\u7684where\u4e4b\u540e\u7684\u5224\u65ad\u6761\u4ef6\uff0c\u5f53\u89c4\u5219\u96c6\u7684\u5224\u65ad\u6761\u4ef6\u8fd4\u56de\u4e3atrue\u65f6\uff0cDV\u5141\u8bb8\u7528\u6237\u8bbf\u95ee\u6570\u636e\u6216\u6267\u884c\u7279\u5b9a\u7684\u547d\u4ee4\u3002Rule sets\u4e2d\u7684Rule\u53ef\u4ee5\u5f15\u7528Factor\u505a\u5224\u65ad\u3002<\/p>\n<h1>\u793a\u4f8b1\uff1a\u53ea\u5141\u8bb8\u5728\u975e\u4e1a\u52a1\u65f6\u95f4\u6267\u884cdrop\u547d\u4ee4<\/h1>\n<p>\u8fd9\u4e2a\u4f8b\u5b50\u662f\u6700\u7b80\u5355\u7684\uff0c\u4e0d\u9700\u8981\u4f7f\u7528Factor\uff0c\u53ea\u4f7f\u7528Rule Sets\u548cCommand Rules\u5c31\u53ef\u4ee5\u5b8c\u6210\u3002\u6211\u4eec\u7528\u6570\u636e\u5e93\u7528\u6237test\u6765\u793a\u8303\uff1a<\/p>\n<p>\u767b\u5f55DV\u7684\u7ba1\u7406\u9875\u9762\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/118.89.218.129\/wp-content\/uploads\/2017\/01\/010717_1123_2.png\" alt=\"\" \/><\/p>\n<p>\u521b\u5efa\u4e00\u4e2aRule Set\uff0c\u540d\u5b57\u53eb&#8221;Can not drop table in business time&#8221;\uff0c\u9009\u62e9Any True\uff0c\u610f\u601d\u662f\u8bf4\u89c4\u5219\u96c6\u4e2d\u7684\u89c4\u5219\uff08\u5224\u65ad\u6761\u4ef6\uff09\u4efb\u4f55\u4e00\u4e2a\u4e3aTrue\uff0c\u89c4\u5219\u96c6\u5224\u65ad\u7ed3\u679c\u5c31\u4e3aTrue\u3002\u5176\u5b9eAll True\u5c31\u76f8\u5f53\u4e8eand\uff0cAny True\u5c31\u76f8\u5f53\u4e8eor<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/118.89.218.129\/wp-content\/uploads\/2017\/01\/010717_1123_3.png\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/118.89.218.129\/wp-content\/uploads\/2017\/01\/010717_1123_4.png\" alt=\"\" \/><\/p>\n<p>\u8fd9\u4e24\u4e2aRULE\u4e5f\u5f88\u597d\u7406\u89e3\uff0c\u5c31\u662f\u5224\u65ad\u5f53\u524d\u65f6\u95f4\u662f\u5426\u4e3a\u4e1a\u52a1\u65f6\u95f4\uff0c\u5728\u8fd9\u91cc\uff0c\u4e3a\u4e86\u4fbf\u4e8e\u505a\u5b9e\u9a8c\uff0c\u628a\u4e1a\u52a1\u65f6\u95f4\u5b9a\u4e49\u4e3a11\uff1a45~11\uff1a55\uff0c\u8fd9\u4e2a\u89c4\u5219\u96c6\u5224\u65ad\u5f53\u524d\u65f6\u95f4\uff0c\u5982\u679c\u5f53\u524d\u65f6\u95f4\u4e0d\u5728\u4e1a\u52a1\u65f6\u95f4\u5185\uff0c\u89c4\u5219\u96c6\u8fd4\u56deTrue\u3002<\/p>\n<p>\u7136\u540e\u521b\u5efaCommand Rule\uff0c\u5982\u4e0b\u56fe\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/118.89.218.129\/wp-content\/uploads\/2017\/01\/010717_1123_5.png\" alt=\"\" \/><\/p>\n<p>\u8fd9\u4e2aCommand Rule\u7684\u610f\u601d\u5c31\u662f\u6307\u5b9a\u7684Rule Set \u8fd4\u56deTrue\u65f6\uff0c\u5141\u8bb8drop test\u7528\u6237\u4e0b\u7684\u8868\uff0c\u5426\u5219\u5373\u4f7f\u662fsysdba\u6216\u8868\u7684owner\u4e5f\u65e0\u6743drop table\u3002<\/p>\n<p>\u6548\u679c\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/118.89.218.129\/wp-content\/uploads\/2017\/01\/010717_1123_6.png\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/118.89.218.129\/wp-content\/uploads\/2017\/01\/010717_1123_7.png\" alt=\"\" \/><\/p>\n<p>\u5176\u4ed6\u6211\u4eec\u60f3\u63a7\u5236\u7684Alter Table\u7b49Command Rule\u7684\u8bbe\u7f6e\u65b9\u6cd5\u7c7b\u4f3c\u3002<\/p>\n<h1>\u5b9e\u4f8b2\uff1a\u53ea\u5141\u8bb8\u7528\u6237\u4f7f\u7528\u7279\u5b9a\u5de5\u5177\uff08\u5e94\u7528\uff09\u767b\u5f55\u6570\u636e\u5e93<\/h1>\n<p>\u5b9e\u9645\u5de5\u4f5c\u4e2d\uff0c\u6211\u4eec\u7ecf\u5e38\u9047\u5230\u8fd9\u6837\u7684\u60c5\u51b5\uff1a\u5e94\u7528\u5f00\u53d1\u4eba\u5458\u90fd\u6709\u5e94\u7528\u7528\u6237\u7684\u53e3\u4ee4\uff0c\u4ed6\u4eec\u53ef\u4ee5\u968f\u610f\u7528SQL*PLUS\u6216PL\/SQL Developer\u8fd9\u6837\u7684\u5de5\u5177\u8fde\u63a5\u5230\u751f\u4ea7\u5e93\u4e0a\uff0c\u5982\u679c\u4e00\u65f6\u641e\u6df7\u4e86\u751f\u4ea7\u5e93\u548c\u6d4b\u8bd5\u5e93\uff0c\u5c31\u53ef\u80fd\u6709\u60b2\u5267\u53d1\u751f\u3002\u6700\u597d\u7684\u89e3\u51b3\u65b9\u6cd5\u5c31\u662f\u9650\u5236\u5e94\u7528\u7528\u6237\u6240\u7528\u7684\u5de5\u5177\uff0c\u5e94\u8be5\u53ea\u5141\u8bb8\u4e2d\u95f4\u4ef6\u4ee5\u8fd9\u4e2a\u7528\u6237\u8fde\u63a5\uff0c\u5176\u4ed6\u5de5\u5177\u90fd\u4e0d\u5141\u8bb8\u8fde\u63a5\u3002<\/p>\n<p>\u8fd9\u4e2a\u4f8b\u5b50\u4f1a\u7528\u5230Factor\uff0c\u9996\u5148\u6211\u4eec\u521b\u5efa\u4e00\u4e2aFactor\uff0c\u53d6\u7528\u6237\u4f1a\u8bdd\u7684Module:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/118.89.218.129\/wp-content\/uploads\/2017\/01\/010717_1123_8.png\" alt=\"\" \/><\/p>\n<p>\u7528SQL*PLUS\u767b\u5f55\u6570\u636e\u5e93\uff0c\u9a8c\u8bc1\u8fd9\u4e2aFactor\u53d6\u51fa\u7684\u503c:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/118.89.218.129\/wp-content\/uploads\/2017\/01\/010717_1123_9.png\" alt=\"\" \/><\/p>\n<p>\u5f15\u7528Factor\u7684\u65b9\u6cd5\u5c31\u662fDVF.F$+Factor name\uff0c\u5728Linux\u672c\u673a\u767b\u5f55\uff0cModule\u5c31\u662f\u4e0a\u9762\u663e\u793a\u7684\u90a3\u6837\uff0c\u5728windows\u4e0a\u8fdc\u7a0b\u767b\u5f55\uff0cModule\u7684\u503c\u662f&#8221;SQLPLUS.EXE&#8221;\u3002<\/p>\n<p>\u4e0b\u9762\u521b\u5efaRule Set\uff0c\u540d\u5b57\u53eb&#8221;Limit SQL*PLUS&#8221;\uff0c<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/118.89.218.129\/wp-content\/uploads\/2017\/01\/010717_1123_10.png\" alt=\"\" \/><\/p>\n<p>\u6ce8\u610f\u662f&#8221;Any True&#8221;<\/p>\n<p>\u521b\u5efaRULE\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/118.89.218.129\/wp-content\/uploads\/2017\/01\/010717_1123_11.png\" alt=\"\" \/><\/p>\n<p>\u521b\u5efaCommand Rule\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/118.89.218.129\/wp-content\/uploads\/2017\/01\/010717_1123_12.png\" alt=\"\" \/><\/p>\n<p>\u6309\u7167\u8fd9\u79cd\u89c4\u5219\uff0c\u9664\u4e86SYS\uff0cSYSTEM\uff0cDV_MANAGER\u4e4b\u5916\u7684\u7528\u6237\uff0c\u4e0d\u7ba1\u662f\u672c\u5730\u8fd8\u662f\u8fdc\u7a0b\uff0c\u90fd\u4e0d\u80fd\u7528SQL*PLUS\u767b\u5f55\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/118.89.218.129\/wp-content\/uploads\/2017\/01\/010717_1123_13.png\" alt=\"\" \/><\/p>\n<p>\u7528SQL Developer\u767b\u5f55\u6b63\u5e38\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/118.89.218.129\/wp-content\/uploads\/2017\/01\/010717_1123_14.png\" alt=\"\" \/><\/p>\n<h1>\u5b9e\u4f8b3\uff1a\u4f7f\u7528Dual Key\u5b89\u5168\u529f\u80fd<\/h1>\n<p>\u73b0\u5b9e\u573a\u666f\u4e2d\uff0c\u6211\u4eec\u5e0c\u671bDBA\u9075\u5b88\u5236\u5ea6\uff0c\u6bd4\u5982\u5728\u4fee\u6539\u8868\u7ed3\u6784\u4e4b\u524d\uff0c\u901a\u77e5OGG\u76f8\u5173\u4eba\u3002\u6216\u8005\u4e3a\u4e86\u589e\u52a0\u5b89\u5168\u6027\uff0c\u8981\u6c42DBA\u505a\u7684\u91cd\u5927\u64cd\u4f5c\uff0c\u5fc5\u987b\u5f97\u5230\u8001\u677f\u7684\u6279\u51c6\u3002DV\u53ef\u4ee5\u5229\u7528Dual Key\u529f\u80fd\u6ee1\u8db3\u8fd9\u79cd\u9700\u6c42\u3002<\/p>\n<p>\u7b80\u5355\u8bf4\uff0c\u6211\u4eec\u53ef\u4ee5\u5199\u4e00\u4e2a\u5b58\u50a8\u8fc7\u7a0b\uff0c\u5224\u65ad\u6d41\u7a0b\u4e2d\u9700\u8981\u901a\u77e5\u7684\u4eba\u662f\u5426\u5728\u7ebf\uff0c\u5982\u679c\u5728\u7ebf\uff0c\u624d\u5141\u8bb8\u6267\u884c\u76f8\u5e94\u7684\u64cd\u4f5c\u3002\u800c\u90a3\u4e2a\u9700\u8981\u88ab\u901a\u77e5\u7684\u4eba\uff0c\u53ea\u8981\u62e5\u6709connect\u6570\u636e\u5e93\u7684\u6743\u9650\u5c31\u884c\uff0c\u4ed6\uff08\u5979\uff09\u7684\u767b\u5f55\u52a8\u4f5c\u5c31\u53d8\u6210\u4e86\u4e00\u79cd\u6388\u6743\u6216\u88ab\u901a\u77e5\u540e\u7684\u786e\u8ba4\u3002<\/p>\n<p>\u5177\u4f53\u6b65\u9aa4\uff1a<\/p>\n<p>\u9996\u5148\u7ed9DV\u7684\u7ba1\u7406\u5458\u6388\u6743\uff0c\u8ba9\u7528\u6237\u53ef\u4ee5\u8bbf\u95ee\u5b57\u5178\u89c6\u56fe\u548c\u7f16\u5199\u5b58\u50a8\u8fc7\u7a0b:<\/p>\n<p style=\"margin-left: 22pt;\">SQL&gt; GRANT CREATE PROCEDURE TO dv_manager;<\/p>\n<p style=\"margin-left: 22pt;\">Grant succeeded.<\/p>\n<p style=\"margin-left: 22pt;\">SQL&gt; GRANT SELECT ON V_$SESSION TO dv_manager;<\/p>\n<p style=\"margin-left: 22pt;\">Grant succeeded.<\/p>\n<p>\u6211\u4eec\u5047\u8bbe\u6388\u6743\u7684\u7528\u6237\u662f&#8221;BOSS&#8221;\uff0c\u800c\u6267\u884c\u64cd\u4f5c\u7684\u7528\u6237\u662f&#8221;TEST&#8221;\uff0c\u76f8\u5e94\u7684\u5224\u65adBOSS\u662f\u5426\u5728\u7ebf\u7684\u5b58\u50a8\u8fc7\u7a0b\u5982\u4e0b\uff1a<\/p>\n<p>CREATE OR REPLACE FUNCTION check_boss_logged_in<\/p>\n<p>return varchar2<\/p>\n<p>authid definer as<\/p>\n<p>v_session_number number := 0;<\/p>\n<p>v_allow varchar2(10) := &#8216;TRUE&#8217;;<\/p>\n<p>v_deny varchar2(10) := &#8216;FALSE&#8217;;<\/p>\n<p>BEGIN<\/p>\n<p>SELECT COUNT(*) INTO v_session_number<\/p>\n<p>FROM SYS.V_$SESSION<\/p>\n<p>WHERE USERNAME = &#8216;BOSS&#8217;;<\/p>\n<p>IF v_session_number &gt; 0<\/p>\n<p>THEN RETURN v_allow;<\/p>\n<p>ELSE<\/p>\n<p>RETURN v_deny;<\/p>\n<p>END IF;<\/p>\n<p>END check_boss_logged_in;<\/p>\n<p>\/<\/p>\n<p>\u4f7f\u7528DV\u7ba1\u7406\u5458\u521b\u5efa\u8fd9\u4e2aFunction\uff0c\u7136\u540e\u6388\u6743\u7ed9DVSYS\uff1a<\/p>\n<p style=\"margin-left: 22pt;\">SQL&gt;GRANT EXECUTE ON check_boss_logged_in to DVSYS;<\/p>\n<p>\u521b\u5efaRule Set:<\/p>\n<p>Name\uff1aDual Key<\/p>\n<p>Evaluation Options\uff1aAny True<\/p>\n<p>\u89c4\u5219\u5982\u4e0b\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/118.89.218.129\/wp-content\/uploads\/2017\/01\/010717_1123_15.png\" alt=\"\" \/><\/p>\n<p>\u521b\u5efaCommand Rule:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/118.89.218.129\/wp-content\/uploads\/2017\/01\/010717_1123_16.png\" alt=\"\" \/><\/p>\n<p>\u8fd9\u4e2aCommand Rule\u8fbe\u5230\u7684\u6548\u679c\u662f\uff0c\u5982\u679ctest\u7528\u6237\u60f3alter owner\u4e3atest\u7684table\uff0c\u5fc5\u987bboss\u7528\u6237\u540c\u65f6\u5728\u7ebf\uff0c\u5426\u5219\u62a5\u9519\uff0c\u65e0\u6743\u9650\u3002\u5982\u679c\u662f\u5176\u4ed6\u4eba\u4fee\u6539test\u7528\u6237\u4e0b\u7684\u8868\uff0c\u4e0d\u53d7\u8fd9\u4e2a\u9650\u5236\u3002<\/p>\n<p>\u6700\u540e\u7684\u6548\u679c\uff1a<\/p>\n<p>BOSS\u7528\u6237\u6ca1\u6709\u5728\u7ebf\uff0c\u90a3\u4e48TEST\u7528\u6237alter table\u62a5\u9519<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/118.89.218.129\/wp-content\/uploads\/2017\/01\/010717_1123_17.png\" alt=\"\" \/><\/p>\n<p>\u53ea\u6709\u5728test\u7528\u6237\u901a\u77e5\u4e86boss\u7528\u6237\uff0c\u6216\u8005\u6309\u7167\u6d41\u7a0b\uff0c\u5f97\u5230\u4e86boss\u7528\u6237\u7684\u6279\u51c6\uff0cboss\u7528\u6237\u7528\u767b\u5f55\u6570\u636e\u5e93\u8fd9\u4e2a\u52a8\u4f5c\u6765\u4ee3\u8868\u786e\u8ba4\uff0ctest\u7528\u6237\u624d\u53ef\u4ee5\u4fee\u6539\u8868\u7ed3\u6784\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/118.89.218.129\/wp-content\/uploads\/2017\/01\/010717_1123_18.png\" alt=\"\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8ff0 \u4f17\u6240\u5468\u77e5\uff0c\u5728\u4e1a\u52a1\u9ad8\u5cf0\u671f\uff0c\u67d0\u4e9b\u9488\u5bf9Oracle\u6570\u636e\u5e93\u7684\u64cd\u4f5c\u5177\u6709\u5f88\u9ad8\u7684\u98ce\u9669\uff0c\u6bd4\u5982\u4fee\u6539\u8868\u7ed3\u6784\u3001\u4fee\u6539\u5b9e\u4f8b\u53c2\u6570\u7b49\u7b49\uff0c\u5982\u679c\u6ca1\u6709\u5145\u5206\u8bc4\u4f30\u548c\u4e86\u89e3\u8fd9\u4e9b\u64cd\u4f5c\u6240\u5e26\u6765\u7684\u5f71\u54cd\uff0c\u8fd9\u4e9b&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"http:\/\/www.rao-bing.cn\/index.php\/2017\/01\/07\/136\/\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":118,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"aside","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[6],"tags":[9,10],"class_list":["post-136","post","type-post","status-publish","format-aside","has-post-thumbnail","hentry","category-oracle","tag-oracle","tag-security","post_format-post-format-aside"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"http:\/\/www.rao-bing.cn\/wp-content\/uploads\/2017\/01\/010717_1123_1.png","jetpack_shortlink":"https:\/\/wp.me\/p8gSFq-2c","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":518,"url":"http:\/\/www.rao-bing.cn\/index.php\/2017\/01\/22\/518\/","url_meta":{"origin":136,"position":0},"title":"Oracle Database 12c Data Redaction","author":"raobing","date":"2017-01-22","format":"aside","excerpt":"\u00a0 \u4ec0\u4e48\u662fData Redaction Data Redaction\u662fOracle Dat\u2026","rel":"","context":"\u5728\u201cOracle\u201d\u4e2d","block_context":{"text":"Oracle","link":"http:\/\/www.rao-bing.cn\/index.php\/category\/oracle\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.rao-bing.cn\/wp-content\/uploads\/2017\/01\/clip_image034_thumb-1.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rao-bing.cn\/wp-content\/uploads\/2017\/01\/clip_image034_thumb-1.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.rao-bing.cn\/wp-content\/uploads\/2017\/01\/clip_image034_thumb-1.jpg?resize=525%2C300 1.5x"},"classes":[]},{"id":848,"url":"http:\/\/www.rao-bing.cn\/index.php\/2018\/01\/11\/848\/","url_meta":{"origin":136,"position":1},"title":"\u4f7f\u7528Oracle EM13c\u7ba1\u7406\u6570\u636e\u5e93\u79c1\u6709\u4e91","author":"raobing","date":"2018-01-11","format":"aside","excerpt":"\u5b9e\u73b0Oracle\u6570\u636e\u5e93\u79c1\u6709\u4e91\u7684\u65b9\u5f0f\u6709\u4e24\u7c7b\uff1aIaaS\u548cPaaS\uff0c\u56e0\u4e3aIaaS\u4f1a\u4f7f\u7528\u57fa\u7840\u67b6\u6784\u865a\u62df\u5316\u6280\u672f\uff0c\u2026","rel":"","context":"\u5728\u201cOracle\u201d\u4e2d","block_context":{"text":"Oracle","link":"http:\/\/www.rao-bing.cn\/index.php\/category\/oracle\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.rao-bing.cn\/wp-content\/uploads\/2018\/01\/clip_image044_thumb.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rao-bing.cn\/wp-content\/uploads\/2018\/01\/clip_image044_thumb.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.rao-bing.cn\/wp-content\/uploads\/2018\/01\/clip_image044_thumb.jpg?resize=525%2C300 1.5x"},"classes":[]},{"id":444,"url":"http:\/\/www.rao-bing.cn\/index.php\/2017\/01\/21\/444\/","url_meta":{"origin":136,"position":2},"title":"\u4f7f\u7528Oracle DV\u9632\u8303\u6bd4\u7279\u5e01\u52d2\u7d22","author":"raobing","date":"2017-01-21","format":"aside","excerpt":"\u00a0 \u4f5c\u4e3aOracle DBA\uff0c\u5e94\u8be5\u90fd\u4f1a\u77e5\u9053\u524d\u4e00\u9635\u6709\u4eba\u501f\u52a9PL\/SQL Developer\u7684\u2026","rel":"","context":"\u5728\u201cOracle\u201d\u4e2d","block_context":{"text":"Oracle","link":"http:\/\/www.rao-bing.cn\/index.php\/category\/oracle\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.rao-bing.cn\/wp-content\/uploads\/2017\/01\/14525862775525.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rao-bing.cn\/wp-content\/uploads\/2017\/01\/14525862775525.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.rao-bing.cn\/wp-content\/uploads\/2017\/01\/14525862775525.jpg?resize=525%2C300 1.5x"},"classes":[]},{"id":182,"url":"http:\/\/www.rao-bing.cn\/index.php\/2017\/01\/07\/182\/","url_meta":{"origin":136,"position":3},"title":"Database Replay\u548cConsolidated Database replay","author":"raobing","date":"2017-01-07","format":false,"excerpt":"\u7b80\u4ecb \u5728\u6570\u636e\u5e93\u7684\u8fc1\u79fb\u548c\u5347\u7ea7\u573a\u666f\u4e2d\uff0c\u6211\u4eec\u7ecf\u5e38\u4f1a\u9047\u5230\u4e00\u4e2a\u95ee\u9898\uff1a\u5728\u505a\u538b\u529b\u6d4b\u8bd5\u65f6\uff0c\u5982\u4f55\u6a21\u62df\u771f\u5b9e\u7684\u4e1a\u52a1\u538b\u529b\uff0c\u89e3\u2026","rel":"","context":"\u5728\u201cOracle\u201d\u4e2d","block_context":{"text":"Oracle","link":"http:\/\/www.rao-bing.cn\/index.php\/category\/oracle\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.rao-bing.cn\/wp-content\/uploads\/2017\/01\/010717_1407_DatabaseRep1.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rao-bing.cn\/wp-content\/uploads\/2017\/01\/010717_1407_DatabaseRep1.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.rao-bing.cn\/wp-content\/uploads\/2017\/01\/010717_1407_DatabaseRep1.png?resize=525%2C300 1.5x"},"classes":[]},{"id":16136,"url":"http:\/\/www.rao-bing.cn\/index.php\/2020\/06\/28\/16136\/","url_meta":{"origin":136,"position":4},"title":"\u795e\u821f\u901a\u7528\u6570\u636e\u5e93\u8bfb\u5199\u5206\u79bb\uff08RW\uff09\u96c6\u7fa4","author":"raobing","date":"2020-06-28","format":"aside","excerpt":"\u795e\u821f\u901a\u7528\u6570\u636e\u5e93\u8bfb\u5199\u5206\u79bb\uff08RW\uff09\u96c6\u7fa4\u7684\u67b6\u6784\u56fe\u5982\u4e0b\u6240\u793a\uff0c \u548c\u795e\u901aDB\u7684HA\u67b6\u6784\u4e0d\u540c\uff0cRW\u96c6\u7fa4\u662fshare\u2026","rel":"","context":"\u5728\u201c\u53bbO\u201d\u4e2d","block_context":{"text":"\u53bbO","link":"http:\/\/www.rao-bing.cn\/index.php\/tag\/de-oracle\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.rao-bing.cn\/wp-content\/uploads\/2020\/06\/image_thumb-2.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rao-bing.cn\/wp-content\/uploads\/2020\/06\/image_thumb-2.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.rao-bing.cn\/wp-content\/uploads\/2020\/06\/image_thumb-2.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.rao-bing.cn\/wp-content\/uploads\/2020\/06\/image_thumb-2.png?resize=700%2C400 2x"},"classes":[]},{"id":205,"url":"http:\/\/www.rao-bing.cn\/index.php\/2017\/01\/07\/205\/","url_meta":{"origin":136,"position":5},"title":"\u5229\u7528Oracle RUEI+EM12c\u8fdb\u884c\u5e94\u7528\u7684\u201c\u7aef\u5230\u7aef\u201d\u6027\u80fd\u8bca\u65ad","author":"raobing","date":"2017-01-07","format":false,"excerpt":"\u6982\u8ff0 \u6211\u4eec\u77e5\u9053\uff0c\u5f71\u54cd\u4e00\u4e2aB\/S\u5e94\u7528\u6027\u80fd\u7684\u56e0\u7d20\uff0c\u7c97\u7565\u5730\u8bf4\uff0c\u6709\u4ee5\u4e0b\u51e0\u4e2a\u5927\u7684\u73af\u8282\uff1a \u5ba2\u6237\u7aef\u73af\u8282 \u7f51\u7edc\u73af\u8282\uff08\u2026","rel":"","context":"\u5728\u201cOracle\u201d\u4e2d","block_context":{"text":"Oracle","link":"http:\/\/www.rao-bing.cn\/index.php\/category\/oracle\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.rao-bing.cn\/wp-content\/uploads\/2017\/01\/010717_1555_OracleRUEIE1.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rao-bing.cn\/wp-content\/uploads\/2017\/01\/010717_1555_OracleRUEIE1.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.rao-bing.cn\/wp-content\/uploads\/2017\/01\/010717_1555_OracleRUEIE1.png?resize=525%2C300 1.5x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.rao-bing.cn\/index.php\/wp-json\/wp\/v2\/posts\/136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.rao-bing.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.rao-bing.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.rao-bing.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.rao-bing.cn\/index.php\/wp-json\/wp\/v2\/comments?post=136"}],"version-history":[{"count":2,"href":"http:\/\/www.rao-bing.cn\/index.php\/wp-json\/wp\/v2\/posts\/136\/revisions"}],"predecessor-version":[{"id":139,"href":"http:\/\/www.rao-bing.cn\/index.php\/wp-json\/wp\/v2\/posts\/136\/revisions\/139"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.rao-bing.cn\/index.php\/wp-json\/wp\/v2\/media\/118"}],"wp:attachment":[{"href":"http:\/\/www.rao-bing.cn\/index.php\/wp-json\/wp\/v2\/media?parent=136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.rao-bing.cn\/index.php\/wp-json\/wp\/v2\/categories?post=136"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.rao-bing.cn\/index.php\/wp-json\/wp\/v2\/tags?post=136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}