SQL Queries - CAST Central Base - Queries on snapshots - How to update the snapshot name and snapshot version
Purpose of Query
These queries will let you update the snapshot name and snapshot version from the database.
Applicable CAST Version
| Release | Yes/No |
|---|---|
| 8.3x | ✅ |
| 8.2.x | ✅ |
| 8.1.x | ✅ |
| 8.0.x | ✅ |
| 7.3.x | ✅ |
Applicable RDBMS
| RDBMS | Yes/No |
|---|---|
| Oracle Server | ✅ |
| Microsoft SQL Server | ✅ |
| CSS2 | ✅ |
Query for CSS
Query to run on the Management Base.
SET SEARCH_PATH = <Your MNGT Schema>
update cms_inf_versioninformation
set versionlabel = 'new version name'
from cms_inf_snapshot cis
where cms_inf_versioninformation.snapshot_id = cis.object_id
and cis.object_name = 'old snapshot_name';
Query to run on the Central Base.
SET SEARCH_PATH = <Your Central Schema>
update dss_snapshots
set snapshot_name = 'new snapshot_name'
where snapshot_name = 'old snapshot_name';
update dss_snapshot_info
set object_version = 'new version name'
where object_version = 'old version name'
Query for Oracle
Same as for CSS
Query for SQL
Same as for CSS
Query Result Example
Before running the Queries -

Queries run -

After running the queries to rename the schema -

Notes/comments
To be noted - If you have the snapshots in your measurement schema,
1.) Delete the snapshot from the Measurement schema.
2.) After you rename the schema, Perform an Upload Snapshots to Measurement Service task.

Related Pages