> Source: [sk170313](https://support.checkpoint.com/results/sk/sk170313)

# sk170313 - Advanced upgrade from R80.10 to R80.40 Jumbo Hotfix Take 83/87/89 fails

| Property | Value |
|----------|-------|
| Solution ID | sk170313 |
| Date Created | 2020-11-02 |
| Last Modified | 2021-01-07 |
| Technical Level | General |
| Products | Security Management Server |
| Versions | R82.10, R82, R81.20 |

## Symptoms

- * Advanced upgrade from R80.10 to R80.40 Jumbo Hotfix Take 83/87 fails.

* `$MDS_TEMPLATE/log/cpm.elg` shows the following exception:  
  ` CpmGeneralException{base='com.checkpoint.management.is.exceptions.CpmGeneralException: Couldn't connect to database', errorCode='CP_ERR_DATABASE_CONNECTION', errorFamily='null', `  
  `messageForUser='null', message='Couldn't connect to database'}`  
  `
  at `  
  `com.checkpoint.management.object_store.DatabaseOperationsHelperBean.executeCommand(DatabaseOperationsHelperBean.java:35)`  
  `
  at `  
  `com.checkpoint.management.object_store.DatabaseOperationsHelperBean.runDbScript(DatabaseOperationsHelperBean.java:32)`  
  `
  at `  
  `com.checkpoint.management.cpm.commands.SchemaChangesCommand.runSqlChanges(SchemaChangesCommand.java:245)`  
  `
  at `  
  `com.checkpoint.management.cpm.commands.SchemaChangesCommand.run(SchemaChangesCommand.java:84)
  at com.checkpoint.management.cpm.Cpm.main(Cpm.java:204)`  
  `
  Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "RETURN"`

## Cause

Bad syntax of a schema change fails the upgrade.

<br />

## Solution

This problem was fixed. The fix is included in:

* [Jumbo Hotfix Accumulator for R80.40](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk165456) starting from Take 91

If you choose not to upgrade, Check Point can supply a **Hotfix** . [Contact Check Point Support](https://www.checkpoint.com/support-services/contact-support/) to get a Hotfix for this issue.  
A Support Engineer will make sure the Hotfix is compatible with your environment before providing the Hotfix.  
For faster resolution and verification, please collect [CPinfo files](http://supportcontent.checkpoint.com/solutions?id=sk92739) from the Security Management Server and Security Gateways involved in the case.

**Hotfix installation instructions:**   
Refer to [sk168597 - How to install a Hotfix](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk168597).

<br />

---

# Agent Instructions

This content is from the Check Point Support Center (https://support.checkpoint.com), the official knowledge base for Check Point cybersecurity products.

## Navigating This Knowledge Base

- **Complete index**: [llms.txt](https://support.checkpoint.com/llms.txt)
- **All SK articles**: [SecureKnowledge Sitemap](https://support.checkpoint.com/sitemaps/secureknowledge-sitemap-index.xml)
- **SK article URL pattern**: `https://support.checkpoint.com/results/sk/{skId}`
- **Markdown responses**: AI bot User-Agents automatically receive `text/markdown` content
