SDE Database in a Nutshell (Part 2.)

Posted: January 20, 2011 in Technology hooks

— Continued section —

Now the BASE VIEWS.

A base view is automatically created for each table within the _SMDBA_ schema. All rules apply to base views as described in the previous section except that these are owned by the user _SMDBA_ and are the foundation of other objects called group views.

When making changes to the BMC SDE database structure, using the BMC SDE database administrator tool you make changes to in fact the base views. The database administrator itself handles and maintains all under laying objects required to change or create base views including consistency.  The view definitions itself are also stored inside the database. You can list these from the dbo.SMSYSVIEWS table.

SELECT * FROM dbo.SMSYSVIEWS

By now you should be able to imagine it requires lots of scripting to handle a BMC SDE database manually without using the BMC SDE Database administration.

As the author of this article I would like to emphasize that making changes to the database without using the BMC SDE Database administrator you will corrupt the database. Remediation of problems caused by performing unsupported database handling is not part the standard BMC SDE Support agreement.

Finally the GROUP VIEWS.

Each support group inside BMC SDE has their own views. These views, based on base views are called group views. Group views inside BMC SDE serve two purposes and both are related to data segregation. There are two type of segregation supported by SDE Group Segregation and View Segregation.

Group segregation supports the segregation of records. Each record, by default, is populated with a BMC SDE Support Group sequence value (_GROUP_  column). This Support Group is the virtual owner of the record.  When you implement Group Segregation the records access is segregated meaning group members cannot access records of another Support Group.

For example: The Support Group Local ICT and Global ICT have Group segregation enabled. This means the Local ICT member cannot access the Global ICT incidents while Global ICT cannot access the Local ICT incidents.

You are free to set this up to work in both ways but it does not do so automatically. How this technically works is simple.

Each Support Group works with these Group Views which are based on the Base Views.  These Group Views inside BMC SDE are used to select records. While already explained a view is in fact a select statement, implementing Group Segregation means the Group View definition has been extended.

SELECT [VIEWCLAUSE],[CREATEVIEW] FROM dbo.SMSYSVIEWS

The VIEWCLAUSE column will be populated with a ‘SELECT’ Clause like:

( “Seq.Group” IN (1045,1021,1002,1001,1) OR “Seq.Group” IN (SELECT “SEQUENCE” FROM “_SMDBA_”.”_GROUPS_” WHERE (“SEQ_PARENT” IN (1045,1021,1002,1001,1) )) )

This way, when selecting records inside BMC SDE you can only select the records owned by Support Groups with Sequence 1045, 1021, 1002, 1001 and 1.

Selecting of querying the BMC SDE database outside BMC SDE itself is most commonly done on the table level or Base View level and therefore Group Segregation is not effective outside BMC SDE.

Now View Segregation. The database administrator of the more previous versions of BMC SDE is more self explanatory on this functionality. ‘Add / Drop Field from Group’ reveals more if the functionality to most people that ‘View Segregation’.

So it is all about dropping or adding fields (columns) in … Group Views. To add a field to a Group View you first have to drop the field because by default all fields are part of the Group Views.

For example, a field has been used to contain sensitive details of some kind. If it is required to hide the contents of this field disregarding the (Group) owner of the record you could use View Segregation to drop this field from the Group Views for which the contents should not be visible.

When implementing View Segregation, the CREATEVIEW column for the effected Support Group will be changed and becomes explicit. By default the Base Views are created using a SELECT * FROM the Base Views but now the column names are listed exclusing the droped column.

For example:

SELECT  “Incident #”  ,”LastModified”  ,”LastUser”  ,”Seq.Group”  ,”Seq.Owner” from the Base View

For implementing View Segregation, selecting of querying the BMC SDE database outside BMC SDE itself is most commonly done on the table level or Base View level and therefore View Segregation is not effective outside BMC SDE.

Group Segregation can be implemented on both regular (heavyweight) and Lightweight Support Groups. Because Lightweight Support Groups make use of the Parent Group Group Views, View Segregation can only be implemented on regular Support Groups which makes the segregation effective on all child Support Groups.

Leave a comment