Blog

Save cognos report to file system / Bursting Cognos Reports to File System

Save cognos report output to a server/network drive.
Bursting Cognos Reports to File System

To achieve bursting first we should make sure all the below steps are completed and tested.

Steps:
part A: Configure Cognos Configuration.
1. Create a shared folder. Make sure that cognos servers are having access to this folder by checking properties, security of that folder
2. Go to Cognos Configuration –> actions–> General –> Archive file location –> type : file://\\servername\directory or file:///
3. Click test to make sure your syntax and access to that folder are accessible.
4. Go to “Data Access”–> Content Manager–> “Save report output to a file system” –> Change the value to “True”.
5. Restart the cognos service.
6. Save cognos configuration and restart the service.
7. Make above changes to all the content managers.

Part B: Creating File system at Cognos Connection
1. In Cognos administration, go to Configuration –> dispatcher and services
2. top right hand side click on “Define File system Location”
Define file system location
3. New — > provide name, File system location (this would be sub folder under file system location)
4. click Finish
You can create more file system locations to save reports in different folders in same main folder. This way you will have multiple folders at your file system location.

Part C: Saving the report to file system location.
1. at cognos connection go to required report — > “run with options” –> Advanced Options –> Run in the background –> You will see a new option on your right near delivery- “Save to the file system”. check this box and click on ” Edit the file system options”.
2. select/provide required location, Conflict Resolution, Name.
3. Click OK and then Run.
4. you would see new report in the new folder you mentioned

after above steps are completed and tested as required we can re-do Part-C by checking Bursting Option which would help the report to Burst to required folder.

Sources:
http://www-01.ibm.com/support/docview.wss?uid=swg21342666
http://www-01.ibm.com/support/docview.wss?uid=swg21381810

error: CFG-ERR-0103 Unable to start IBM Cognos service. Execution of the external process returns an error code value of -1

Cognos service fails to start by error –

” CFG-ERR-0103 Unable to start IBM Cognos service. Execution of the external process returns an error code value of -1 ”

When this error happens it happens mainly due to issue related to content store.

a. test content store. If its working then it might have got corrupted.

b. dispatcher port may be in use.

 

Source:
http://www-01.ibm.com/support/docview.wss?uid=swg21599720

 

error: cognos Content Manager failed to start because it could not load driver “com.microsoft.sqlserver.jdbc.SQLServerDriver”.

issue- In Cognos analytics(11.0.5+) when you are trying to configure content store with SQL server data base for the first time you will get the error – “cognos Content Manager failed to start because it could not load driver “com.microsoft.sqlserver.jdbc.SQLServerDriver”.”

Solution is mentioned in below website:
https://www.ibm.com/support/knowledgecenter/SSEP7J_11.0.0/com.ibm.swg.ba.cognos.inst_cr_winux.doc/t_MSdriver_SSLconfig.html

Microsoft JDBC driver are found in below  microsoft website:
https://www.microsoft.com/en-us/download/details.aspx?id=55539

Download the file – sqljdbc_6.2.2.1_enu.tar.gz from above microsoft link.
Extract the above file and find the file – “sqljdbc42.jar” and place it at cognos installation –  install_location/drivers folder.

Re-open Cognos configuration and test the Content store.

sql server – How to get age

 

“datediff” function wont be helpful for calculating age in SQLSERVER.  Below query gives an idea on how to calculate age.

declare @bday datetime Set @bday = ‘2000-02-28 00:00:00.000’
declare @as_of datetime Set @as_of = ‘2002-03-01 00:00:00.000’

select
@bday,
@as_of,
Convert(Char(8),@as_of,112),
Convert(Char(8),@bday,112),
0 + Convert(Char(8),@as_of,112) – Convert(Char(8),@bday,112),
(0 + Convert(Char(8),@as_of,112) – Convert(Char(8),@bday,112)) / 10000

SQL Server dates

 

to get different type of dates based on a date.

select
getdate()
, cast(cast(getdate() as date) as datetime) today_00hrs
, dateadd(dd,-1, cast(getdate() as date)) as yesterday_date
, cast(dateadd(dd,-1, cast(getdate() as date)) as datetime) as yesterday_00hrs
, DATEADD(yy, DATEDIFF(yy, 0, GETDATE()), 0) AS StartOfYear
, DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()), 0) as StartOfMonth
, (DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE())-1, 0)) StartOfLastMonth
, DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE())-3, 0) as Startof3monthsback
, DATEPART(week, GETDATE())weekofdate
, DATEADD(yy,-1,getdate() ) LastYearSameDateTime