Views [dbo].[csm_v_computer]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Created11:12:17 AM Wednesday, March 07, 2007
Last Modified6:12:19 PM Monday, May 04, 2009
Columns
Name
uuid
dname
osim_target_type
Permissions
TypeActionOwning Principal
GrantSelectca_itrm_group
GrantSelectca_itrm_group_ams
GrantSelectams_group
SQL Script
CREATE view csm_v_computer(uuid, dname, osim_target_type     ) /* Table with OSIM computers */
as
select     c.uuid, c.dname, 1 as osim_target_type     /* uuid of the computer */
from csm_object c, csm_property cp_bs
where c.class=102     /* computers already registered in DSM and CSM */
    and c.dname!=''
    
    and cp_bs.object=c.id
    and cp_bs.name='bootstatus' /* OSIM computers have a bootstatus */

union
select c.uuid, cp_mac.value, -1 as osim_target_type
from csm_object c, csm_property cp_bs, csm_property cp_mac  
where c.class=102     /* computers reported with a MAC only are not registered in DSM */
    and c.dname=''

    and cp_bs.object=c.id
    and cp_bs.name='bootstatus'
    
    and cp_mac.object=c.id  
    and cp_mac.name='macaddr'
GO
GRANT SELECT ON  [dbo].[csm_v_computer] TO [ams_group]
GRANT SELECT ON  [dbo].[csm_v_computer] TO [ca_itrm_group]
GRANT SELECT ON  [dbo].[csm_v_computer] TO [ca_itrm_group_ams]
GO
Uses