{"id":1020,"date":"2024-06-05T20:33:18","date_gmt":"2024-06-05T12:33:18","guid":{"rendered":"https:\/\/cn.raksmart.com\/blog\/host\/4141.html"},"modified":"2024-06-05T20:33:18","modified_gmt":"2024-06-05T12:33:18","slug":"oracle-11g-%e8%a1%a8%e7%a9%ba%e9%97%b4%e5%8a%a0%e5%af%86","status":"publish","type":"post","link":"https:\/\/cn.raksmart.com\/blog\/knowledge\/jszc\/1020.html","title":{"rendered":"oracle 11g \u8868\u7a7a\u95f4\u52a0\u5bc6"},"content":{"rendered":"<div class=\"entry-content e-content\" itemprop=\"description articleBody\">\n<p>\u7531\u4e8e\u6211\u4eec\u5728\u521b\u5efa\u8868\u7a7a\u95f4\u540e\u4ea7\u751f\u7684dbf\u6570\u636e\u6587\u4ef6\u662f\u6ca1\u6709\u52a0\u5bc6\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\uff0c\u901a\u8fc7\u7b80\u5355\u7684\u8f6c\u50a8\u6216\u8005strings\u4fbf\u80fd\u67e5\u770b\u91cc\u9762\u7684\u6570\u636e\uff0c\u6240\u4ee5\u5b58\u5728\u7740\u6570\u636e\u6cc4\u9732\u7684\u9690\u60a3\uff0c\u672c\u6587<strong><a href=\"https:\/\/www.raksmart.com\/cps\/7821\" target=\"_blank\" rel=\"noopener\">Raksmart<\/a><a href=\"https:\/\/cn.raksmart.com\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"\u7f8e\u56fd\u670d\u52a1\u5668\uff08\u5728\u65b0\u7a97\u53e3\u6253\u5f00\uff09\">\u7f8e\u56fd\u670d\u52a1\u5668<\/a><\/strong>\u7ed9\u5927\u5bb6\u8bf4\u4e00\u4e0b\u901a\u8fc7wallets\u65b9\u6cd5\u5bf9\u521b\u5efa\u7684\u8868\u7a7a\u95f4\u8fdb\u884c\u52a0\u5bc6\u7684\u65b9\u6cd5<\/p>\n<p><strong>\u52a0\u5bc6\u539f\u7406<\/strong>\uff1a\u901a\u8fc7\u5efa\u7acbWallet \u6587\u4ef6\uff0c\u6765\u4fdd\u5b58\u4e3b\u5bc6\u94a5\uff0c\u4e3b\u5bc6\u94a5\u662f\u52a0\u5bc6\u7b97\u6cd5\u4e2d\u7528\u4e8e\u52a0\u5bc6\u6216\u89e3\u5bc6\u7684\u4e3b\u5bc6\u7801\u4e32\uff0c\u4e00\u822c\u662f\u968f\u673a\u751f\u6210\u3002\u00a0\u52a0\u5bc6\u7b97\u6cd5\u4f7f\u7528\u4e3b\u5bc6\u94a5\u6216\u57fa\u4e8e\u4e3b\u5bc6 \u94a5\u5176\u751f\u6210\u7684\u884d\u751f\u5bc6\u94a5\uff0c\u5bf9\u539f\u59cb\u6570\u636e\u8fdb\u884c\u52a0\u5bc6\u3002\u53ea\u6709\u4f7f\u7528\u4e3b\u5bc6\u94a5\u6216\u914d\u5957\u7684\u884d\u751f\u5bc6\u94a5\uff0c\u624d\u80fd\u5bf9\u52a0\u5bc6\u6570\u636e\u8fdb\u884c\u89e3 \u5bc6\u3002\u5efa\u7acb Wallet \u6587\u4ef6\u65f6\u8981\u8bbe\u5b9a\u8be5\u5bc6\u7801\uff0c\u6253\u5f00\u548c\u5173\u95ed Wallet \u6587\u4ef6\u90fd\u987b\u8981\u63d0\u4f9b\u6b63\u786e\u5bc6\u7801<\/p>\n<p><strong>\u4e00\u3001\u521b\u5efa\u52a0\u5bc6\u8868\u7a7a\u95f4<\/strong><\/p>\n<p>\u521b\u5efawallets\u6587\u4ef6\u5939<\/p>\n<p>[oracle@potato<br \/>\n~]$ mkdir -p \/u01\/app\/oracle\/product\/11.2.0\/dbhome_1\/wallets<\/p>\n<p>\u5728sqlnet.ora\u6587\u4ef6\u79cd\u6307\u5b9awallets\u6587\u4ef6\u5939\u4f4d\u7f6e<\/p>\n<p>[oracle@potato<br \/>\nadmin]$ vi $ORACLE_HOME\/network\/admin\/sqlnet.ora<\/p>\n<p>ENCRYPTION_WALLET_LOCATION=<\/p>\n<p>(SOURCE=<\/p>\n<p>\u00a0<br \/>\n(METHOD=file)<\/p>\n<p>\u00a0 \u00a0<br \/>\n(METHOD_DATA= (DIRECTORY=\/u01\/app\/oracle\/product\/11.2.0\/dbhome_1\/wallets)<\/p>\n<p>\u00a0 )<\/p>\n<p>)<\/p>\n<p>\u67e5\u770b\u5f53\u524d\u6570\u636e\u5e93\u7248\u672c\uff0c\u5fc5\u987b\u662f11.1\u4ee5\u4e0a\uff0c\u56e0\u4e3a\u53ea\u670911.1\u624d\u5f00\u59cb\u6709\u8be5\u529f\u80fd  \u63a8\u8350\u9605\u8bfb\uff1a<a href=\"https:\/\/cn.raksmart.com\/blog\/knowledge\/1018.html\">OGG\u7684\u5b89\u88c5\u4e0e\u914d\u7f6e<\/a><\/p>\n<p>SQL&gt; SHOW<br \/>\nPARAMETER COMPATIBLE<\/p>\n<p>NAME\u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0TYPE\u00a0 \u00a0 \u00a0 \u00a0 VALUE<\/p>\n<p>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br \/>\n\u2014\u2014\u2014\u2013 \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<\/p>\n<p>compatible\u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>\n\u00a0 \u00a0string\u00a0 \u00a0 \u00a0 11.2.0.0.0<\/p>\n<p>\u5efa\u7acb Wallet \u6587\u4ef6<\/p>\n<p>SQL&gt; alter<br \/>\nsystem set encryption key identified by \u201ctomato_16\u201d;<\/p>\n<p>System altered.<\/p>\n<p>\u6211\u4eec\u53ef\u4ee5\u770b\u5230wallets\u6587\u4ef6\u5939\u4e0b\u9762\u4ea7\u751f\u4e86\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6<\/p>\n<p>\u00a0[oracle@potato<br \/>\nwallets]$ cd \/u01\/app\/oracle\/product\/11.2.0\/dbhome_1\/wallets<\/p>\n<p>[oracle@potato<br \/>\nwallets]$ ll<\/p>\n<p>total 4<\/p>\n<p>-rw-r\u2013r\u2013 1<br \/>\noracle oinstall 1573 Dec 14 15:30 ewallet.p12<\/p>\n<p>ps\uff1awallets\u6587\u4ef6\u5939\u4e0b\u5b58\u653e\u7684\u4fe1\u606f\u662f\u4e3b\u5bc6\u94a5\uff0c\u4e22\u5931\u4e86\u8be5\u6587\u4ef6\u5c06\u65e0\u6cd5\u89e3\u5bc6\u8868\u7a7a\u95f4\uff0c\u5373\u8be5\u8868\u7a7a\u95f4\u5c06\u65e0\u6cd5\u8bbf\u95ee<\/p>\n<p>\u67e5\u770b Wallet \u6587\u4ef6\u72b6\u6001<\/p>\n<p>SQL&gt; col<br \/>\nWRL_TYPE format a10<\/p>\n<p>SQL&gt; col<br \/>\nWRL_PARAMETER format a50<\/p>\n<p>SQL&gt; col<br \/>\nSTATUS format a10<\/p>\n<p>SQL&gt; select *<br \/>\nfrom v$encryption_wallet;<\/p>\n<p>WRL_TYPE\u00a0<br \/>\n\u00a0WRL_PARAMETER \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0STATUS<\/p>\n<p>\u2014\u2014\u2014-<br \/>\n\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2013 \u2014\u2014\u2014-<\/p>\n<p>file\u00a0<br \/>\n\u00a0 \u00a0 \u00a0\/u01\/app\/oracle\/product\/11.2.0\/dbhome_1\/wallets\u00a0<br \/>\n\u00a0 OPEN<\/p>\n<p><strong>\u521b\u5efa\u8868\u7a7a\u95f4\u5e76\u52a0\u5bc6<\/strong>\uff0c\u53ef\u7528\u52a0\u5bc6\u7b97\u6cd5\u6709AES192 \/ 3DES168 \/ AES128 \/ AES256\uff0c\u9ed8\u8ba4\u662fAES128<\/p>\n<p>\u6211\u4eec\u8fd9\u91cc\u6307\u5b9a\u4f7f\u75283DES168\u7b97\u6cd5<\/p>\n<p>SQL&gt; create<br \/>\ntablespace mytest\u00a0 datafile \u2018\/u01\/app\/oracle\/oradata\/orcl\/mytest01.dbf\u2019<br \/>\nsize 100m\u00a0 encryption using \u20183DES168\u2019 default storage(encrypt);<\/p>\n<p>Tablespace<br \/>\ncreated.<\/p>\n<p>\u67e5\u770b\u8868\u7a7a\u95f4\u662f\u5426\u52a0\u5bc6<\/p>\n<p>SQL&gt; select<br \/>\ntablespace_name, encrypted from dba_tablespaces;<\/p>\n<p>TABLESPACE_NAME\u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ENC<\/p>\n<p>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br \/>\n\u2014<\/p>\n<p>SYSTEM\u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>\n\u00a0NO<\/p>\n<p>SYSAUX\u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>\n\u00a0NO<\/p>\n<p>UNDOTBS1\u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0NO<\/p>\n<p>TEMP\u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>\n\u00a0 \u00a0NO<\/p>\n<p>USERS\u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>\n\u00a0 NO<\/p>\n<p>EXAMPLE\u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 NO<\/p>\n<p>MYTEST\u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>\n\u00a0YES<\/p>\n<p>7 rows\u00a0<\/p>\n<p>\u67e5\u770b\u52a0\u5bc6\u4fe1\u606f<\/p>\n<p>SQL&gt; select *<br \/>\nfrom v$encrypted_tablespaces;<\/p>\n<p>\u00a0 \u00a0<br \/>\n\u00a0 \u00a0TS# ENCRYPT ENC<\/p>\n<p>\u2014\u2014\u2014-<br \/>\n\u2014\u2014- \u2014<\/p>\n<p>ENCRYTPEDKEY<\/p>\n<p>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014-<\/p>\n<p>MASTERKEYID\u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>\nBLOCKS_ENCRYPTED BLOCKS_DECRYPTED<\/p>\n<p>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2013<br \/>\n\u2014\u2014\u2014\u2014\u2014- \u2014\u2014\u2014\u2014\u2014-<\/p>\n<p>\u00a0 \u00a0<br \/>\n\u00a0 \u00a0 \u00a07 3DES168 YES<\/p>\n<p>612598C962DDEC27F8C6FA4AB040B71D59D4DDF2901B83E00000000000000000<\/p>\n<p>059D5A6FB4A34F2FBFC5FF6EB5CD78EC<\/p>\n<p><strong>\u4e8c\u3001\u5173\u95ed\u548c\u5f00\u542f\u52a0\u5bc6<\/strong><\/p>\n<p>SQL&gt; alter<br \/>\nsystem set encryption wallet close identified by \u201ctomato_16 \u201c;\u00a0<br \/>\n\u00a0<\/p>\n<p>System altered.<\/p>\n<p><strong>ps<\/strong><strong>\uff1a\u5982\u679c<\/strong><strong>wallet<\/strong><strong>\u662f<\/strong><strong>close<\/strong><strong>\u72b6\u6001\uff0c\u6b64\u65f6\u52a0\u5bc6\u8868\u7a7a\u95f4\u662f\u4e0d\u53ef\u7528\u7684\uff0c\u4f8b\u5982\u67e5\u8be2\u3001\u4fee\u6539\u90fd\u4e0d\u5141\u8bb8<\/strong><\/p>\n<p>SQL&gt; alter<br \/>\nsystem set encryption wallet open identified by \u201ctomato_16 \u201c;<\/p>\n<p>System altered.<\/p>\n<p><strong>\u4e09\u3001\u81ea\u52a8\u5f00\u542f\u52a0\u5bc6<\/strong><\/p>\n<p>\u7531\u4e8e\u6570\u636e\u5e93\u91cd\u542f\u4e4b\u540e\uff0c\u52a0\u5bc6\u4f1a\u81ea\u52a8\u5173\u95ed<\/p>\n<p>SQL&gt; col<br \/>\nWRL_PARAMETER format a40\u00a0 \u00a0 \u00a0<\/p>\n<p>SQL&gt; select *<br \/>\nfrom v$encryption_wallet;<\/p>\n<p>WRL_TYPE\u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0WRL_PARAMETER\u00a0 \u00a0 \u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>\nSTATUS<\/p>\n<p>\u2014\u2014\u2014\u2014\u2014\u2014\u2013<br \/>\n\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014- \u2014\u2014\u2014\u2014\u2014\u2014<\/p>\n<p>file\u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>\n\u00a0\/u01\/app\/oracle\/product\/11.2.0\/dbhome_1\/ OPEN<\/p>\n<p>\u00a0 \u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0wallets<\/p>\n<p>SQL&gt; startup<br \/>\nforce;<\/p>\n<p>SQL&gt; col<br \/>\nWRL_PARAMETER format a40\u00a0 \u00a0<\/p>\n<p>SQL&gt;\u00a0<br \/>\nselect * from v$encryption_wallet;<\/p>\n<p>WRL_TYPE\u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0WRL_PARAMETER\u00a0 \u00a0 \u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>\nSTATUS<\/p>\n<p>\u2014\u2014\u2014\u2014\u2014\u2014\u2013<br \/>\n\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014- \u2014\u2014\u2014\u2014\u2014\u2014<\/p>\n<p>file\u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>\n\u00a0\/u01\/app\/oracle\/product\/11.2.0\/dbhome_1\/ CLOSED<\/p>\n<p>\u00a0 \u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0wallets<\/p>\n<p>\u6240\u4ee5\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\uff0c\u8ba9\u5b83\u5728\u6570\u636e\u5e93\u5f00\u542f\u65f6\u81ea\u542f<\/p>\n<p>[oracle@potato<br \/>\nadmin]$ orapki wallet create -wallet<br \/>\n\/u01\/app\/oracle\/product\/11.2.0\/dbhome_1\/wallets -auto_login -pwd tomato_16<\/p>\n<p>SQL&gt; startup<br \/>\nforce;<\/p>\n<p>SQL&gt; col<br \/>\nWRL_PARAMETER format a40\u00a0 \u00a0<\/p>\n<p>SQL&gt;\u00a0<br \/>\nselect * from v$encryption_wallet;<\/p>\n<p>WRL_TYPE\u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0WRL_PARAMETER\u00a0 \u00a0 \u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>\nSTATUS<\/p>\n<p>\u2014\u2014\u2014\u2014\u2014\u2014\u2013<br \/>\n\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014- \u2014\u2014\u2014\u2014\u2014\u2014<\/p>\n<p>file\u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>\n\u00a0\/u01\/app\/oracle\/product\/11.2.0\/dbhome_1\/ OPEN<\/p>\n<p>\u00a0 \u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0wallets<\/p>\n<p>\u6ce8\u610f\uff1a\u8bbe\u7f6e\u81ea\u52a8\u662f\u5bf9\u5bc6\u7801\u6709\u8981\u6c42\u7684\uff0c\u5fc5\u987b\u957f\u5ea6\u5927\u4e8e\u7b49\u4e8e8\u4e2a\u5b57\u7b26\uff0c\u4e14\u5bc6\u7801\u79cd\u5fc5\u987b\u5e26\u6709\u6570\u5b57\u6216\u8005\u7279\u6b8a\u5b57\u7b26\uff0c\u4e0d\u7136\u56de\u62a5\u4ee5\u4e0b\u9519\u8bef  \u66f4\u591a\u5185\u5bb9\u8bf7\u9605\u8bfb\uff1a<a href=\"https:\/\/cn.raksmart.com\/blog\/knowledge\/974.html\">RLWRAP\u7684\u5b89\u88c5\u4e0e\u6ce8\u610f\u4e8b\u9879<\/a><\/p>\n<p>Invalid<br \/>\npassword:Passwords must have a minimum length of eight characters and contain<br \/>\nalphabetic characters combined with numbers or special characters.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7531\u4e8e\u6211\u4eec\u5728\u521b\u5efa\u8868\u7a7a\u95f4\u540e\u4ea7\u751f\u7684dbf\u6570\u636e\u6587\u4ef6\u662f\u6ca1\u6709\u52a0\u5bc6\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\uff0c\u901a\u8fc7\u7b80\u5355\u7684\u8f6c\u50a8\u6216\u8005strings\u4fbf\u2026 <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[1001],"class_list":["post-1020","post","type-post","status-publish","format-standard","hentry","category-jszc","tag-oracle"],"_links":{"self":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts\/1020","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/comments?post=1020"}],"version-history":[{"count":0,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts\/1020\/revisions"}],"wp:attachment":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/media?parent=1020"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/categories?post=1020"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/tags?post=1020"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}