Purging a data model configuration
It might be necessary for users to remove an individual data model from the database, if they for example discontinue to use it or other circumstance make it obsolete.
To purge a data model, first all of the related production records have to be purged. Otherwise data without a context would exist in the database.
For how to purge all production records for a data model, please follow the instructions here:
User can purge individual data models, which will include all the ID's.
User can do this either by using applications such as:
- Microsoft SQL Server Management Studio
- MSSQL CLI
This can also be used for building custom solutions based on applications which allow for an ODBC connection such as:
- Excel
- C#
- .Net
- Python
Execute Stored Procedure PROREC_Misc_Hierarchy_Purge
Variable name | Datatype | Description | Example |
---|---|---|---|
@Node | VARCHAR(50) | The name of the root Node and the name of the data model. Mandatory! Can not be NULL or Empty | Urethanes |
To purge a specific data model configuration, call the stored procedure PROREC_Misc_Hierarchy_Purge using the T-SQL EXEC or EXECUTE keyword and provide the Input variables. Below is an example using T-SQL in SQL Server Management Studio:
Note: The system will always create a backup first before purging. This way, the data model can always be restored.
If an output window does exist, the progress can be observed.
The stored procedure will verify that the provided values are correct and all production record data are purged and then create the backup before purging the data model configuration.
The result can be read back from the log table PROREC_Misc_Log.
Below is an example using T-SQL in SQL Server Management Studio:
With the result returned