Tuesday, October 29, 2013

Access DRM Application on Virtual Box (Guest) from local (host) system.

Here are instructions to setup port forwarding so users can access application hosted on virtual box from their local system.

  1. Click Settings -> Network -> Port Forwarding
  2. Click Add (+) icon to create a new rule.
  3. Enter the Application Name, Protocol,Host Ip,Host Port,Guest Ip,Guest Port. check the screen shot below (i ignored host and guest ip).
  4. now just point to the application/url from your local pc and you should be able to access it.

Monday, October 28, 2013

Check DRM Application Status - vbscript

Here is a small vbscript that can be used to check if DRM Application is up and running, this will come handy if for any reason you want to check if application is up and may be kick off exports form batch utility. Or may be use this to notify support team whenever the application is down.

1. Create a text file with extension vbs. e.g. Check_Application_Status.vbs
Note: In the example i'm only checking for Engines,Services, Process Manager and netjnibridge. If you want you can include DRM-api-Adapter and event-host.
--- Here is the vbscript code ---
set service = GetObject("winmgmts:")
i=1
cnt=0
for each Process in Service.InstancesOf("Win32_Process")
If Process.Name="drm-engine.exe" Then
i=i+1
if i=2 then
cnt=cnt+1
end if
ElseIf Process.Name="drm-process-manager.exe" Then
cnt=cnt+1
ElseIf Process.Name="drm-service.exe" Then
cnt=cnt+1
ElseIf Process.Name="drm-netjnibridge-host.exe" Then
cnt=cnt+1
End If
Next
If cnt >=4 Then
Wscript.Quit(0)
Else
Wscript.Quit(1)
End If
--- end of the vbscript code --- --- Batch File to call the vbscript ---
cscript Check_Application_Status.vbs
GoTo %ERRORLEVEL%
:0
echo Drm Services are up and running.
goto End
:1
echo DRM services are down. Please Restart.
goto End
:End
--- End of Batch File ---

Friday, October 25, 2013

DRM-12405: The TimeZoneID parameter name passed with the session is not supported: Central Standard Time (Mexico)

This error generally indicates the time zone between your database and operating system are not the same.
check the database timezone and update it or change the time on your operating system. either way make sure they both are on the same timezone.

SELECT SESSIONTIMEZONE FROM DUAL;

SELECT current_timestamp FROM DUAL;


SELECT dbtimezone FROM DUAL;

Wednesday, October 23, 2013

Controlling Hierarchy

What is Controlling Hierarchy and why do i need it?

Controlling Hierarchy plays its role for Global Inherited Properties. It lets DRM find its way to look for ancestors of the node and fetch the value.

Try the following to understand how it works.

1. Create a global inherited properties

G_I_CH  -> Global Inherited Property which will have Controlling Hierarchy set.

2. Create Following Hierarchies

Hierarchy: World
World
USA
CANADA
INDIA

Hierarchy North America
North America
USA
CANADA

Hierarchy Asia
INDIA

3. Check the value of both the properties, currently they should be NULL,

4. Update both the property values for Hierarchy: World
e.g. World (Top Node)->G_I_CH=100

5. Check the values of USA,CANADA and INDIA in Hierarchy World, They should have inherited the values.

6. Check the values of USA,CANADA in hierarchy: North America

These still should be NULL because its parent North America (Top Node) does not have the value set.

7. Now Right Click on World Hierarchy and select Assign Control and select the property (G_I_CH).

8. Go back to North America Hierarchy and check the values, it should have been set to values from the World Hierarchy.

Here is a write up about Inheritance that should explain how it works.

Inheritance
Inheritance is a feature that enables high-level nodes to share their property values with lower
points in the hierarchy, eliminating the need to store and maintain redundant information. It
enables newly entered nodes to automatically obtain their property values from the appropriate
ancestors. Proper use of inheritance can greatly reduce data-entry requirements.
When defining a property, the system administrator can define the property as inheriting. This
definition enables the values for the property to cascade down to its descendants.
Inheritance moves through a specific chain of events to determine the value for a property:
1. Data Relationship Management looks for a value entered at the current node. If a user has
directly entered a value at the node, the entered value is used.
2. If a value does not exist, Data Relationship Management searches the ancestors of the node
for a value. The first entered value that Data Relationship Management finds, moving up
the hierarchy is used. Thus, a change to the properties of a node can affect any descendents.
3. If no ancestor has an entered value, the default value is used. A default value is assigned by
the system administrator.
Global properties that inherit follow a slightly different path. In step 2, as Data Relationship
Management moves up the hierarchy in search of an entered value, it encounters the ancestors
in the controlling hierarchy. When the system administrator creates a global property, a
controlling hierarchy must be designated for the property. A controlling hierarchy tells the
system which hierarchy to use to determine the inheriting value for a global property.
Many tools are available in Data Relationship Management for maintaining inherited values:
● Locking a value so that it cannot be overridden at a descendant
● Clearing all descendant values for a particular property
● Removing an overridden value so that the property inherits from a node above

Friday, October 18, 2013

Installing Foundation Services for DRM

I was having too much fun installing and configuring Foundation Services this week and would like to share some of my experiences. hopefully it will come handy for some of you out there.

Here is my setup

Windows 2008 64bit VMware Virtual Box.
Ram: 16g
CPU: Quard Code
Database: Oracle 11G

Constraints: 
1. Windows box on which DRM and Foundation services are being installed does not have internet connection.
2. McAfee Enterprise actively monitors all the processes and file access.

Hurdles:
It was a pain to install DRM because i was not able to download anything from internet. here is the list.
1. Internet Explorer Updates.
2. .NET 4 Framework (realized later that i could have used Server Manager to add the .NET Role).
3. Firefox (Just in case things didn't work on IE)

DRM Install:
After overcoming the hurdles DRM was installed sucessfully. 

Foundation Services:
Install of foundation services started smooth but then took for ever for the process to move a millimeter.
This was not supposed to happen so i started Monkeying around the process that was taking up cpu cycles and ram and notices about 25% of cpu was used by McAfee. now as any mokney would do, i jumped from task manager to McAfee on access status and Bazinga, it was intercepting each and every file installation process was accessing, not only that it actually blocked 16 files. 
so now i had left with no choice than to pause 'McAfee mshield' service and boom installation finishes within 2 minutes.
now that installation was successful i resumed 'McAfee' but it didn't stop there, it started the attack when i started extending WebLogic to deploy security poliy. so again i pause it and continued,
it all went smooth until 'extending domain' didn't like '_' (underscore) in the host name. it only complained but let me continue but at the end it did not extend/partially extended security policy.


Moral of the story:
Keep an eye on process that are keeping eye on your processes. (McAfee).
Stop and resolve any issues/dependencies if process complains.