SQL Queries - CAST Central Base - Queries on Data Function - How to check if a Data Function is part of a snapshot
Purpose of Query
The query checks if a Data Function is part of a snapshot
Applicable CAST Version
| Release | Yes/No |
|---|---|
| 8.3.x | ✅ |
| 8.2.x | ✅ |
| 8.1.x | ✅ |
| 8.0.x | ✅ |
Applicable RDBMS
| RDBMS | Yes/No |
|---|---|
| Oracle Server | ✅ |
| Microsoft SQL Server | ✅ |
| CSS2 | ✅ |
Query for CSS
SELECT EXISTS
(
SELECT 1
FROM dss_object_info dso
JOIN dss_objects dob
ON dso.object_id = dob.object_id
JOIN dss_snapshots dss
ON dso.snapshot_id = dss.snapshot_id
WHERE dob.object_type_id = 30002
AND dob.object_full_name = 'Data Function full name'
AND dss.snapshot_name = <'snapshot_name'> )
Query result example
t
Query result interpretation
The query returns ’t’, if the Data Function is part of the snapshot
Query for Oracle
SELECT EXISTS
(
SELECT 1
FROM dss_object_info dso
JOIN dss_objects dob
ON dso.object_id = dob.object_id
JOIN dss_snapshots dss
ON dso.snapshot_id = dss.snapshot_id
WHERE dob.object_type_id = 30002
AND dob.object_full_name = 'Data Function full name'
AND dss.snapshot_name = <'snapshot_name'> )
Query result example
t
Query result interpretation
The query returns ’t’, if the Data Function is part of the snapshot
Query for SQL server
SELECT EXISTS
(
SELECT 1
FROM dss_object_info dso
JOIN dss_objects dob
ON dso.object_id = dob.object_id
JOIN dss_snapshots dss
ON dso.snapshot_id = dss.snapshot_id
WHERE dob.object_type_id = 30002
AND dob.object_full_name = 'Data Function full name'
AND dss.snapshot_name = <'snapshot_name'> )
Query result example
t
Query result interpretation
The query returns ’t’, if the Data Function is part of the snapshot
Notes/comments
Related Pages