Monday, July 11, 2016

Tablespace Encryption in Oracle 11g

Tablespace encryption helps us to secure the complete contents of one Tablespace instead of encrypt column by column. This method is one of Oracle Transparent Data Encryption (TDE) feature. TDE is a part of the Oracle Advanced Security Option which also includes Strong Authentication and Network encryption. It is only avaible in the Enterprise Edtion of the database as extra cost option. We must complete three steps to encrypt our data. 1. Create a Wallet Berfore we can create a encrypted tablespace we must first create a Oracle Wallet which holds the encryption key. The database read the sqlnet.ora File to find the wallet. If no entry is present in the sqlnet.ora File the database trys to find the Wallet under $ORACLE_HOME/admin/$ORACLE_SID/wallet. 2. Create a Tablespace CREATE TABLESPACE lobts3 DATAFILE '/u01/app/oracle/oradata/orcl/lobtbs3.dbf' SIZE 20M AUTOEXTEND ON NEXT 64K ENCRYPTION USING 'AES256' DEFAULT STORAGE(ENCRYPT); 3. Test the encryption To check the encrypted tablesapce select * from dba_tablespaces where encrypted='YES' select a.name, b.TS#, b.ENCRYPTEDTS, b.ENCRYPTIONALG from V$TABLESPACE A, V$ENCRYPTED_TABLESPACES B where A.ts# = B.ts#; reference: https://petesdbablog.wordpress.com/2013/04/20/tablespace-encryption-in-oracle-11g/ http://dbaworkshop.blogspot.co.id/2014/06/How-to-encrypt-the-data-tablespace-or-columns-table-using-a-software-keystore-previously-known-as-Oracle-Wallet.html

Wednesday, July 09, 2014

Convert Text to Number in Excel 2010

In my case, i want to try to summarize total record which the data taken from my Outlook Email. So i copy the data to Excel 2010, than i use text to column function to separate the columns. So in my excel look like picture below:


Then i want to summarize data in column B, but the result is not like I expected. The summarize just only took data from 10th row. Please see picture below:


This is happen because all data in column B is in Text format, and contain &nbsp(from HTML) character in begining and end of cells , except for row number ten. So it is can not be convert to number easily.

To solve this problem, i convert Text to Number forcely with tricky Paste Special:
1. Remove space (&nbsp) character in begining and end of cells with this function
    =(TRIM(SUBSTITUTE(B1,CHAR(160),CHAR(32))))+0

2.  Write 0 in other cell, then Copy the cell
2. Select the range cells in column C
3. Right click the selected range cells, and choose Paste Special option from context menu


4. In Paste Special dialog box, choose chek the All option and Add option, then click OK button


5. You can see total in column C is now the right value