Complex mass update in Admin Mode

The complex option is not available when using mass update in administrator mode. There is a bug in the db.environment RAD on the set.admin.env.2 panel. Work around by creating an alias for the complex.update field in the docenv dbdict. The alias name should be db.complex.update.

The se.search.engine sets up an environment variable using the db.environment RAD. The environment structure is based on the docenv dbdict. If the dbdict has an object and admin mode is NOT selected then the environment app in the object is used to build the environment variable. Access to mass update depends on the configuration of the list state.

If the dbdict does not have an object then the db.environment RAD is used to build the environment variable. The environment variable structure is based on the docenv dbdict. Contents of the environment variable are based largely on the privileges in the master FC.

When administrator mode is checked then the db.environment forces the values to true. However, there is a discrepancy between the field name for complex update access in the RAD and the docenv dbdict. On the set.admin.env.2 panel the expression sets db.complex.update in $L.env=true and complex in $L.env=true. But the fields in the docenv are db.complex and complex.update. An easy fix is to create an alias for complex.update in docenv called db.complex.update. This will cause the complex option to appear in admin mode.

Posted in Service Management, SysAdmin | Leave a comment

Using a DVD like a virtual join

Virtual joins are very useful but they take a bit of effort to set up.  In a case where you only need to display one field from the related file using a dvd select() statement in the format may suffice.

Example: Display the full.name from the operator record for the assignee of an Incident.

  1. Create a label on the format.
  2. The Caption of the label should be blank.
  3. Set the Caption Condition of the label to select(“full.name”,”operator”,”name”,[assigned.to])

That’s it.

Posted in Forms Designer, Service Management | Leave a comment

SM 9.2x and SQL Utilities

Apparently SQL Utilities are no longer needed or usable in SM 9.2x.  I found several dbdicts are now split between m1 and m2 tables so I wanted to move all the fields back to m1 to make reporting easier.  I used to do this with the Move Files from SQL to SQL utility.  When I first tried to use this utility it rebuilt the SQL mapping for the dbdict.  I tried using the Update Mapping Template utility and found that broken.  I eventually was able to create a sqlmapping record for the dbdict, but still couldn’t get the Move to work.  I did some digging and found a knowledge article (KM764647) and QCCR (QCCR1E6566).  The QCCR was rejected.  In the comments it said that the SQL utilities should be deprecated and that all sql mapping changes should be done with the dbdict utility.

Posted in Service Management, SysAdmin | Leave a comment

Create a new instance of the SM OOB database

When P4 was still available it was possible to keep multiple copies of the scdb.* files and change the path in the sc.ini file to start up different instances of ServiceCenter.  If you were smart you made a copy of the scdb.* files when first installing SC so you could get back to an OOB copy whenever.  Once P4 went away, we lost this convenience.

VMWare is great and multiple VMs can be created for different instances.  You can make snapshots and revert back whenever.  However, VMs are quite large and it takes a while to revert or make a copy.

Here is a way to create a new instance of the SM OOB database.

Start up the SQL Server Management Studio Express app.  Right click on Databases and select New Database.  Enter the name of the new database and select the owner.  You may also set the Initial Size – 150MB should be enough for the OOB db.  Click Ok (not Add).

Next add an ODBC DSN for the new database.
Select the System DSN tab
Click Add
Select the driver SQL Native Client or SQL Server
Click Finish
Enter a Name and Description – Note that the Name will be what you use as the value for the sqldb: parameter in the sm.ini file.
Enter the Server which is [hostname]\[service name] for example
W2K3VL01-6802E9\SMDEMO
To find the [service name] look for the SQL Server (xxx) service and use what you find within the ()
Click Next

Enter the authentication credentials
Select “With SQL Server Authentication”
Check “Connect to SQL Server to obtain default settings…”
Enter the login id (typically “sa”)
Enter the password (typically “SM@7DEMODATA”)
Click Next
Select the new database
You can let all of the rest of the options default
Test the connection and Finish

Stop Service Manager if it is running.

Next go to the SM server directory, for example:
c:\Program Files\HP\Service Manager 9.20\server
Find the configure.bat file and execute it

All of the options should be familiar from the original SM install.

When you get to the Database Type and Connection screen enter the ODBC name as the SQL DB Name: value.
Click Next
Verify the Connection
Click Next
Then Click Upload Data

That will create and load all the tables in your new database.

Your sm.ini file has been updated with the new database info.  You will have to edit it to go back to any previous db.  Add some extra sqldb: lines and comment them out so it will be easy to switch in the future. Remember to always stop SM before changing the sqldb parameter

[sqlserver]
#sqldb:SMTEST
#sqldb:SMDEMO
sqldb:SMDEMO9
sqllogin:sa/SM@7DEMODATA

Note: the configure.bat executes the configure.jar and configure.jar executes a couple of sm commands

  1. sm -sqlverifyconnection
  2. sm -system_load -system_directory:c:\Program Files\HP\Service Manager 9.20\Server\data -log:c:\Program Files\HP\Service Manager 9.20\Server\smconfig.log
Posted in Service Management, SysAdmin | Leave a comment

Date/time format for web service calls

When sending a date/time value into a Service Manager field via a web service call use the following format:
YYYY-MM-DDThh:mm:ss+hh:mm

YYYY = year
MM = month
DD = date
T = time separator
hh = hour
mm = minute
ss = second
+hh:mm or -hh:mm is the time zone offset
Example: 2011-01-05T16:44:00-05:00
Example: 2011-01-15T00:00:00+00:00

Posted in Web Services | Leave a comment