
{"id":8167,"date":"2019-08-15T13:33:38","date_gmt":"2019-08-15T13:33:38","guid":{"rendered":"https:\/\/rax-stg-wp-aws.com\/blogs\/secure-an-oracle-database-by-using-transparent-data-encryption\/"},"modified":"2026-11-03T19:29:28","modified_gmt":"2026-11-03T19:29:28","slug":"secure-an-oracle-database-by-using-transparent-data-encryption","status":"publish","type":"blogs","link":"https:\/\/www.rackspace.com\/de\/blogs\/secure-an-oracle-database-by-using-transparent-data-encryption\/","title":{"rendered":"Secure an Oracle database by using Transparent Data Encryption"},"content":{"rendered":"<p><strong>Introduction<\/strong><\/p>\n<p>TDE enables the encryption of sensitive database data, which is stored in the&nbsp;operating system files. It provides secure storage and management of encryption&nbsp;keys in a security module located outside the database.<\/p>\n<p>Encrypted data is transparently decrypted for a database user who has access to&nbsp;the data. TDE stores the encryption keys in a security module external to the&nbsp;database.<\/p>\n<p>This blog covers the essentials of how to use the advanced security option to&nbsp;secure sensitive data within an Oracle\u00a9 database by using Transparent Data&nbsp;Encryption (TDE). This feature enables you to encrypt database columns and&nbsp;manage encryption keys.<\/p>\n<p><strong>Why use TDE?<\/strong><\/p>\n<p>If thieves steal backup tapes of the database, and restore it on their own&nbsp;server, they have access to the company&#8217;s most sensitive data. This is an&nbsp;unacceptable risk. Most company regulations and guidelines consider protecting&nbsp;database data a compliance requirement. How can you protect your database from&nbsp;this vulnerability?<\/p>\n<p>One solution is to encrypt the sensitive data in the database and to store the&nbsp;encryption keys in a separate location. Without the keys, any stolen data is&nbsp;worthless.<\/p>\n<p><strong>How does TDE work?<\/strong><\/p>\n<p>TDE is a key-based access control system. Even if the encrypted data is&nbsp;retrieved, it is useless without authorized decryption, which occurs&nbsp;automatically for users authorized to access the table.<\/p>\n<p>For tables containing encrypted columns, the encryption key is called the&nbsp;column encryption key. Each table&#8217;s column encryption key is encrypted with the&nbsp;database server&#8217;s master key. The master encryption key is stored outside the&nbsp;database in the Oracle Wallet.<\/p>\n<p>Encrypted table keys are placed in the data dictionary. When a user enters data&nbsp;into a column this is defined as encrypted, Oracle performs the following tasks:<\/p>\n<p>1) It retrieves the master key from the wallet.<br \/>\n2) It decrypts the encryption key for that table from the data dictionary.<br \/>\n3) It uses that encryption key on the input value.<br \/>\n4) It stores the encrypted data in the database.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26617-body-Picture1_17.png\" alt=\"oracle tde pic 1\" \/><\/p>\n<p><a href=\"https:\/\/docs.oracle.com\/database\/121\/ASOAG\/img\/GUID-5FD3A3BB-441C-4C42-A520-1248974627B0-default.png\"><em>Image Source<\/em><\/a>&nbsp;<\/p>\n<p>TDE encrypts the data in the following database files:<\/p>\n<ul>\n<li>&#8211;&nbsp;&nbsp; &nbsp;The datafile<\/li>\n<li>&#8211;&nbsp;&nbsp; &nbsp;The redo log and archive log files<\/li>\n<li>&#8211;&nbsp;&nbsp; &nbsp;Memory<\/li>\n<li>&#8211;&nbsp;&nbsp; &nbsp;The file backup<\/li>\n<\/ul>\n<p><strong>Managing Oracle Wallet<\/strong><\/p>\n<p>This section describes creating, opening, and closing the wallet.<\/p>\n<p><strong>Create the wallet<\/strong><\/p>\n<p>When you first enable TDE, you must create the wallet where the master key is<br \/>\nstored.<\/p>\n<p>By default, the wallet is created in the <strong>$ORACLE\\_BASE\/admin\/$ORACLE\\_SID\/wallet<\/strong>,&nbsp;but you can set a different&nbsp; location by specifying it in <strong>sqlnet.ora<\/strong>&nbsp;in the&nbsp;following lines:<\/p>\n<p><em>&nbsp;ENCRYPTION_WALLET_LOCATION = (SOURCE =<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(METHOD = FILE)<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(METHOD_DATA =<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(DIRECTORY =D:\\oracle\\product\\Wallet)))<\/em><\/p>\n<p>Next, run the following command to create the wallet:<br \/>\n&nbsp;<br \/>\n&nbsp; &nbsp; <em>ALTER SYSTEM SET ENCRYPTION KEY [certificate_ID] IDENTIFIED BY password;<\/em><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26617-body-Picture2_14.png\" alt=\"Oracle TDE Pic 2\" \/><\/p>\n<p>&#8211; The wallet <strong>password<\/strong>&nbsp;is case sensitive. Enclose the password string in&nbsp;double quotation marks (&#8221; &#8220;).<\/p>\n<p>&#8211; The <strong>certificate\\_ID<\/strong> is an optional string containing the unique&nbsp;&nbsp; identifier of a certificate stored in the Oracle wallet. You can search for a&nbsp;certificate_ID by querying the <strong>V$WALLET<\/strong>&nbsp;fixed view when the wallet is open.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26617-body-Picture3_8.png\" alt=\"oracle tde pic 3\" \/><\/p>\n<p>&nbsp;<strong>Open and close the wallet<\/strong><\/p>\n<p>After you create the wallet and set the password, you need to open the wallet&nbsp;explicitly by using <em>SYS<\/em>, <em>SYSTEM<\/em>, or <em>SYSDBA<\/em> accounts every time you start&nbsp;the database.<\/p>\n<p>For example, run the following command:<\/p>\n<p>&nbsp; <em>&nbsp; alter system set encryption wallet open identified by &#8220;oracle12345&#8221;;<\/em><\/p>\n<p><strong>Important:<\/strong> To perform any action on database, you must open the wallet.&nbsp;The following example demonstrates a database operation where the database is&nbsp;up but the wallet is closed:<\/p>\n<p><em>&nbsp; &nbsp; alter system set encryption wallet close;<\/em><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26617-body-Picture4_7.png\" alt=\"oracle tde pic 4\" \/><\/p>\n<p>Now, if you try to retrieve the data from an encrypted column, the following&nbsp;error message displays because the wallet is closed:<\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26617-body-Picture5_7.png\" alt=\"oracle tde pic 5\" \/><\/p>\n<p>&nbsp;To retrieve the data from an encrypted column, you need to open a wallet by&nbsp;using the following command:<\/p>\n<p><em>&nbsp; &nbsp; alter system set encryption wallet open identified by &#8220;oracle12345&#8221;;<\/em><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26617-body-Picture6_5.png\" alt=\"oracle tde pic 6\" \/><\/p>\n<p>\nNow you can retrieve data from the encrypted columns because the wallet is open.<\/p>\n<p><strong>Create tables with an encrypted column&nbsp;<\/strong><\/p>\n<p>Use the following command to create a table with an encrypted column:<\/p>\n<p><em>&nbsp; &nbsp; CREATE TABLE test2 (id number,name varchar2(20),s_s_num number ENCRYPT);<\/em><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26617-body-Picture7_5.png\" alt=\"oracle tde pic 7\" \/><\/p>\n<p><strong>&nbsp;Create tables using a non-default algorithm and the NO SALT option&nbsp;<\/strong><\/p>\n<p>SALT is a random string that is added to the data before it is encrypted to make&nbsp;it even more secure and harder to hack. By default, TDE adds SALT to the&nbsp;cleartext before encrypting it.<\/p>\n<p>You can\u2019t create and index on a column which is encrypted with the SALT option.&nbsp;If you want to add index on the encrypted column, you must use the NO SALT&nbsp;option such as the following example:<\/p>\n<p><em>CREATE TABLE test3 (id number,name varchar2(20),s_s_num number ENCRYPT NO SALT,Ph_no number ENCRYPT USING &#8216;3DES168&#8217;);<\/em><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26617-body-Picture8_5.png\" alt=\"oracle tde pic 8\" \/><\/p>\n<p>Here, the <strong>S\\_S\\_NUM<\/strong>&nbsp;column is encrypted with the NO SALT option and the&nbsp;<strong>PH_NO<\/strong>&nbsp;column is created with a default SALT option.<\/p>\n<p>The following example shows that you can&#8217;t create an index on the <strong>PH_NO&nbsp;<\/strong>column because you created it with the SALT option by default.<\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26617-body-Picture9_3.png\" alt=\"oracle tde pic 9\" \/><\/p>\n<p><strong>&nbsp;Encrypt columns in existing tables&nbsp;<\/strong><\/p>\n<p>The following command encrypts a column in an existing table:<\/p>\n<p><em>&nbsp; &nbsp; ALTER TABLE test1 ADD (ssn VARCHAR2(11) ENCRYPT);<\/em><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26617-body-Picture10_4.png\" alt=\"oracle tde pic 10\" \/><\/p>\n<p><strong>&nbsp;&nbsp;Disable encryption on a column<\/strong><\/p>\n<p>The following command disables encryption on a column:<\/p>\n<p><em>&nbsp; &nbsp; ALTER TABLE test1 MODIFY (ssn DECRYPT);<\/em><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26617-body-Picture11_3.png\" alt=\"oracle tde pic 11\" \/><\/p>\n<p><strong>&nbsp;Restrictions on using TDE&nbsp;<\/strong><\/p>\n<p>Keep the following restrictions on using TDE in mind:<\/p>\n<p>&#8211; You cannot create any index other than a B-tree on an encrypted column.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26617-body-Picture12_2.png\" alt=\"oracle tde pic 12\" \/><\/p>\n<p>&#8211; Encryption is not allowed on external large objects (BFILE).<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26617-body-Picture13_1.png\" alt=\"oracle tde pic 13\" \/><\/p>\n<p>&#8211; You cannot perform import or export operations if the wallet is closed.<\/p>\n<p><strong>Error because wallet is closed<\/strong><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26617-body-Picture14_1.png\" alt=\"oracle tde pic 14\" \/><\/p>\n<p><strong>Success because wallet is open<\/strong>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26617-body-Picture15_1.png\" alt=\"oracle tde pic 15\" \/><\/p>\n<p>&nbsp;&nbsp;<strong>Conclusion<\/strong><\/p>\n<p>If you need to secure sensitive data from unauthorized, or back-door, access,&nbsp;use the TDE security option. This feature lets you immediately provide data&nbsp;encryption and compliance with no coding and key management complexity. Thus,&nbsp;it enables you to focus on more strategic efforts.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Secure an Oracle database by using Transparent Data Encryption<\/p>\n","protected":false},"author":2,"featured_media":8169,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","format":"standard","meta":{"content-type":"","nid":"26617","content_type":"blog","created_by":"10130","authored_on":"2024-02-18T14:33:38+00:00","field_article_industries":"","tag_category":"Technical","field_blog_author_text":"by Rackspace Technology Staff","seo_description":"Secure sensitive data in an Oracle database with Transparent Data Encryption (TDE). Explore TDE essentials and key management.\r\n","field_featured_image":"","insights_image":"\/wp-content\/uploads\/2026\/blog_technical_images\/26617-insights_image-oracle-technical-blog-1-insights.jpg","field_partners":"","rxt_platforms":"Oracle","product":"","publisheddate":"2019-08-15T13:33:38","rxt_solutions":"Databases","opengraph_tag":"","x_tag":"","teaser_flag":"Technical Blog","seo_titile":"Secure an Oracle database using Transparent Data Encryption | Rackspace Technology","field_topics":"","field_slug":"secure-oracle-database-by-using-transparent-data-encryption","footnotes":""},"categories":[178],"tags":[204],"class_list":["post-8167","blogs","type-blogs","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-technical"],"_links":{"self":[{"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/blogs\/8167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/blogs"}],"about":[{"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/types\/blogs"}],"author":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/comments?post=8167"}],"version-history":[{"count":3,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/blogs\/8167\/revisions"}],"predecessor-version":[{"id":9937,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/blogs\/8167\/revisions\/9937"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/media\/8169"}],"wp:attachment":[{"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/media?parent=8167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/categories?post=8167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/tags?post=8167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}