Monday, June 27, 2016

Installing the ICD Demo Content along with the ICD Process Content Packs

Do NOT try to install the 7.5.1 demo data into 7.6. It really doesn't work well. I'm leaving this post intact because the steps are useful in general I believe.


If you try to install the IBM Control Desk Content Packs along with the 7.5.1 Demo Content, you're going to have problems. I already addressed a standalone problem with the Demo Content in an earlier post, and now I've gotten further, so wanted to share the wisdom I gained.

No matter which order you install - Demo Content then Process Packs (specifically the Change Management Content Pack) or the other way around - you're going to encounter the following error:

One or more values in the INSERT statement, UPDATE statement, or foreign key update caused by a DELETE statement are not valid because the primary key, unique constraint or unique index identified by "1" constrains table "MAXIMO.PLUSPSERVAGREE" from having duplicate values for the index key.. SQLCODE=-803, SQLSTATE=23505, DRIVER=4.11.69


The cause for this is that the Change Management Content Pack and also the Service Desk Content Pack specify hard-coded values for PLUSPSERVAGREEID in the DATA\PLUSRESPPLAN.xml file, when the inserts should be creating and using the next value of the PLUSPSERVAGREESEQ sequence.

In finding the above root cause, it means that there are two possible solutions to the problem, depending on the order you install things.

If you install the Content Packs before the Demo Content


So in my first run, I installed the Content Packs first, and then the Demo Content (after modifying it as explained in an earlier post). And the exact SQL statement causing this problem was:

SQL = [insert into pluspservagree ( active,calendar,changeby,changedate,createby,createdate,description,hasld,intpriorityeval,intpriorityvalue,langcode,objectname,orgid,ranking,sanum,pluspservagreeid,servicetype,shift,slanum,calendarorgid,slatype,status,statusdate,slaid,slahold,stoprpifjportt,billapprovedwork) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,nextval for PLUSPSERVAGREESEQ,?,?,?,?,?,?,?,?,?,?,0)]
 parameter[1]=1
 parameter[2]=BUS01
 parameter[3]=MAXADMIN
 parameter[4]=2007-10-12 12:33:55.0
 parameter[5]=MAXADMIN
 parameter[6]=2007-10-12 12:33:55.0
 parameter[7]=P1 Incident - Respond in 30 mins. Resolve in 2 hrs.
 parameter[8]=0
 parameter[9]=EQUALS
 parameter[10]=1
 parameter[11]=EN
 parameter[12]=INCIDENT
 parameter[13]=PMSCIBM
 parameter[14]=100
 parameter[15]=SRM1002
 parameter[16]=SLA
 parameter[17]=BUSDAY
 parameter[18]=SRM1002
 parameter[19]=PMSCIBM
 parameter[20]=CUSTOMER
 parameter[21]=ACTIVE
 parameter[22]=2011-09-14 13:26:13.247
 parameter[23]=1
 parameter[24]=0
 parameter[25]=0


To find the constraint causing the problem, I found this page:

https://bytes.com/topic/db2/answers/810243-error-messages-key-constraint-violations

Which showed that I could find the particular constraint with the following SQL:

SELECT INDNAME, COLNAMES
FROM SYSCAT.INDEXES
WHERE IID = 1
AND TABNAME = 'PLUSPSERVAGREE'

That basically showed an index named SQL160607091434350 consisting of just the column named PLUSPSERVAGREEID.

So each row in the PLUSPSERVAGREE table should have a unique value in the PLUSPSERVAGREEID column.


Then to find the existing values in the PLUSPSERVAGREEID column of the PLUSPSERVAGREE table, run:

SELECT PLUSPSERVAGREEID from PLUSPSERVAGREE

For me, this showed values 1 through 16.

Now, looking at the sequence itself, I found that the last value assigned was 5 with this query:

SELECT LASTASSIGNEDVAL from sysibm.syssequences where seqname = 'PLUSPSERVAGREESEQ'

So to fix the problem, I altered the PLUSPSERVAGREESEQ sequence to start at 17:

ALTER SEQUENCE PLUSPSERVAGREESEQ RESTART WITH 17

After I did that, I tried again to install the Demo Content and it worked!

If you installed the Demo Content first

I take lots of snapshots of my VMs, so I could easily go back to a snapshot where I had already installed the Demo Content, to then try to install the Content Packs. That led me to see that the Change Management Content Pack has hardcoded values in the DATA\PLUSRESPPLAN.xml file (by downloading the ChangeMgtPack7.6.zip file and opening up the file). On the positive side, it appears that nothing else in the Content Pack actually references these hardcoded values, so we have the option of changing them as needed.

In my particular case, I found that the following values in the PLUSPSERVAGREE table for the PLUSPSERVAGREEID column

9
10
11
12
13
14
24
25

I also found that the LASTASSIGNEDVAL for the PLUSPSERVAGREESEQ sequence was 25, so that matches up with the data.

The very lucky part for me is that there are exactly 8 rows that get inserted by the PLUSRESPPLAN.xml file, and the PLUSPSERVAGREE table doesn't have any rows with values 1 through 8!

So the solution I applied was I manually edited the PLUSRESPPLAN.xml file to set the PLUSPSERVAGREEID values to 1 through 8. Then I saved the edited file back into the zip file, created a valid ContentSource.xml file to point to it (so I could install from my local copy of the Content Pack), added my new Content Source to the Content Installer, and I was able to successfully install the Change Process Content Pack!

However, I then found that there's also a similar problem with the Service Desk Content Pack, but the same solution can't be applied. Specifically, in the Service Desk Content Pack, the DATA\SLA.xml file uses hardcoded values for the same column, but those values are 1, 3, 4 and 5, which I just used in my workaround for the Change Management Content Pack. So to fix this correctly, I looked in the Demo Content Content Pack to find out how to reference the PLUSPSERVAGREESEQ sequence, and it's actually not too bad.

So the fix I went through was to manually modify the DATA\SLA.xml file to change every element that looked like this:

<column dataType="java.lang.Long" name="PLUSPSERVAGREEID">
      <value>3</value>
    </column>

to this:

<column dataType="java.lang.Long" name="PLUSPSERVAGREEID">
    <columnOverride>
        <sequence mode="nextval" name="PLUSPSERVAGREESEQ"/>
      </columnOverride>
    </column>

Then like above, I saved the edited file back into the zip file, created a valid ContentSource.xml file to point to it (so I could install from my local copy of the Content Pack), added my new Content Source to the Content Installer, and I was able to successfully install the Service Desk Content Pack!

After installing, I checked the PLUSPSERVAGREE table again, and I saw that the values 26 through 29 were there, so I know my change worked.

So in my case I didn't have to change the start value for the PLUSPSERVAGREESEQ sequence, which is nice.

It was a painful afternoon, but well worth it in the end.

Wednesday, June 8, 2016

Installing ITIC and TDI on Windows Server 2012

Both of these tools use the ZeroG InstallAnywhere installer, which doesn't completely get along with Windows Server 2012. Luckily, there's an easy fix within Windows. You need to set the "Compatibility mode" to run with compatibility for "Windows 7". You need to perform this procedure on the setup.exe file for ITIC (under Install\ITIC wherever you've extracted the install images) and the install_tdiv71_win_x86_64.exe file in the TDI installer directory.

On each file, right click and select Properties.

Then on the Compatibility tab, click the "Change settings for all users" button at the bottom.

In the "Compatibility mode" section, select "Run this program in compatibility mode for:" checkbox.

Select "Windows 7" from the drop down list.

Click OK, then OK again.

And now you're ready to install

UPDATE: You do also need to ensure that the java executable is in your path. If not, it will fail when trying to create the Java Virtual Machine.

UPDATE 2: And it MUST be the Java 1.7 executable in your path. 1.8 will fail.

Tuesday, June 7, 2016

Installing SmartCloud Control Desk 7.5.1 Demo Content on ICD 7.6

You can't do it

Use the maxdemo data that comes with the product. Install it initially using these steps:

https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Anything%20about%20Tivoli/page/How%20to%20install%20the%20sample%20data%20during%20IBM%20Control%20Desk%207.6%20installation


These steps are supposed to get it installed after the initial install, but I tried twice and failed both times:

http://www.ibm.com/support/knowledgecenter/SSLKT6_7.6.0/com.ibm.mam.inswas.doc/mam_install/t_mam_create_maxdemo_postinstall.html

So if you want demo data, which you do in some number of test/dev environments, simply install it at initial install time. It goes very smoothly.

But you can, mainly, with a little work

UPDATE 8/17/2016 
NOTE:THIS WILL ACTUALLY MAKE YOUR SELF SERVICE CENTER UNUSABLE!!!! I don't know why, but it does. Something in the content makes it so that you cannot do anything from the Self Service Center. So ONLY install this data if you have a complete backup of your system (VM snapshots are a wonderful thing).

Additionally, you will have other problems, such as the following error when you try to create a new WORKORDER:

BMXAA4169E - No record found in maxvars table for maxvar WOENABLEREPFAC. Make sure to insert the MAXVAR in the MAXVARS table.

And there's no easy fix. So the demo data will let you play around with a lot of functionality, but the system is pretty unusable for anything else after you install it.

Add an attribute to the TICKET table

You need to add an attribute named RBA_RC to the TICKET table. Its type needs to be ALN and its length set to 50. This attribute no longer exists, but the demo content requires it. You may want to take a different route to solve this problem, but this was the easiest one I could think of.

Remember, after adding this attribute, you need to set Admin Mode to ON, Apply Configuration Changes, then set Admin Mode to OFF.

Download the package

First, you need to download the content pack ZIP file itself from here:

https://www-304.ibm.com/software/brandcatalog/ismlibrary/details?catalog.label=1TW10CO0A

Edit the package

You've got the entire package downloaded, but if you just try to install it, you will fail. So you need to edit the file named Package/ImportPackage.xml within the zip file. You can edit it in vi, Notepad, gedit, etc. - any text editor you want. What you need to do is delete lines 408 through 717 (leaving the last line that reads "</package>"). The reason for this is that the first error when importing was on line 408. I tried de-selecting different options through the GUI, but was not successful. My choice to simply delete these lines was made only after 40-50 other attempts.

After editing the file, add it pack to the zip file.

Define your local content and Install

  1. Create an XML file called ContentSource.xml in the C:\temp directory on your Smartcloud Control Desk server system that contains the following text:
    <?xml version="1.0" encoding="UTF-8"?>
    <catalog infourl="" lastModified="" owner=""
      xmlns:tns="http://www.ibm.com/tivoli/tpae/ContentCatalog"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="ContentCatalog.xsd">
      <catalogItem>
        <version>7.5.1</version>
        <type>mriu</type>
        <name>Enter the name of package</name>
        <description>Enter a description of the package here</description>
        <homepage/>
        <licenseurl/>
        <category>Describe the category of the content</category>
        <url>file:////C:\temp\TestPackage.zip</url>
      </catalogItem>
    </catalog>
  2. Edit the name and description and the category according to the content that you are installing. Change the file name in the URL to the name of the content pack zip file.
  3. Save the file.
  4. Copy the content pack zip file to the C:\temp directory on the server.
  5. Go to the ISM Content Installer application: System Configuration>IBM Content Installer.
  6. Click the New icon.
  7. Enter the location of the ContentSource.xml that you created in step 1 and a description. The file name in our example is:  file:////c:\temp\ContentSource.xml
  8. Click Save.
  9. Click the newly created content source.
  10. Click the download link to install the content.

You've now got a good amount of demo content

You don't have everything from the original content pack, but you've got a lot more than you started with. Good luck.

Monday, June 6, 2016

IBM Control Desk for Service Providers

One of the many features of IBM Control Desk that separates it from the competition is its ability to support Service Providers. It does this by allowing you to secure information on a per-customer basis. For this blog post, I wanted to show a couple of multi-customer scenarios in the product. Specifically, I wanted to show a customer-specific user logging in and only seeing that customer's assets. Additionally, I wanted to show a software license being assigned to that customer-owned asset and how it appears. The screenshots associated with those are shown here:

Create a customer named ACME CORP






Now create a Person who is associated with ACME CORP.





The Cust/Vendor field is farther down on the page.


Now create a user that is associated with that Person.


Now create a Security Group (SP) with any permissions you want, but specify "Authorize Group for Customer on User's Person record". I only granted Read access to the Assets application. And add your user to this group.


Here I'm logged in as the user, and can only see the one asset associated with ACME CORP.


Here I'm viewing the Licenses (SP) application for Adobe Acrobat and see that a license has been allocated to ITAM1010, which is the asset associated with ACME CORP.