石家莊百度推廣家莊網(wǎng)站建設(shè)提高搜索引擎檢索效果的方法
19c的TDE wallet的設(shè)置是在數(shù)據(jù)庫中設(shè)置的,也就是粒度為數(shù)據(jù)庫,因此不會有沖突。
而11g的設(shè)置是在sqlnet.ora中,因此有可能產(chǎn)生沖突。
這里先將一個重要概念,按照文檔的說法,wallet是不能被數(shù)據(jù)庫共享的。
If there are multiple Oracle databases installed on the same server (for example, databases sharing the same Oracle binary but using different data files), then each database must access its own Transparent Data Encryption wallet. Wallets are not designed to be shared between databases. By design, there must be one wallet per database. You cannot use the same wallet for more than one database.
方法也很簡單,就是利用環(huán)境變量。
假設(shè)1個數(shù)據(jù)庫服務(wù)器上有2個11g數(shù)據(jù)庫:orcl和orcl2。
sqlnet.ora的內(nèi)容為:
ENCRYPTION_WALLET_LOCATION=(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=/home/oracle/app/oracle/wallet/$ORACLE_SID)))
接下來創(chuàng)建目錄:
mkdir /home/oracle/app/oracle/wallet
mkdir /home/oracle/app/oracle/wallet/orcl
mkdir /home/oracle/app/oracle/wallet/orcl2
然后在各種數(shù)據(jù)庫中創(chuàng)建wallet和master key即可:
-- ORCL
ALTER SYSTEM SET ENCRYPTION KEY IDENTIFIED BY "Easy2rem";-- ORCL2
ALTER SYSTEM SET ENCRYPTION KEY IDENTIFIED BY "Easy2rem";
然后可以看到不同的wallet文件:
$ md5sum /home/oracle/app/oracle/wallet/orcl/ewallet.p12
b417fcbc78e36d00f9fbc9f791dd073c /home/oracle/app/oracle/wallet/orcl/ewallet.p12$ md5sum /home/oracle/app/oracle/wallet/orcl2/ewallet.p12
4ec6259c904023ace23127f00b8645c9 /home/oracle/app/oracle/wallet/orcl2/ewallet.p12
接下來,也就沒什么可說的啦。