Page 2 of 2

Re: ADS function list

Posted: Wed Aug 03, 2011 11:06 pm
by hag

Re: ADS function list

Posted: Thu Aug 04, 2011 9:37 am
by Francis Barrimbhal
Please, please send me a copy too... :roll: dr.microso@hotmail.com
I am happy and thankful ...

Re: ADS function list

Posted: Thu Aug 04, 2011 10:28 am
by sambomb

Re: ADS function list

Posted: Mon Aug 22, 2016 7:46 pm
by Francisco Valério
I'm working with ADS , but I'm hard of encrypted tables with .adt extension. Someone uses table encryption in ADS and tell me how the process was conducted.

Re: ADS function list

Posted: Mon Aug 22, 2016 10:26 pm
by reinaldocrespo
Hello Francisco;

If these tables are Data Dictionary bound tables, as I suspect they are, then you only need to set the encryption password on the dictionary and then enable encryption for the table in question.

Below is a short SQL script that enables encryption for all tables on a data dictionary:

Code: Select all | Expand


DECLARE EncryptTables CURSOR as
              SELECT *
                FROM System.Tables
               WHERE table_encryption = 0;
OPEN EncryptTables;

WHILE FETCH EncryptTables DO
     EXECUTE PROCEDURE sp_ModifyTableProperty([EncryptTables].[Name],'TABLE_ENCRYPTION','TRUE','APPEND_FAIL',NULL);
END WHILE;

CLOSE EncryptTables;
 


Notice the script above uses an ADS Store Procedure. You could also use ADSEnableEncryption() + AdsEncryptTable() API functions, as in:

Code: Select all | Expand


( cAlias )->( AdsEnableEncryption( "EncryptionPassword" ) )
( cAlias )->( AdsEncryptTable() )
 


FYI - it is also possible to encrypt a single record on a table.

I find it is definitely simpler if using ADS Data Dictionary.

Hope that helps.


Reinaldo.