Create Views and Trigger
Views and triggers allow applications to interact with the encrypted data in a seamless fashion. When a view is created on a table, the base table is renamed and a view is created with the original name of the table. Additionally, unique triggers are created for inserts and updates.
Views and triggers are created as part of the data migration. Perform this operation only if the views and triggers were previously deleted.
To recreate views and triggers, a user must have the following permissions within the schema in which the table resides:
Create any view
Drop any view
Create any trigger
Drop any trigger
To create views and triggers:
Log on to the CipherTrust Manager GUI.
Click Database Protection to open the application. The Databases screen displays the list of existing database connections, if any.
Click the desired database connection.
Click the Tables link.
On the Authorize Database screen, enter the Database Password to access the tables.
Under the Tables with Encrypted Columns section, click the table for which you want create views and triggers.
From the Table Actions drop-down list, select Create Views and Triggers. The Create Views and Triggers for table for < table name > wizard is displayed. Follow the steps to complete the setup.
b. Preview SQL
Add General Info
On the General Info screen, enter the following details:
Field Description New Table Name New name for the original table. View Name Name of the view that will access the encrypted data. Insert Trigger Name of the insert trigger that will insert values in the original table. Update Trigger Name of the update trigger that will update values in the original table.
Preview the SQL code to be executed. This code can’t be edited. This SQL code will be executed on the database.
If you want to modify General Info details, click Edit and update the fields.
The Perform Operation screen shows the progress of the operation. A message The views and triggers were successfully created. Close the window to return to the list is displayed on the screen. Click Close to exit the wizard.