Subset a Database
To subset a database, you use the Subset database wizard. You can start the wizard with or without a subsetting policy open. The wizard walks you through various tasks. Step 2 is not required if you started the wizard while you had a policy open.
- Step 1: Provide basic information
- Step 2: Tables and subsetting rules - Required only if you started the wizard without a subsetting policy open
- Step 3: Select subsetting options
- Step 4: Configure data masking
- Step 5: Review and submit
Step 1: Provide Basic Information
-
Start the subsetting wizard:
- To start the wizard with a subsetting policy open: Under Data Safe - Database Security, expand Data subsetting, and then select Subsetting policies. Find your subsetting policy and open it. In the upper-right corner, select Subset database.
- To start the wizard without a subsetting policy open: Under Data Safe - Database Security, select Data subsetting. In the upper-right corner, select Subset database.
The wizard opens at Step 1: Provide basic information.
-
From the dropdown lists, select a database compartment and a database name.
-
Enter your database credentials (username and password).
Credentials are securely stored and used to refresh database statistics, estimate database size reduction, run the subsetting job, and apply data masking when configured.
-
If you don’t have any statistics yet, select Refresh database statistics to refresh the view of the latest statistics. This action may take time for large databases.
-
Review the statistics:
- Size of all tables
- Row count for all tables
-
(If you didn’t start with a subsetting policy open) Select a subsetting policy compartment and subsetting policy name. Review the information about your subsetting policy. (Optional) Select View for Schemas to open the Schemas panel and view the full list of schemas. Select Close when you’re done.
If you haven’t created a subsetting policy, select Create subsetting policy and follow the instructions here: Create a Subsetting Policy for a Target Database.
-
Select Next.
Step 2: Tables and Subsetting Rules
This step is skipped if you started the wizard with a subsetting policy open.
-
Review the estimated size reductions for the driving table and its related tables.
-
To view more detail for a schema, select its three dots, and then select View details. The Rule details panel opens. You can review the following information. Select Close when you’re done.
- Condition
- Related table actions for ancestors, descendants, and other related tables
- Size and row count estimates (Impact on size, Impact on row count)
- Processing sequence for the tables (Select View processing sequence to view the order, and then select Close.)
-
To view the processing sequence for a table, select its three dots, and then select View processing sequence. The Processing sequence panel opens. Search and filter as needed. The table shows you the order in which the tables are processed. Each row shows you the following information. Select Close when you’re done.
- Order number
- Table name
- Original size of the table
- Estimated size contribution - This indicates how much size of data is being selected when this row is being processed.
- Initial row count of the table
- Estimated row count contribution
-
Select Next.
Step 3: Select Subsetting Options
-
Leave the tablespace box empty if you want to use the user’s default tablespace for the subsetting job. The wizard automatically calculates how much free space is available and whether that amount is sufficient for the subsetting job. If masking is also configured, the same tablespace will be used for masking as well. Alternatively, enter a different tablespace name and select Recalculate to update the statistics.
-
Review the Available free space and confirm there is sufficient space. Select Recalculate if needed.
-
Under Parallel execution, select one of the following options. This setting controls parallel execution during data subsetting.
- None - No parallelism.
- Default - Let Oracle AI Database choose the optimal degree of parallelism.
- Degree of parallelism - Enter the number of parallel execution servers for a single operation.
-
(Optional) Select Disable redo log generation during subsetting.
-
Under Recompile invalid objects, select one of the following options. This setting controls how invalid objects are recompiled after data subsetting.
- None - Do not recompile.
- Serial - Recompile sequentially.
- Parallel - Recompile in parallel.
-
(Optional) To refresh database optimizer statistics for subsetted tables after data reduction, select Refresh statistics after subsetting.
This helps to ensure accurate query plans, but may increase processing time.
-
Select Next.
Step 4: Configure Data Masking
-
(Optional) Select Apply data masking after subsetting.
-
If you are applying data masking after subsetting, select View details to open the Masking policy details panel and review masking columns, general information, and masking options.
Masking columns: Each row in this table provides the following information:
- Schema name
- Table name
- Column name
- Sensitive type
- Data type
General information includes:
- OCID of the masking policy
- Masking policy name
- Compartment that stores the masking policy
- When the masking policy was created and updated
Masking options include:
- Drop temporary tables (Enabled, Disabled)
- Redo logging (Enabled, Disabled)
- Refresh statistics (Enabled, Disabled)
- Degree of parallelism (None, Default, or an integer)
- Recompile invalid objects (Enabled, Disabled)
-
Select Close to close the panel.
-
Select Next.
Step 5: Review and Submit
-
Verify the information is correct.
-
Select the check box to confirm that you understand that the subset operation modifies the database in place.
-
Select Submit to start the subsetting job.
Leave the panel open during the subsetting job. When the job is finished, the panel closes and the Work request page opens.
-
Review the information about the subsetting job.
On the Details tab, you can view General information, Subsetting job information, Masking job information, and Error messages.
General Information includes the following:
- OCID of the subsetting job - Select Copy to copy the OCID to the clipboard.
- Compartment that stores the subsetting job
- Database name - Select View to open the Subsetted database page.
- When the subsetting job started and finished
- Total time taken to generate the data subset
Subsetting job details include the following:
- Subsetting policy name - Select View to open the Subsetting policy page.
- Status of the subsetting job (for example, Succeeded)
- Subsetting report name - Select View to open the report.
Masking job information includes the following:
- Masking policy name - Select View to open the data masking policy.
- Status of the data masking job (for example, Succeeded)
- Masking report name - Select View to open the data masking report.
The Error messages section shows you a list of error messages generated by the subsetting job. You can use the Search and filter bar to find error messages. Each row in the table shows the following information:
- Error message
- Timestamp