NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
S-10
Examples—SECURE Command
If you use SECURE within a user-defined TMF transaction, all resecuring of audited
objects is reversed if SECURE fails during execution.
If you use SECURE outside of a user-defined TMF transaction, SQL automatically
begins a system-defined transaction for each SQL object you resecure. In this case,
only the resecuring of a single object is undone if SECURE fails.
The SECURE operation is not protected by the TMF subsystem for an Enscribe file.
You can press the Break key to interrupt the SECURE utility. SECURE reports the
last object resecured. If a user-defined TMF transaction is not in progress, the
changes made to the database before you pushed the Break key are committed and
the change in progress at the time you push the BREAK key is also committed,
though SECURE does not issue a message confirming the last change. If a user-
defined transaction is in progress, the transaction is rolled back and all changes are
undone.
After pressing the Break key, you can restart the operation by entering the same
command again as shown:
>> SECURE *.*.* FROM CATALOG $VOL1.SUBV1 "NUUU";
>> (press the Break key)
>> SECURE *.*.* FROM CATALOG $VOL1.SUBV1 "NUUU";
You can also use the FC command to repeat the same SECURE command.
Note that restarting a partially-completed SECURE operation from the beginning
can cause errors if the operation changes ownership. You might no longer have
authority to specify ownership for the files whose ownership has already changed.
You can avoid this problem by using the START option in qualified-
fileset-list to restart the operation from the point at which it stopped.
Examples—SECURE Command
The following command resecures all SQL objects from catalog $VOL1.PERSNL
located on subvolume DEPT or JOB so that users on other nodes in the network can
read them but only the owner can write to or purge them:
SECURE (DEPT.*, JOB.*) FROM CATALOG $VOL1.PERSNL, "NUUU";
The following command changes the security and sets the CLEARONPURGE
attribute of all tables, views, and programs from catalog CAT on subvolume SV:
SECURE SV.* FROM CATALOG CAT, "NUUU" CLEARONPURGE ON;
Each of the following SECURE commands uses a different form of a Guardian user
ID to change the owner of a table:
SECURE $VOL1.PERSNL.EMPLOYEE,, OWNER DEPT3.MGR NO LISTALL;
SECURE $VOL1.PERSNL.EMPLOYEE,, OWNER 9,001 NO LISTALL;