Stringing a datafile…

After reading this article in the Oracle Magazine, i was eager to try the following part myself:

To confirm encryption, you can insert a record with a value “David” for FIRST_NAME and search the datafile you created for the enc128_ts tablespace for that value:

SQL> insert into accounts_enc values (1, 'David' , ...);
$ strings enc128ts_ts.dbf | grep David

This will not show any output, because the “David” value has been stored in an encrypted tablespace. Searching for a cleartext value found nothing, as expected. (Note that if you do a string search in a file of an unencrypted tablespace, a successful search will return the cleartext from the file.)

I got the following:

SQL> create tablespace jeroen datafile '/m001/oradata/OCP04/jeroen.dbf' size 5m;
SQL> create table blaat2 (a number(2), b varchar2(64)) tablespace jeroen;
SQL> insert into blaat2 values (24,'Pouwiel');
SQL> commit;

W2ZZXJFF02():/m001/oradata/OCP04>strings jeroen.dbf|grep Pouwiel
total 17607232
-rw-r-----   1 oinstall 10486272 Mar 25 11:05 OCP04redo11.rdl
-rw-r-----   1 oinstall 10486272 Mar 25 11:40 OCP04redo21.rdl
-rw-r-----   1 oinstall 5903753216 Mar 25 11:45 OCP04users01.dbf
-rw-r-----   1 oinstall 13639680 Mar 25 11:45 OCP04tools01.dbf
-rw-r-----   1 oinstall 786440192 Mar 25 11:45 OCP04system02.dbf
-rw-r-----   1 oinstall 5251072 Mar 25 11:45 jeroen.dbf
-rw-r-----   1 oinstall 1993351168 Mar 25 11:46 OCP04system01.dbf
-rw-r-----   1 oinstall 272637952 Mar 25 11:46 OCP04sysaux01.dbf
-rw-r-----   1 oinstall 10486272 Mar 25 11:46 OCP04redo31.rdl
-rw-r-----   1 oinstall 3883008 Mar 25 11:46 OCP04control01.ctl

I was quite surprised that i didn’t receive any output, till i was fiendishly pointed out by Remi that i might be a good idea to check the redo logs…. Duh

And there ya go:

W2ZZXJFF02():/m001/oradata/OCP04>strings /m002/oradata/OCP04/OCP04redo22.rdl|grep Pouwiel

After a couple of logfile switches:

W2ZZXJFF02():/m001/oradata/OCP04>strings jeroen.dbf|grep Pouwiel

Comments are closed.