1. Managing Sandboxes¶
This guide covers project-related sandboxes. Multiple user may be added to this type of sandbox for collaboration in a project. Besides private sandboxes may be defined for individual users.
2. Creating a Sandbox¶
Project-related sandboxes can be created using the script API_SCURTY.CREATE_SBX. It is strongly recommended to define at least the requestor’s mail address (p_requestor_mail) for notifications within the sadbox workflow.
In this example a sandbox ‘TEST_SBX’ is created wich results in creating a schema named ‘SBX_TEST_SBX’. The lifetime is set to 7 days which means that after 7 days the schema access is locked. However, the requestor will receive no warnings via mail since the mail address is missing. Due to the quota set the sanbox users cannot add more than 2 GB of data.
Example
1EXECUTE SCRIPT API_SCURTY.CREATE_SBX (
2 'TEST_SBX' -- p_sbx_name
3 ,'Test-SBX for testing purposes' -- p_description
4 ,7 -- p_lifetime
5 ,2 -- p_quota
6 ,null -- p_requestor_name
7 ,null -- p_requestor_mail
8 ,null -- p_sbx_comment
9);
Check for a new entry in the table SBX_REPO.
SBX_NAME |
SBX_TYPE |
DESCRIPTION |
LIFETIME |
QUOTA |
REQUESTOR_NAME |
REQUESTOR_MAIL |
SBX_COMMENT |
---|---|---|---|---|---|---|---|
TEST_SBX |
SBX |
Test-SBX for testing purposes |
7 |
2 |
(null) |
(null) |
(null) |
2.1. Managing a Sandbox¶
Change sandbox settigs with the script API_SCURTY.MANAGE_SBX. Providing NULL leaves the parameters as is, while a blank (’ ‘) restores the default value.
In the example below the lifetime value is changed from one week to 5 days and the quota of the sandbox is changed from 2 GB to only 1GB.
Example
1EXECUTE SCRIPT API_SCURTY.MANAGE_SBX (
2 'TEST_SBX' -- p_sbx_name
3 ,null -- p_description
4 ,5 -- p_lifetime
5 ,1 -- p_quota
6 ,null -- p_requestor_name
7 ,null -- p_requestor_mail
8 ,null -- p_sbx_comment
9);
After issuing the beforementioned command the entry in the table SBX_REPO will change as follows:
SBX_NAME |
SBX_TYPE |
DESCRIPTION |
LIFETIME |
QUOTA |
REQUESTOR_NAME |
REQUESTOR_MAIL |
SBX_COMMENT |
---|---|---|---|---|---|---|---|
TEST_SBX |
SBX |
Test-SBX for testing purposes |
5 |
1 |
(null) |
(null) |
(null) |
2.2. Dropping a Sandbox¶
For dropping a sandbox use the script API_SCURTY.DROP_SBX. All data inside the sandbox schema will be loast.
Example
1EXECUTE SCRIPT API_SCURTY.DROP_SBX(
2 'TEST_SBX' -- p_sbx_name
3);
After the script above is executed the entry for the sandbox with the name ‘TEST_SBX’ has vanished from the table SBX_REPO. Also the schema ‘SBX_TEST_SBX’ is gone.