Export all report XMLs to file system – Updated

2 years ago, I posted a method for exporting all of the reports to the file system, using the same folder path. I was never happy with that method, as it required adding a UDF to the content store, and large reports would fail. Since getting these reports was a requirement at one of my clients, I finally had the time to tweak it.

Unlike the previous version, I don’t have access to Oracle, so this is on SQL server. The connection string to the server is handled from inside the script (row 151), all you need to do is change the data source and catalog details to connect.

The reports will be saved under c:\temp\reports. You may want to change that as well (row 244), but don’t forget that windows has an absolute limit in the number of characters in a file path.

Unlike the old version, this will also pull reports from users’ My Folders, including orphaned reports from deleted users. The user reports will be saved under \users\<user name>\my folders\. This will also generate a log file including the sql query sent to the db, and all of the reports generated.

Due to security concerns, the file has been renamed to getreports.vbs.txt. Simply rename that to getreports.vbs to enable it.

I tested this on Cognos 10.2, on SQL Server 2005. If anyone has access to Oracle and wants to adapt the SQL, I’llĀ  gladly amend the post to include it.

 

getreports.vbs (1646 downloads)

Review: IBM Cognos BI v10.2 Administration Essentials

Part of my job as an Admin is to understand all aspects of the Cognos environment, from configuring and tuning distributed systems to being able to decipher the cryptic error messages that occasionally plague the users. Obviously this book is not for me. This book is more geared for beginners, as it says in the beginning:

Who this book is for
This book is for beginners planning to learn IBM Cognos BI Administration 10.

So, with that in mind it’s important to remember that experienced admins can skip the book. It is the people with little or no administrative experience who will benefit most from the book.

My concern is the length, at 128 pages there is simply not enough room to go into detail on everything. While it gives descriptions on the various tabs and settings of the administration page, I would have preferred more explanations on the settings and their effects.

Despite the brevity it does cover, albeit briefly, the various elements that are involved in the administrative process. The chapters are split by area of interest, configuration, components, security, etc. It describes the what happens when Cognos gets a request and the path the request takes from the gateway through the dispatcher. It explains the authentication and security system fairly well. Most importantly it also provides advice for new admins on how to run the system.

Ultimately I believe the book succeeds in its goal, namely taking people to the point where they can keep a Cognos server up and running.

You can find the book at the PacktPub website here.

Quick and painless way of accessing users’ folders

As part of my administrative duties for my various clients, I periodically trawl through the logs. Many times I’ll want to see exactly what the users are doing in the reports on my server. It becomes a headache when these reports are in the users’ “My Folders”. I need to go into the administration page, find the user, go into their “My Folders”, copy out the report, paste it into mine then run it. It’s a mess and I’m far too lazy for that.

Fortunately Cognos allows us to access objects through URL parameters. On my laptop, I’m using OpenDJ as my authentication provider, so the CAMID is slightly different than Active Directory. My CAMID here is CAMID(“OpenDJ:u:cn=administrator”). In AD, it might be CAMID(“AD:u:r7a1n7d8o8m3l1e4t9t2e2r4s01234567)

My user

I can just copy that CAMID and paste it into the URL as:
http://server/cognos/cgi-bin/cognosisapi.dll?b_action=xts.run&m=portal/cc.xts&m_path=CAMID(“OpenDJ:u:cn=administrator”)

2. Accessing my user

Obviously this is still predicated on the security in place. A user who doesn’t have permission to access another user’s folder will get an “Access Denied”

3. Thwarted again

UPDATE!
In the comments below, Ryan shared that a users’ folders can be accessed directly with the username:
http://server/cognos/cgi-bin/cognosisapi.dll?b_action=xts.run&m=portal/cc.xts&m_path=//account[@userName=’john.doe’]/folder[@name=’My Folders’]