Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 


#Product
#Analytics
#CognosAnalytics
#Analyticstools
#TechXchange Partner
#TechXchange Session
#TechXchange Presenter
#AI
 View Only
  • 1.  Dispatcher parameters

    Posted 06/22/19 03:47 AM
    Greetings. 

    Dispatcher's parameters (available through Admin console) are stored in Content Store (CS). Does anybody know how to extract that information from CS with SQL?

    Thank you in advance.

    ------------------------------
    Yosh Tugrick
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Dispatcher parameters

    Posted 06/28/19 10:02 AM
    You can use the following query (created on SQL Server 2016)
    SELECT t1.NAME Object,
    c.value('@name', 'varchar(max)') Setting,
    c.value('.', 'varchar(max)') Value
    FROM
    (
    SELECT n.NAME,
    CAST(adv.ADVSETTINGS AS XML) ADVSETTINGS
    FROM CMOBJNAMES n
    INNER JOIN CMOBJPROPS16 adv ON n.CMID = adv.CMID
    AND n.ISDEFAULT = 1
    WHERE ADVSETTINGS IS NOT NULL
    ) t1
    CROSS APPLY ADVSETTINGS.nodes('/settings/setting') t2(c);


    ------------------------------
    Daan Lambrechts
    ------------------------------



  • 3.  RE: Dispatcher parameters

    Posted 06/28/19 02:17 PM
    Hi Daan.

    First thank you for your reply and valuable comment. Indeed this will produce advanced parameters. To get this I use a different query:
    with params as (
    	select p16.cmid, cmn.name, obj.owner, obj.tenantid, 
    		replace(
    			replace(
    				replace(
    					replace(
    						replace(
    							replace(
    								replace(p16.ADVSETTINGS,'<settings>',''),
    							'</settings>',''),
    						'</setting><setting name=',';'),
    					'<setting name=',''),
    				'</setting>',''),
    			'"',''),
    		'>','=') settings
    	  from cs.cmobjprops16 p16 
    		inner join cs.cmobjects obj on obj.cmid=p16.cmid 
    		inner join cs.cmobjnames cmn on cmn.cmid=p16.cmid
    	  where p16.ADVSETTINGS is not null 
    		and cmn.isdefault=1
    	)
    	select 'ENV' environment, cmn.name server, obj.created, obj.modified, p.name parameter, cs.value value
    		from params p 
    			inner join cs.cmobjects obj on p.cmid=obj.cmid
    			inner join cs.cmobjnames cmn on obj.pcmid=cmn.cmid
    		cross apply string_split(settings, ';') cs
    		order by value, cmn.name, p.name
    ​


    Do you have query to get parameters for dispatcher, services that are stored in cmobjprops17, 31, 48, 58, 67, etc. tables? 


    Kind regards,
    Yosh.

    ------------------------------
    Yosh Tugrick
    ------------------------------



  • 4.  RE: Dispatcher parameters

    Posted 07/01/19 03:24 AM
    Just join the property table with CMOBJECTS, CMNAMES and CMCLASSES to see to which object the properties apply.
    Use the following query as a base and select the columns you want to get the information from.

    SELECT n.NAME, 
           c.NAME CLASS, 
           props.*
    FROM CMOBJECTS o
         INNER JOIN CMOBJNAMES n ON o.CMID = n.CMID
                                    AND n.ISDEFAULT = 1
         INNER JOIN CMCLASSES c ON o.CLASSID = c.CLASSID
         INNER JOIN CMOBJPROPS48 props ON n.CMID = props.CMID​


    ------------------------------
    Daan Lambrechts
    ------------------------------