Product:
Cognos Enterprise Planning PLANSRVR_version=PLANSRVR-AW32-ML-RTM-10.2.1000.1-0

Cognos Analytics BI kit_version=11.0.12.18062512

Microsoft Windows 2012 R2 server

Problem:

The IBM Cognos service is restarting and people can not work. Error users can get are;

The server did something wrong</faultstring><detail><bus:exception><severity>error</severity><errorCode>DISPATCHER_NOT_YET</errorCode><bus:message><messageString>DPR-ERR-2109 The dispatcher cannot service the request at this time. The dispatcher is still initializing. Contact your administrator if this problem persists.

Suggested solution:

Stop all services.

Export all configuration.

Recreate the internal Cognos certificates.  Follow instructions at the links below.

Open Cognos Configuration and start the service in correct order. The order is very important. CA content manager must be started first.

Please note that the steps are different for different version of Cognos.

More Information:

https://www.ibm.com/support/pages/how-regenerate-cryptographic-keys-cognos-analytics-11

https://www.ibm.com/support/pages/how-regenerate-cryptographic-keys-cognos-1022

https://www.ibm.com/support/pages/how-regenerate-cryptographic-keys-cognos-bi-1021-and-earlier

Product:
Planning Analytics 2.0.9.10   TM1_version=TM1-AW64-ML-RTM-11.0.910.5-0
Microsoft Windows 2016 server

Issue:

How upgrade Planning Analytics to later version?

Suggested solution:
Always follow IBM instructions first, this is a suggestion on what to check for at a installation of TM1.

In the new versions of PA, you can stop the IBM services, and do the installation on top of the existing Planning Analytics folder. This is the recommended way for a upgrade.

Download the latest version from IBM:
https://www.ibm.com/support/pages/ibm-planning-analytics-local-20910-now-available-download-fix-central

https://exploringtm1.com/how-to-download-planning-analytics-local-workspace-excel-and-spreadsheet-services/

For a installation on a Windows server, you need the files that are for windows;

and the latest PAW and PASS…

Check this before installation on your new windows server:

Install Microsoft Visual C++ 2010 SP1 Redistributable Package

https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x64.exe

Install SQL 2012 native client for ODBC support to SQL databases

https://download.microsoft.com/download/B/E/D/BED73AAC-3C8A-43F5-AF4F-EB4FEA6C8F3A/ENU/x64/sqlncli.msi

Install NET Framework 4.8

https://support.microsoft.com/en-us/topic/microsoft-net-framework-4-8-offline-installer-for-windows-9d23f658-3b97-68ab-d013-aa3c3e7495e0

Turn DEP off in Windows control panel
Set Power Options to HIGH Performance in Windows control panel
Turn off IEESC (internet explorer enhanced security configuration)
Start Print spooler service (on the TM1 server)
Exclude cognos and docker folders from anti-virus software scanning
Open firewall ports 80,443,9510,9511 to TM1 end users
Open firewall ports 80,443,9012,9510,9511, 5495,5498,5895,5898, 12300-12400 between servers.
Open firewall ports 9300 for Cognos BI, 1433 for SQL, 25 for Mail, 389 for Active Directory.
Install 7zip and Notepad++ to edit xml files on the server.

 

Setup Planning Analytics local:

If more than one network card, then set the order of there use from powershell command;

Get-NetIPInterface

Set-NetIPInterface -InterfaceIndex 2 -InterfaceMetric 50
Unzip tm1_winx64h_2.0.910.5_ml.tar.gz and Install with issetup.exe
Set maximum memory in MB for WebSphere to 8192 in Cognos Configuration
Check file C:\Program Files\ibm\cognos\analytics\templates\ps\portal\variables_tm1.xml exist on your CA11 server. Rename the variables_tm1.xml.sample file to variables_tm1.xml
Update files planning.html, tm1web.html with tm1web servername and port on CA11 server

// Update the following to point to the location of the planning service(s)
var planningServices = ["http://servername.domain.com:9510","http://servername.domain.com:9511"];

Update file pmhub.html with PAW servername and port on CA11 server

// Update the following to point to the location of the pmhub service(s)
var pmhubURLs = [http://paservername.domain.com:9510","http://paservername.domain.com:9511","http://pawservername.domain.com"];
Set your servers ip, in the tm1s.cfg file to IPAddressV4=”192.168.1.13″  (replace with your ip value)
Update a planning application for use of SSO and CAM in tm1s.cfg with below values;

IntegratedSecurityMode=5

ServerCAMURI=http://caservername.domain.com:9300/p2pd/servlet/dispatch

ClientCAMURI=https://caservername.domain.com/ibmcognos/bi/v1/disp

ClientPingCAMPassport=900

Surf to http://paservername.domain.com:9510/pmpsvc to connect it with a CAM application
To preset the admin host in tm1web, Open D:\Program Files\ibm\cognos\tm1web\webapps\tm1web\WEB-INF\configuration\tm1web_config.xml and change <add key=”AdminHostName” value=”paservername” />

Open D:\Program Files\ibm\cognos\tm1web\webapps\tm1web\WEB-INF\configuration\tm1web_config.xml and change the timeout for the web
<add key=”HttpSessionTimeout” value=”60″ />
Open firewall ports 80,443,9510,9511,8888, 5495,5498,5895,5898,9012 and 12345.. for developers.
CertificateVersion=2 in TM1S.CFG gives that you use 2048-bit encryption internal in TM1
Test to remove any MTQ line in TM1S.CFG for new versions of Planning Analytics
For a new installation create a folder structure for the applications, like d:\tm1\app\datafiles…
Add the PortNumber=12345 (and below numbers) to the tm1s.cfg file for your applications.

HTTPportnumber=12346  (they must be unique for each TM1 application)

ClientMessagePortNumber=12347

Change log time to LOCAL timezone, by in the tm1s-log.properties file edit:

log4j.appender.S1.TimeZone=Local
Where TM1 architect is installed, open C:\ProgramData\Applix\TM1\tm1p.ini and add lines

AllowImportCAMClients = T 

CognosGatewayURI = https://caserver.domain.com/ibmcognos/bi/v1/disp

Language=ENG in TM1P.INI will give English menu in TM1 Architect
https://www.ibm.com/docs/en/planning-analytics/2.0.0?topic=installation-tm1-language-configuration

 

Setup new TM1WEB: IBM Planning Analytics Spreadsheet Services

Install tm1web (PASS) from tm1web-11.0.68-21100620-winx64h_bundle folder by click on exe file

Change to port 9511, in file server.xml, located in the folder C:\Program Files\ibm\cognos\tm1web\wlp\usr\servers\tm1web

Restart the “IBM Planning Analytics Spreadsheet Services”.

To make TM1 APP WEB work, you need to update file pmpsvc_config.xml in folder D:\Program Files\ibm\cognos\tm1_64\webapps\pmpsvc\WEB-INF\configuration with value:

<client id="thinClient" type="html-new" uri="http://paservername.domain.com:9511/tm1web/Contributor.jsp">

Start “IBM Cognos TM1” service, that is for Tm1 App Web (pmpsvc).

Setup Planning Analytics Workspace on Windows 2016

To install to d drive, create c:\programdata\docker\config\daemon.json with this content:

{
"debug": true,
"data-root": "d:\\docker"
}
Run ./Start.ps1

https://www.ibm.com/support/pages/cognos-analytics-and-planning-analytics-integration

If you have issue, use this powershell commands to get more information:

PS C:\> docker version
PS C:\> docker image ls
PS C:\> docker ps --all

PS C:\> Get-VMSwitch
PS C:\> Get-NetNat
PS C:\> Get-ContainerNetwork
Update PAW administration for CAM
IBM cognos BI gateway URI  http://caserver.domain.com:80/ibmcognos/bi/v1/disp

IBM cognos BI Dispatcher URI  http://caserver.domain.com:9300/bi/v1/disp

Change $env:CAMLoginNamespace to same as Namespace ID in Cognos Configuration.

Set timeout to $env:ProxyTimeoutSeconds=900 in file paw.ps1
https://www.ibm.com/docs/en/planning-analytics/2.0.0?topic=local-what-timeout-settings-can-i-set
To get the internal gateway IP for use on windows 2016 server enter:

docker inspect pa-gateway -f' {{.NetworkSettings.Networks.nat.IPAddress}}'
Locate the scripts/shutdown.ps1 script in your Planning Analytics Workspace installation folder.

Copy the scripts/shutdown.ps1 script to a permanent location on your system (d:\ibm\).

In a command window, open the Group Policy Editor (GPE) by running gpedit.msc.

Expand Computer Configuration and select Windows Settings.

Double-click Scripts (Startup/Shutdown).

Switch to the PowerShell Scripts tab.

Click Add and add the shutdown.ps1 script from the folder.

If you need to change port for paw set $env:PAGatewayHTTPPort=”8080” in file paw.ps1
Install the PA agent for the new workspace version on your TM1 server

https://www.ibm.com/docs/en/planning-analytics/2.0.0?topic=components-planning-analytics-administration-agent-local-only

Setup mail for the PA agent

https://pmsquare.com/analytics-blog/2020/11/8/ibm-planning-analytics-system-alerts-via-email

 

How to upgrade PAW:
Download the new version and unzip the file in a new folder e.g. \ibm\paw69

  1. Stop the running paw with command ./scripts/paw.ps1 stop
  2. Copy the /ibm/paw68/config/paw.ps1 file from your current installation to the new installation location (/ibm/paw69/config).
  3. Copy the /ibm/paw68/config/certs directory from your current installation to the new installation location.
  4. Optional: If you configured SSL, copy the /ibm/paw68/config/ssl directory from your current installation to the new installation location.
  5. Install Planning Analytics Workspace Local in the new installation location. See Installing Planning Analytics Workspace Local. Go to the /ibm/paw69/ folder and run ./Start.ps1

    Reply “y” when you are prompted to install the Docker images. Reply “y” when you are prompted to open the administration tool.

 

More Information:

https://www.ibm.com/docs/en/planning-analytics/2.0.0?topic=features-whats-new-in-planning-analytics

https://www.ibm.com/docs/en/planning-analytics/2.0.0?topic=started-planning-analytics-local-installation-configuration

https://exploringtm1.com/how-to-install-planning-analytics-spreadsheet-services/

https://exploringtm1.com/install-planning-analytics-workspace-to-windows-2016/

https://exploringtm1.com/how-to-upgrade-install-planning-analytics-for-excel-pax/

https://exploringtm1.com/how-to-upgrade-planning-analytics-tm1/

https://code.cubewise.com/blog/dealing-with-daylight-saving-time-and-time-zones-in-tm1

How to Upgrade Planning Analytics Workspace (PAW)

Older versions are listed here:

Product:

Cognos Analytics 11

Issue:
The icon to start cognos configuration is gone, how do i start it?

Solution:

For CA 11 kit_version=11.0.12.18062512
kit_name=IBM Cognos Analytics

Run D:\Program Files\ibm\cognos\analytics\bin64\cogconfig.bat

For CA 11kit_version=11.0.13.19030518
kit_name=IBM Cognos Analytics

Run “C:\Program Files\ibm\cognos\analytics\bin64\cogconfigw.exe”

For CA kit_version=11.1.7-2106251648
Manifest=casrv-manifest-11.1.7-2106251648-winx64h.json
Installer=analytics-installer-2.2.2-win.exe

Run D:\Program Files\ibm\cognos\analytics\bin64\cogconfigw.exe

More information:

https://www.ibm.com/docs/en/cognos-analytics/11.1.0?topic=analytics-cognos-configuration-command-line-options

https://www.ibm.com/support/pages/ibm-cognos-analytics-1117-fix-pack-3

Product:
Microsoft SQL server 2016

Issue:
Try to find what a users have for access rights inside a database.

Suggested solution:

Enter this code as sysadmin, to find person access rights in one database:

EXECUTE AS LOGIN = 'YourDomain\User.Name' --Change This

USE database  --Change This

GO

SELECT * FROM fn_my_permissions(null, 'database');

REVERT

Enter this to see what databases a person have access to

EXECUTE AS LOGIN = 'YourDomain\User.Name' --Change This
SELECT [name]
FROM MASTER.sys.databases
WHERE HAS_DBACCESS([name]) = 1
REVERT

To find your rights in the current database:

SELECT * FROM fn_my_permissions(null, 'database');

To list dbowners

SELECT user_name(member_principal_id)

FROM   sys.database_role_members

WHERE  user_name(role_principal_id) = 'db_owner'

More Information:

https://stackoverflow.com/questions/7048839/sql-server-query-to-find-all-permissions-access-for-all-users-in-a-database

http://www.sqlnuggets.com/blog/sql-scripts-check-logins-permissions/

http://www.sqlnuggets.com/blog/sql-scripts-list-databases-a-login-can-access/

https://sqlgeekspro.com/users-db_owner-access-databases/

https://www.sqlserver-dba.com/2015/05/find-database-users-mapped-to-db_owner-role.html

https://schottsql.blogspot.com/2016/04/getting-all-permissions-for-server.html

fn_my_permissions() – Sprawdzenie jakie mamy uprawnienia do bazy danych

Product:
Microsoft SQL server 2016

Issue:
When moving a SQL database to a different Windows server, you want to check the other database if they have any SP reference to that database.

Solution:

This query will loop all database and run the select statement on each, and find any store procedure that contain the word “foo”.

EXEC sp_MSforeachdb 'USE ? SELECT ROUTINE_CATALOG,ROUTINE_SCHEMA,ROUTINE_NAME, ROUTINE_DEFINITION, LAST_ALTERED

FROM INFORMATION_SCHEMA.ROUTINES 

WHERE ROUTINE_DEFINITION LIKE ''%foo%'' 

AND ROUTINE_TYPE=''PROCEDURE'' 

ORDER BY ROUTINE_NAME'

 

It is necessary to set the database for the query to run against, by using the USE ? statement, otherwise the code will execute in the context of the current database.

You can also use this to search inside one database:

SELECT ROUTINE_NAME, ROUTINE_DEFINITION

FROM INFORMATION_SCHEMA.ROUTINES 

WHERE ROUTINE_DEFINITION LIKE '%foo%' 

AND ROUTINE_TYPE='PROCEDURE'

ORDER BY ROUTINE_NAME

 

or use below, as above have a limit of searching only the first 8000 characters of the stored procedure.

SELECT OBJECT_NAME(object_id), definition

    FROM sys.sql_modules

    WHERE OBJECTPROPERTY(object_id, 'IsProcedure') = 1

    AND definition LIKE '%foo%'

 

More information:

https://www.mytecbits.com/microsoft/sql-server/search-find-stored-procedure

https://www.mssqltips.com/sqlservertip/1414/run-same-command-on-all-sql-server-databases-without-cursors

http://www.bradleyschacht.com/search-stored-procedure-text/

Product:

Microsoft SQL server 2016

Issue:

Is there someone inside the database?

Suggested Solution:

Run this SQL script to see who have logged in to the database:

select 

@@servername as [ServerName],

getdate() as RunTime, 

spid, DB_NAME(dbid) as DatabaseName, 

login_time, 

last_batch, 

hostname, 

program_name, 

nt_domain, 

nt_username, 

loginame 

From master..sysprocesses

 

To get more information, like kerberos, run this SQL script:

select c.auth_scheme,* from sys.dm_exec_sessions s join sys.dm_exec_connections c on s.session_id=c.session_id where s.host_name ='servername'

To see active connections:

EXEC sp_who2 'active';

More Information:

https://www.sqlservercentral.com/articles/is-this-database-being-used

Product:

Microsoft SQL server 2016

Issue:

Error when testing linked servers in SQL server.

Solution:

Ensure the port is open first, by start PowerShell on the from server and use Test-NetworkConnection.  Enter below to check port 1433;

tnc servername -port 1433

If firewall is open, and you get a error saying “anonymous login” then the kerberos delegation does not work. You need to check that your account (or the account that run the SQL agent service) is allowed to be delegated, check with this power-shell command;

Get-ADUser -Filter {SamAccountName -eq "YourAccountSamName"} -Properties msDS-AllowedToDelegateTo | Select-Object -ExpandProperty msDS-AllowedToDelegateTo

You must check that the SQL server machine, have in AD allow to delegate, you do this with this PowerShell command (for both servers);

Get-ADComputer ComputerName -Properties * | Format-List -Property *delegat*,msDS-AllowedToActOnBehalfOfOtherIdentity

TrustedForDelegation must be True.

Ask the Active Directory team to correct above.

 Get-ADServiceAccount -Filter {SamAccountName -eq "YourServiceAccuntNameHere"} -Properties * | Format-List -Property *delegat*

Above need to be used, if the account is a Service Account in AD.

https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-adserviceaccount?view=windowsserver2022-ps

More information:

Microsoft Made an Easy Button for SPN and Double Hop Issues

Double-Hop Linked Servers

https://help.zaptechnology.com/zap%20cubexpress/currentversion/content/topics/HowTo/UsingSPN.htm

https://social.technet.microsoft.com/wiki/contents/articles/717.service-principal-names-spn-setspn-syntax.aspx

https://kb.parallels.com/en/124644

https://www.sqlshack.com/how-to-create-and-configure-a-linked-server-in-sql-server-management-studio/

https://www.mssqltips.com/sqlservertip/6083/understanding-sql-server-linked-servers/

https://www.c-sharpcorner.com/UploadFile/suthish_nair/linked-servers-in-sql-server-2008/

https://en.hackndo.com/constrained-unconstrained-delegation/

https://www.microsoft.com/en-us/download/details.aspx?id=39046&WT.mc_id=soc-n-%5bTR%5d-loc-%5bServices%5d-%5bfarukc%5d

Product:

Microsoft SQL server 2016

Issue:

SQL agent can not send mail. There is no error in windows event log, and no errors in SQL server log.

Solution:
Install NET Framework 3.5 on your SQL server.  Download from here:

https://www.microsoft.com/en-us/download/details.aspx?id=25150

SQL server 2016 demands Net Framework 3.5 for the mail function to work.

Check if NET Framework is installed on your server in folder:

C:\Windows\Microsoft.NET\Framework64

Folder is missing from the SQL server where SQL Mail is not working.

On a SQL server, where mail function is okay, the v3.5 folder exist.

You can also test this by go to the SQL server, start a command prompt, and go to folder

C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn

Run DataBaseMail.exe

If you get a error that Net Framework can not be installed, then this is the problem.

Please note that the windows account that run the SQL Server Agent (MSSQLSERVER) must have access rights to the Net Framework 3.5 folder and its files.

You can check if SMTP mail host is working by run below PowerShell command:

Send-MailMessage -To "your.mail@company.com" -From "noreply@company.com"  -Subject "Test mail powershell" -Body "Some important plain text!" -Credential (Get-Credential) -SmtpServer "smtp-servername" -Port 25

If that works, then the SMTP and firewall is correct. Then you need to check SQL servers settings;

SELECT [sysmail_server].[account_id],

       [sysmail_account].[name] AS [Account Name],

       [servertype],

       [servername] AS [SMTP Server Address],

       [Port]

FROM [msdb].[dbo].[sysmail_server]

     INNER JOIN [msdb].[dbo].[sysmail_account] ON [sysmail_server].[account_id] = [sysmail_account].[account_id];

Above gives you the SMTP setup

EXEC msdb.dbo.sysmail_help_queue_sp @queue_type = 'Mail';
Above will show the status of the mail log
SELECT TOP (1000) [profile_id]
,[name]
,[description]
,[last_mod_datetime]
,[last_mod_user]
FROM [msdb].[dbo].[sysmail_profile]

Above will show the SQL Mail profiles.

More information:

Troubleshooting Database Mail Failures

https://www.sqlshack.com/configure-database-mail-sql-server/

Check version of SQL server : https://sqlserverbuilds.blogspot.com/

Product:

Microsoft SQL server

Issue:
SQL server is slow, is it low on memory?

Solution:

Get Brent Ozar Health check.  https://www.brentozar.com/blitz/ 

Other solution:

Check if SQL server need to move pages out of memory with this code:

SELECT *

FROM sys.dm_os_performance_counters

WHERE [counter_name] = 'Page life expectancy'

Page Life Expectancy drops can be triggered by confusing operations. By default, any one running query can get a memory grant the size of 25% of your buffer pool. Run a few of those queries at the same time, and your buffer pool gets drained – but PLE doesn’t necessarily drop. However, the instant an unrelated query runs and needs to get data that isn’t cached in RAM, your PLE will drop catastrophically. Which queries are at fault? ”

Check how memory is used by each database:

SELECT

    (CASE WHEN ([database_id] = 32767)

        THEN N'Resource Database'

        ELSE DB_NAME ([database_id]) END) AS [DatabaseName],

    COUNT (*) * 8 / 1024 AS [MBUsed],

    SUM (CAST ([free_space_in_bytes] AS BIGINT)) / (1024 * 1024) AS [MBEmpty]

FROM sys.dm_os_buffer_descriptors

GROUP BY [database_id];

GO

 

 

More Information:

https://www.brentozar.com/archive/2020/06/page-life-expectancy-doesnt-mean-jack-and-you-should-stop-looking-at-it/

https://houseofbrick.com/page-life-expectancy-and-what-its-telling-you/

https://www.spotlightcloud.io/blog/monitoring-page-life-expectancy-in-sql-server

https://training.brentozar.com/p/how-i-use-the-first-responder-kit

SQL SERVER – What is Page Life Expectancy (PLE) Counter

https://www.sqlskills.com/blogs/paul/performance-issues-from-wasted-buffer-pool-memory/

https://github.com/SQLadmin/AwesomeSQLServer/blob/master/T-SQL%20Scripts/Memory%20Monitoring.sql

Product:

Microsoft SQL server

Issue:
How slow is the disk for my databases?

Suggested solution:

This query will show Average Total Latency for each database, value above 10ms is bad.

SELECT DB_NAME(vfs.database_id) AS database_name ,physical_name AS [Physical Name],

size_on_disk_bytes / 1024 / 1024. AS [Size of Disk] ,

CAST(io_stall_read_ms/(1.0 + num_of_reads) AS NUMERIC(10,1)) AS [Average Read latency] ,

CAST(io_stall_write_ms/(1.0 + num_of_writes) AS NUMERIC(10,1)) AS [Average Write latency] ,

CAST((io_stall_read_ms + io_stall_write_ms)

/(1.0 + num_of_reads + num_of_writes)

AS NUMERIC(10,1)) AS [Average Total Latency],

num_of_bytes_read / NULLIF(num_of_reads, 0) AS [Average Bytes Per Read],

num_of_bytes_written / NULLIF(num_of_writes, 0) AS [Average Bytes Per Write]

FROM sys.dm_io_virtual_file_stats(NULL, NULL) AS vfs

JOIN sys.master_files AS mf

ON vfs.database_id = mf.database_id AND vfs.file_id = mf.file_id

ORDER BY [Average Total Latency] DESC

 

More information:

https://www.sqlshack.com/sql-server-troubleshooting-disk-i-o-problems/

https://www.mssqltips.com/sqlservertip/6125/disk-latency-for-sql-server-database-and-transaction-log-files/

https://www.brentozar.com/blitz/slow-storage-reads-writes/