SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Deployment State Compliance Question


Deployment State Compliance Question

Author
Message
maravig
maravig
SSC-Addicted
SSC-Addicted (484 reputation)SSC-Addicted (484 reputation)SSC-Addicted (484 reputation)SSC-Addicted (484 reputation)SSC-Addicted (484 reputation)SSC-Addicted (484 reputation)SSC-Addicted (484 reputation)SSC-Addicted (484 reputation)

Group: General Forum Members
Points: 484 Visits: 60
Hello,
I was given this query and asked to turn it into a report for subscription:
select v_R_SYSTEM.ResourceID,
v_R_SYSTEM.ResourceType,
v_R_SYSTEM.Name,
v_R_SYSTEM.vUniqueIdentifier,
v_R_SYSTEM.ResourceDomainORWorkgroup,
v_R_SYSTEM.Client
from
v_R_System inner join v_G_System_DCMDeploymentState on v_G_System_DCMDeploymentState.ResourceID = v_R_System.ResourceId WHERE BaselineID = 'ScopeId_xxxxxxxxxxxxxxxxxxxx' AND CollectionID = xxxxxx' AND ComplianceState = 3

I've tried to find BaselineID, but don't see it any views. Was this changed? I also don't see a similarly named view for DeploymentState, unless v_CICurrentComplienceStatus is it?!? Any suggestions are greatly appreciated.
Sue_H
Sue_H
SSC Guru
SSC Guru (57K reputation)SSC Guru (57K reputation)SSC Guru (57K reputation)SSC Guru (57K reputation)SSC Guru (57K reputation)SSC Guru (57K reputation)SSC Guru (57K reputation)SSC Guru (57K reputation)

Group: General Forum Members
Points: 57364 Visits: 12736
maravig - Wednesday, October 18, 2017 6:29 AM
Hello,
I was given this query and asked to turn it into a report for subscription:
select v_R_SYSTEM.ResourceID,
v_R_SYSTEM.ResourceType,
v_R_SYSTEM.Name,
v_R_SYSTEM.vUniqueIdentifier,
v_R_SYSTEM.ResourceDomainORWorkgroup,
v_R_SYSTEM.Client
from
v_R_System inner join v_G_System_DCMDeploymentState on v_G_System_DCMDeploymentState.ResourceID = v_R_System.ResourceId WHERE BaselineID = 'ScopeId_xxxxxxxxxxxxxxxxxxxx' AND CollectionID = xxxxxx' AND ComplianceState = 3

I've tried to find BaselineID, but don't see it any views. Was this changed? I also don't see a similarly named view for DeploymentState, unless v_CICurrentComplienceStatus is it?!? Any suggestions are greatly appreciated.


We would have no way of knowing if a view changed or what views contain what columns or where a certain view may be.
If you can't see something, there is a possibility you don't have permissions.
One thing you can try is to search the database for whatever column names you are trying to find. If you search on sys.columns, it has columns for both tables and views. You could search using something like:
USE YourDatabaseName
GO
SELECT
schema_name(o.schema_id) as SchemaName ,
object_name(c.object_id) as TableOrView,
c.[name] as ColumnName,
o.modify_date
FROM sys.columns c
INNER JOIN sys.objects o
ON c.object_id = o.object_id
WHERE c.name LIKE '%ColumnNameToFind%'


Sue



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search