Tuesday, March 11, 2008

How to edit Profile manager subscriptions using idlattr

In Framework, Profile manager subscription database could become corrupt very easily. This is especially true in a large environment where the profile manager subscription is constantly modified thru automation scripts. Commands such as wdelep would also affect the profile manager subscriptions. If the profile manager becomes corrupt, the subscriptions could not be removed using wunsub command and you have to manually edit the subscriptions using a series of idlattr commands. This article explains how to manually edit the subscription database.

Disclaimer: Use this as a last resort. There are some cases where the whole profile manager database got corrupt because of a typo. A Tivoli object database backup is highly recommended before doing any manual database editing

Step 1: Get the list of subscribers

$ oid=`wlookup -r ProfileManager
$ idlattr -tvg $oid subscribers TMF_CCMS::_sequence_ssubscriber_subscriber_list > input.txt


Step 2: Edit the subscriber database manually.

A sample output from step 1 is shown below.

{ 2 { { { 1842792731.4.522+#TMF_Endpoint::Endpoint# "viking" } 1842792731.1.525#
TMF_UI::Presentation# "normal" "w32-ix86-client" } subsc_all TRUE { 0 } } { { {
1842792731.3.522+#TMF_Endpoint::Endpoint# "itm61" } 1842792731.1.525#TMF_UI::Pre
sentation# "normal" "w32-ix86-client" } subsc_all TRUE { 0 } } }

Open the output in vi editor and if you are removing one subscriber, you need to decrement the first number (i.e. 2) by one and remove the entry for the invalid subscriber. The edited subscriber list is given below.

{ 1 { { { 1842792731.3.522+#TMF_Endpoint::Endpoint# "itm61" } 1842792731.1.525#TMF_UI::Presentation# "normal" "w32-ix86-client" } subsc_all TRUE { 0 } } }

Step 3: Put the edited text back into the subscriber database

$ idlattr -tvs $oid subscribers TMF_CCMS::_sequence_ssubscriber_subscriber_list < input.txt

Step 4: Do a wchkdb

Run a wchkdb against the profile manager to verify its consistency.

wchkdb -u $oid


Hope this helps.

No comments: