Jump to content
We've recently updated our Privacy Statement, available here ×

asimkin

Members
  • Posts

    196
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by asimkin

  1. Use-caseHow to configure TIBCO JasperReports® Server to allow access to Ad Hoc Cache for administrators (ROLE_ADMINISTRATOR)? ResolutionBy default, only superuser (ROLE_SUPERUSER) has access to Manage > Server Settings > Ad Hoc Cache menu. In order to allow users with ROLE_ADMINISTRATOR role access the menu, the following steps should be performed: open WEB-INF/applicationContext-security-pro-web.xml configuration filelocate bean class="com.jaspersoft.jasperserver.api.common.util.spring.GenericBeanUpdater"add ROLE_ADMINISTRATOR role to designerCacheFlow property: designerCacheFlow=ROLE_SUPERUSER,ROLE_ADMINISTRATORsave the changes, restart the serverAfter these steps Ad Hoc Cache menu is accessible to users that belong to ROLE_ADMINISTRATOR ROLE using below URL: http://localhost:8080/jasperserver-pro/flow.html?_flowId=designerCacheFlow Solution tested with TIBCO JasperReports® Server AS-20191016, case #01735077
  2. Issue DescriptionUser created a dashboard. The he runs it on TIBCO JasperReports® Server UI, the dashboard retains the size given to it. This can be verified via dashboardCanvas jr class on the console. But, when this dashboard is rendered via Visualize.js, the dashboard's height is getting limited to 400px always. ResolutionVisualize.js sets dashboardCanvas div element height to 400px if no height set to container element where dashboard rendered. To change the behavior and make the dashboard size dynamic, you should specify elements heights for HTML document <head> </head> tags like <style type="text/css"> html, body { height: 100%; } #container { height: 100%; } </style> where container is ID of DIV element to render dashboard: <body> <div id="container"></div> </body> Solution tested with TIBCO JasperReports® Server v.7.2.0 AS-20190918, case #01799857
  3. Issue DescriptionIn TIBCO JasperReports® Server v.7.1.0 customer noticed that Ad Hoc View Export to any format silently truncates data when number of rows exceeds "Ad Hoc Dataset Row Limit" parameter. Customer expects to get a message like "The query for the report has been canceled because it returned more than 100,000 rows. You will have to modify the report to reduce the number of rows returned"[/code]As a result, end-users do not know that the data has been truncated, and can't get appropriate result. How to fix the issue? ResolutionThis is a regression in TIBCO JasperReports Server v.7.1.x related to incorrect calculation of REPORT_MAX_COUNT parameter involved in export process. Then a user exports Ad Hoc View, JasperReports Server creates a temporary report and generates a query with limit clause. Limit value is 'Ad Hoc Dataset Row Limit' +1 and condition looks like ... limit <= 'Ad Hoc Dataset Row Limit' +1[/code]If count of returned rows equals 'Ad Hoc Dataset Row Limit' +1 that means that limit 'Ad Hoc Dataset Row Limit' exceeded, dataset has more than 'Ad Hoc Dataset Row Limit' rows and the error message appears. REPORT_MAX_COUNT parameter 'truncates' returned dataset rows before validation of expression 'Ad Hoc Dataset Row Limit' +1 happens. If this parameter value less than 'Ad Hoc Dataset Row Limit' +1, REPORT_MAX_COUNT rows will be returned for further processing. With disabled 'Optimize Queries for Domain-based Reports' option, REPORT_MAX_COUNT always equals "Ad Hoc Dataset Row Limit" +1 With enabled 'Optimize Queries for Domain-based Reports' option the parameter calculation is not correct in v.7.1.x: For example, if "Ad Hoc Dataset Row Limit" = 100000 , REPORT_MAX_COUNT = 100000 instead of 100001 if "Ad Hoc Dataset Row Limit" = 100001 , REPORT_MAX_COUNT = 101000 instead of 100002 if "Ad Hoc Dataset Row Limit" = 200000 , REPORT_MAX_COUNT = 200000 instead of 200001 if "Ad Hoc Dataset Row Limit" = 200001 , REPORT_MAX_COUNT = 201000 instead of 200002 In case REPORT_MAX_COUNT value is less than 'Ad Hoc Dataset Row Limit' +1, the engine decides that complete dataset retrieved and no error message displayed. The issue fixed in v.7.2.0 A possible workaround in v.7.1.x is to pick up "Ad Hoc Dataset Row Limit" value so that REPORT_MAX_COUNT has value equal or great than "Ad Hoc Dataset Row Limit" +1: - export an Ad Hoc View - check Ad Hoc Cache details to verify REPORT_MAX_COUNT It should be equal or great than "Ad Hoc Dataset Row Limit" +1 to get message "The query for the report has been canceled because it returned more than XXXXX rows. You will have to modify the report to reduce the number of rows returned"[/code]in export if more than 'Ad Hoc Dataset Row Limit' rows returned AS-20190912, case #01690425
  4. Issue DescriptionUser developed a report with a java.math.BigDecimal parameter. If he runs the report and passes parameter value like 123456789012345.356, it is displayed properly in the report, but export to MS Excel contains incorrect value 1234567891012350. What's the reason and how to fix it? ResolutionThe issue related to limit of MS Excel. In Excel the maximum number of digits allowed in a number is 15. Please check the doc below for more details: https://support.office.com/en-us/article/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3 The problem in this case is that also when you use the ##0.0E format pattern for this number, some precision is lost, due to the max number of digits limitation. A possible workaround is to disable cell type detect for the report and the value will be treated as a String value, instead of Numeric: add proprerty net.sf.jasperreports.export.xls.detect.cell.type with false value at the report level. AS-20190912, case #01793284
  5. Use CaseCustomer asked for a couple of questions related to caching Ad Hoc View Filter values: Is Ad Hoc View filter value is cached?When we perform the filter within the Adhoc View, is the filter applied into the cached data or directly retrieve data from the data source?AnswersA1. Yes, values of Ad Hoc View Filter are cached A2. The cache is populated by the data that results from queries when creating or running Ad Hoc views. The datasets are uniquely identified by a key that references the query itself, the data source URI, and parameters used when the query was issued. Then you open an Ad Hoc View with filters for the first time, Ad Hoc generates SQLs for all filters (to select distinct values etc) as well as the main query to select data for the view. This main query includes preselected filter values, like select "freight", "orderdate", "shipcity", "shipcountry" from "public"."orders" where ("shipcountry" in ('Argentina', 'Austria', 'Belgium')) order by "shipcountry" As the view opened for the first time (or after the server restart or manual cache clearing), the returned dataset are cached. When you open the same Ad Hoc View for the second time, the engine identifies that the cached dataset already exists and use it instead of performing request to the database. Now, if you change the filters values and click on Apply, a new SQL is generated, for example, you add one more country from filter: select "freight", "orderdate", "shipcity", "shipcountry" from "public"."orders" where ("shipcountry" in ('Argentina', 'Austria', 'Belgium','Brazil')) order by "shipcountry" Ad Hoc checks if there is existing cached data with the same(!) SQL. As it is not, a request is made to database and the returned dataset is cached. If you try to apply the same filter values next time, cached data will be used. JasperReports Server has a user interface to monitor Ad Hoc cache details: - login as superuser - go to Manage > Server Settings > Ad Hoc Cache menu AS-20190823, case #01673185
  6. Issue DescriptionUser created a report with HTML 5 chart with an background image as described in article: https://community.jaspersoft.com/blog/tip-how-set-background-image-columnbar-chart-html-5-charts-jaspersoft-studio-reports When previewing the report in Jaspersoft Studio, the background image is only shown in the HTML report output. It is not visible in other export formats (PDF, DOCX ...). How to make the image visible in the other formats? ResolutionIn order to get background image in PDF/DOCX export, Jaspersoft Studio requires PhantomJS library to de installed in the PC and property com.jaspersoft.jasperreports.highcharts.phantomjs.executable.path[/code]should be added with path to PhantomJS binary in Windows > Preferences menu: PhantomJS library is used to render HTML5 charts by JasperReports Library: https://community.jaspersoft.com/wiki/phantomjs-libary-jasperreports-server In case of using Jaspersoft Studio in MS Windows, back-slash characters in the path should be doubled. Solution tested with Jaspersoft Studio v.7.3.0 AS-20190823, case #01794957
  7. Issue DescriptionCustomer configured TIBCO JasperReports® Server to perform external authentication with LDAP per Authentication Cookbook. As a part of the configuration, he specified mapping an external role (LDAP group) to system administrator role via the organizationRoleMap property of the mtExternalUserSetupProcessor bean: <property name="organizationRoleMap"> <map> <!-- Example of mapping customer roles to JRS roles --> <entry> <key> <value>Chemist Admin</value> </key> <!-- JRS role that the <key> external role is mapped to--> <value>ROLE_ADMINISTRATOR</value> </entry> </map> </property>[/code]But when an LDAP user from 'Chemist Admin' group logged into TIBCO JasperReports® Server, ROLE_ADMINISTRATOR system role was not assigned to him per the configuration. ResolutionBefore processing external role, TIBCO JasperReports® Server performs additional actions with the role name: add ROLE_ prefix to the namecapitalize role nameAs a result, the key should be a role name that your mapping creates, after adding the prefix and capitalization: <property name="organizationRoleMap"> <map> <!-- Example of mapping customer roles to JRS roles --> <entry> <key> <value>ROLE_CHEMIST ADMIN</value> </key> <!-- JRS role that the <key> external role is mapped to--> <value>ROLE_ADMINISTRATOR</value> </entry> </map> </property>[/code]Solution tested with TIBCO JasperReports® Server v.7.2.0 AS-20190815
  8. Issue DescriptionAfter setting up a new TIBCO JasperReports® Server v.7.2.0 environment and migrating data from old one, customer was unable to create any Ad Hoc View as the list of available resources (Create > Ad Hoc View > Select Data) was empty. ResolutionDuring a web session, an error in browser console was identified. GET request like https://bi.xxxx.com/rest_v2/api/resources?folderUri=/&recursive=true&offset=0&limit=100&forceTotalCount=true&forceFullPage=true&type=topic&type=domainTopic&type=semanticLayerDataSource&type=mondrianConnection&type=secureMondrianConnection&type=xmlaConnection&_=1562140167387[/code]returned response code 500 with JSON data message "text": "{"message":"String index out of range: -1","errorCode":"generic.error.message","parameters":["java.lang.StringIndexOutOfBoundsException: String index out of range: -1[/code]TIBCO JasperReports® Server log file also contained an error: ERROR GenericExceptionMapper,http-nio-8080-exec-1:69 - Unexpected error occursjava.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.charAt(String.java:658) at com.jaspersoft.jasperserver.jaxrs.poc.hypermedia.common.provider.RequestInfoProvider.getBaseUrl(RequestInfoProvider.java:57) at com.jaspersoft.jasperserver.jaxrs.poc.hypermedia.common.provider.RequestInfoProvider$$FastClassBySpringCGLIB$$6748e7a8.invoke(<generated>)..........[/code]As it turned out, customer accessed TIBCO JasperReports® Server via a proxy server and setting property deploy.base.url=https://bi.example.com/jasperserver-pro[/code]in WEB-INFjs.config.properties configuratoin file resolved the issue: Configuration for Using Proxies AS-20190814, case #01782072
  9. Issue DescriptionIn process of upgrading to TIBCO JasperReports® Server v.7.1.1, customer tried to import full repository export via UI and got "Internal Server Error" error constantly. ResolutionIn order to debug the issue, we tried to import the archive with js-import script. The script failed with error jsexception.no.principal[/code]Further export archive analyzing discovered, that there were a few users with space at the end of username. index.xml file of the export archive contained user details like <user tenant="test">user@text.com </user>[/code]When a user created manually via UI, spaces are not allowed. Although it was no determined how the users with space were created in customer's instance, but deleting such users in the repository and generating a new export file resolved the issue. AS-20190814, case #01782558
  10. Hi, try to use $P{product_id} instead of $P!{product_id} in the report query Best regards, Andrew
  11. Issue DescriptionCustomer noticed that repository table JIRepositoryCache is always empty in the latest versions of TIBCO JasperReports® Server. He is wondering what the purpose of the table is and why it has no records. ResolutionIn older versions of the product, compiled JapserReports Library resources were cached in the JIRepositoryCache table for increased efficiency at runtime. Since v.6.4.0, compiled resources are stored in memory cache (ehCache) instead of JIRepositoryCache table. That's why the table is empty. There is a configuration option to store objects in the table, if it is required for some reason: WEB-INFapplicationContext.xml config file, property <property name="isEnabledRepositoryCaching" value="false"/> If you set it to true , compiled reports will be stored in the table. Ref. Case 01767755
  12. Hi, you can use PHP REST client as a base for your project: https://github.com/Jaspersoft/jrs-rest-php-client Best regards, Andrew
  13. Issue DescriptionCustomer developed a JRXML report and published it to TIBCO JasperReports® Server. They were able to run the report, but couldn't export it to any formats as Export icon was disabled, together with other icons in toolbar - Save, Next Page, Previous Page etc How to fix it? ResolutionBrowser Development console showed error net:ERR_INCOMPLETE_CHUNKED_ENCODING error for POST request http://x.x.x.x:8080/jasperserver-pro/getReportComponents.html Detailed report JRXML file review identified multiple elements with the same UUIDs, probably due to copy-pasting of the elements. UUIDs are used by report renderer and they must be unique. In order to re-generate report's UUIDs to make sure they are unique, use Refactor > Reset UUIDs context menu of the report in TIBCO Jaspersoft studio: AS-20190506, case #01746242
  14. Use CaseUser developed a JRXML report with 2 Crosstab elements ponting to the same main dataset. Now, the user has a requirement 'to filter' the data for each Crosstab, so that Crosstab1 displays data for a specific column value, while the second Crosstab2 - for another value. Using SubDataset for the second Crosstab is not an option for the user. ResolutionA possible solution to achieve the requirement is to specify 'Increment When Expression' property for each Crosstab Dataset. The 'Increment When Expression' is a flag to determine whether to add a record to the record set that feeds the Crosstab. This expression must return a Boolean value. A blank string means to 'add all the records': Attached is a sample report based on SugarCRM database, Orders table, which demonstrates the idea The main report query returns records for all countries (shipcountry field): SELECT * FROM orders LIMIT 1000 Setting 'Increment When Expression' to value $F{shipcountry}.equals("USA")[/code]processes records with USA country only for the first Crosstab. Setting 'Increment When Expression' to value $F{shipcountry}.equals("Canada")[/code]processes records with Canada country only for the second Crosstab. Solution tested with TIBCO JasperReports® 7.1.0. AS-20190405, case #01736277 support_crosstabfilters_solution.jrxml
  15. Use CaseCustomer created an Ad Hoc Report with dual-axis chart. He would like to assign the second Ad Hoc Measure to the first Y-axis, instead of the second, by default, one. ResolutionIn TIBCO JasperReports® Server v.7.1.0 and newer version, you can set chart properties with array indices in JRXML. So if the related Ad Hoc View only has measures on the columns axis, you can directly set the yAxis properties of a series like this: <jrhc:chartSetting name="_jrs_adhoc">......</jrhc:chartSetting><jrhc:chartSetting name="default"><jrhc:chartProperty name="series[1].yAxis"><jrhc:propertyExpression><![CDATA[0]]></jrhc:propertyExpression></jrhc:chartProperty></jrhc:chartSetting>[/code] This puts the second measure/series (series[1]) on the first axis (0). The solution will not work with version of TIBCO JasperReports® Server less than 7.1.0 as property name "series[1].yAxis" will not be recoginzed AS-20190403, case #01713498
  16. Hi, Table element supports hiding columns and the rest of columns positions are automatically adjusted. Hope, it helps. Best regards, Andrew
  17. Issue DescriptionCustomer configured TIBCO JasperReports® Server to perform external authentication with LDAP server. When the LDAP server is unavailable (due to shut down or network issues), customer can't login to TIBCO JasperReports® Server even as internal users (superuser, jasperadmin) ResolutionThe applicationContext-externalAuth-LDAP-mt.xml file contains the bean ldapAuthenticationManager which lists the available authentication providers: <bean id="ldapAuthenticationManager" class="com.jaspersoft.jasperserver.api.security.externalAuth.wrappers.spring.JSProviderManager"> <property name="providers"> <list> <ref local="ldapAuthenticationProvider"/> <ref bean="${bean.daoAuthenticationProvider}"/> </list> </property> </bean>[/code]The providers in the list are invoked in the order they appear in the configuration file until one of them authenticates the user. The rest of the providers are then skipped. The final provider in the list, ${bean.daoAuthenticationProvider} authenticates against the jasperserver internal database. By default, TIBCO JasperReports® Server performs authentication against LDAP server first. If the server is unavailable, authentication process fails and users can't login even with internal accounts. In order to workaround the issue, <ref bean="${bean.daoAuthenticationProvider}"/> bean should be placed first in the list: <bean id="ldapAuthenticationManager" class="com.jaspersoft.jasperserver.api.security.externalAuth.wrappers.spring.JSProviderManager"> <property name="providers"> <list> <ref bean="${bean.daoAuthenticationProvider}"/> <ref local="ldapAuthenticationProvider"/> </list> </property> </bean>[/code]Server restart required. Solution tested with TIBCO JasperReports® Server v.7.1.0 AS-20190322
  18. Hi Santosh, please provide more details of the issue, which steps lead to the error. Also, please check if jasperserver.log has errors Best regards, Andrew
  19. Hi, please check if a solution provided in article below heps you: https://community.jaspersoft.com/wiki/windows-643-and-71-bundled-installers-crashes-upon-running-initdbexe-due-missing-msvcr100dll Best regards, Andrew
  20. Issue DescriptionAfter upgrade from TIBCO JasperReports® Server v.6.1 to TIBCO JasperReports® Server v.7.1.0, customer started encountering an issue when queryExecutor REST v2 call returns error '403 Forbidden - Access is denied'. The user has ROLE_USER assigned and has read permissions to the domain. ExplanationTIBCO JasperReports® Server v.7.1.0 uses URL access patterns from WEB-INFapplicationContext-security-pro-web.xml configuration file to determine which roles have access to specific URLs: <security:filter-security-metadata-source id="filterInvocationInterceptorPROExtention" lowercase-comparisons="true" path-type="ant" request-matcher="ant"> <security:intercept-url pattern="/adhoc/cacheadmin.html" access="ROLE_SUPERUSER" /> <security:intercept-url pattern="/adhoc/cachedetail.html" access="ROLE_SUPERUSER" /> <security:intercept-url pattern="/adhoc/querygovernorsettings.html" access="ROLE_SUPERUSER" /> <security:intercept-url pattern="/log_settings.html" access="ROLE_SUPERUSER" /> <security:intercept-url pattern="/customAttributes.html" access="ROLE_SUPERUSER" /> <security:intercept-url pattern="/adminexport.html" access="ROLE_SUPERUSER" /> <security:intercept-url pattern="/adminimport.html" access="ROLE_SUPERUSER" /> <security:intercept-url pattern="/dataviewconverter.html" access="ROLE_USER,ROLE_ADMINISTRATOR" /> <security:intercept-url pattern="/dashboard/designer.html" access="ROLE_USER,ROLE_ADMINISTRATOR" /> <security:intercept-url pattern="/dashboard/viewer.html" access="ROLE_USER,ROLE_ADMINISTRATOR" /> <security:intercept-url pattern="/dashboard/exporter.html" access="ROLE_USER,ROLE_ADMINISTRATOR,ROLE_ANONYMOUS" /> <security:intercept-url pattern="/rest_v2/reportgenerators/**" access="ROLE_USER,ROLE_ADMINISTRATOR" /> <security:intercept-url pattern="/rest_v2/domains/**" access="ROLE_USER,ROLE_ADMINISTRATOR" /> <security:intercept-url pattern="/rest_v2/queryexecutions/**" access="ROLE_USER,ROLE_ADMINISTRATOR" /> <security:intercept-url pattern="/rest_v2/export/**" access="ROLE_SUPERUSER,ROLE_ADMINISTRATOR" /> <security:intercept-url pattern="/rest_v2/import/**" access="ROLE_SUPERUSER,ROLE_ADMINISTRATOR" /> <security:intercept-url pattern="/rest_v2/hypermedia/**" access="ROLE_USER,ROLE_ADMINISTRATOR" /> <security:intercept-url pattern="/rest_v2/metadata/**" access="ROLE_USER,ROLE_ADMINISTRATOR" /> <security:intercept-url pattern="/rest_v2/dashboardExecutions/**" access="ROLE_USER,ROLE_ADMINISTRATOR" /> <security:intercept-url pattern="/rest_v2/diagnostic/**" access="ROLE_SUPERUSER" /> </security:filter-security-metadata-source>[/code]For some reason, in v.7.1.0 pattern to allow ROLE_USER users access to call queryExecutor has been removed: <security:intercept-url pattern="/rest_v2/queryexecutor/**" access="ROLE_USER,ROLE_ADMINISTRATOR" />[/code]In order to make REST API work as in v.6.1, the pattern should be manually added to the config file. Server restart required. AS-20190320, case #01639277
  21. Issue DescriptionUser created an Ad Hoc Table View with a group and 'Details and Totals' option: Then, an Ad Hoc Report was created from that view. Customer noticed if he applies JIVE filter to a column, group Totals values are not changed accordingly: ExplanationAs of TIBCO JasperReports® Server v.7.1.0, the ad hoc report works as designed. Group Totals are not reflected by JIVE filter changes. There is an enhancement request to modify Totals calculations if JIVE filter applied, internal #JS-31570 AS-20190319, case #01711151
  22. Hi, most probably the error caused the report SQLs. JasperReports Server validates report queries to protect against SQL injection: https://community.jaspersoft.com/documentation/tibco-jasperreports-server-security-guide/v71/protecting-against-sql-injection SQL must meet requirements described in the doc. To test is the query triggers the errror, you can temporary disable SQL validation and try to run the report. Hope, it helps. Best regards, Andrew
  23. Use CaseCustomer has a requirement to allow dashboards creation / save for a specific custom role and ROLE_ADMINISTRATOR only. ROLE_USER users should not have permissions for the functionality. ResolutionIn order to restrict access to Dashboard designer, the custom role should be specified in applicationContext-security-pro-web.xml config file, filterInvocationInterceptorPROExtention security filter, /dashboard/designer.html pattern. There is a Spring Security requirement that role name should start with ROLE_ prefix. ROLE_USER role should be removed form the pattern. Change <security:intercept-url pattern="/dashboard/designer.html" access="ROLE_USER,ROLE_ADMINISTRATOR" />[/code]to <security:intercept-url pattern="/dashboard/designer.html" access="ROLE_DASHBOARD,ROLE_ADMINISTRATOR" />[/code]If the cusotm role defined at organization level, it should be specified as <ROLE_NAME>|<organization_id>: <security:intercept-url pattern="/dashboard/designer.html" access="ROLE_DASHBOARD|organization_1,ROLE_ADMINISTRATOR" />[/code]Server restart required. As a result, if one tries to create a dashboard under a user with ROLE_USER role only, he gets 'You do not have permission to view this page.' message. But a user with ROLE_DASHBOARD role can create and save dashboards. Solution tested with TIBCO JasperReports® Server v.7.1.0 AS-20190318, case #01711125
  24. Issue DescriptionBuilding TIBCO JasperReports® Server v.7.1.0 from source code fails with error [ERROR] COMPILATION ERROR : [ERROR] SourcesJR-Server-7.1.0-srcjasperserver-prodataratorsrcmainjavacomjaspersoftcommonsgroovyGroovySourceCacher.java:[56,61] error: cannot find symbol [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project ji-datarator: Compilation failure at js-ant build-pro script execution [toc]ResolutionAs stated in TIBCO JasperReports® Server Source Build Guide, the server must be compiled under Java 1.8 If there are multiple versions of JDK installed in the PC, for example Java 1.7 and Java 1.8, it is possible that JAVA_HOME enviroment variable, which is used by Apache Maven, points to JDK 1.7 while PATH variable set to JDK 1.8. As a result, javac -version script returns 1.8 version which leads to confusion: JAVA_HOME variable must be set to JDK 1.8 as well. AS-20190311
  25. Use CaseCustomer enabled Audit and Monitoring feature on a high-load production system and would like to monitor size of PostgreSQL files which store audit data, to avoid lack of disk space. ResolutionThere are different ways to get data file size which stores Audit data. 1. Use a query with one of PostgreSQL database object management functions: https://www.postgresql.org/docs/current/functions-admin.html#FUNCTIONS-ADMIN-DBSIZE TIBCO JasperReports® Server stores audit data in the following tables: jiauditevent jiauditeventarchive jiauditeventproperty jiauditeventpropertyarchive The SQL below returns size information for audit tables, including size of tables, indexes and TOAST , in both raw bytes and 'pretyy' form: SELECT *, pg_size_pretty(total_bytes) AS total , pg_size_pretty(index_bytes) AS INDEX , pg_size_pretty(toast_bytes) AS toast , pg_size_pretty(table_bytes) AS TABLE FROM ( SELECT *, total_bytes-index_bytes-COALESCE(toast_bytes,0) AS table_bytes FROM ( SELECT c.oid,nspname AS table_schema, relname AS TABLE_NAME , pg_total_relation_size(c.oid) AS total_bytes , pg_indexes_size(c.oid) AS index_bytes , pg_total_relation_size(reltoastrelid) AS toast_bytes FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE relkind = 'r' ) a where table_name in ('jiauditevent', 'jiauditeventarchive','jiauditeventproperty','jiauditeventpropertyarchive') ) a; 2. If customer prefer monitoring file size at OS level, he can rertieve information which file stores a table data using a database object location function: https://www.postgresql.org/docs/current/functions-admin.html#FUNCTIONS-ADMIN-DBLOCATION Function pg_relation_filepath() returns the entire file path name (relative to the database 'data' directory) of a table: SELECT pg_relation_filepath('jiauditevent'); Once files that store a table data idenitified, their size can be monitored with a command line script. Solution tested with TIBCO JasperReports® Server v.7.1.0 AS-20190503, case #01685820
×
×
  • Create New...