OnDemand User Group

Tips and Tricks => Tips and Tricks => Topic started by: frasert on March 30, 2011, 01:27:03 PM

Title: Unloading a bunch of reports at once
Post by: frasert on March 30, 2011, 01:27:03 PM
CMOD 8.4, AIX

If you need to unload lots of reports for a given app group, you need not do them manually one-by-one.  This is the method I use:

-Go to the System Log and search for msg number 87 for the reports you want to unload.
-Copy the Message column that includes the Load ID and paste the contents into your favorite text editor.
-Strip out everything but the Load ID for each line (TextPad makes this easy).
-Copy the contents of this file and paste it into a new file on your AIX server called 'loadids'.
-Run this command:

# corrected per Alessandro....
$ while read loadid ; do arsadmin unload -h server -u userid -p passwd -g AppGroup -L $loadid ; done < loadids

DONE!

Of course, once the number of reports to unload reaches a size that's unmanageable for simple copy/paste, you'll have to find another way to produce the loadids file.
Title: Re: Unloading a bunch of reports at once
Post by: Alessandro Perucchi on March 31, 2011, 01:11:24 AM
Well your online command is wrong!! :-D

I'll correct it for the future generation !! :-D

while read loadid ; do arsadmin unload -h server -u userid -p passwd -g AppGroup -L $loadid ; done< loadids

Otherwise, nothing to say!

Cheers,
Alessandro
Title: Re: Unloading a bunch of reports at once
Post by: frasert on March 31, 2011, 07:42:46 AM
Oops, thanks Alessandro for the correction!!  That's what happens when I rush through a post!
Title: Re: Unloading a bunch of reports at once
Post by: Alessandro Perucchi on March 31, 2011, 08:07:46 AM
Well, I have another correction :-D

You said, that it was for AIX... I would say it's for UN*X   (meaning : AIX, Linux, Solaris, HP)

Cheers,
Alessandro
Title: Re: Unloading a bunch of reports at once
Post by: frasert on March 31, 2011, 11:08:18 AM
Right, it probably works for other environments.  I was just stating what environment we are using.  Thanks.