Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
djakubiak
Contributor II
Contributor II

Error Restoring the repository database

Hello,

When I restore the backup of repository database on a clean server, I have this message :

pg_restore: error : could not execute query: ERROR: "the “public” schema already exists"

The command was : CREATE SCHEMA public;

What coud I do to continue the restore ?

Best Regards

Labels (1)
2 Solutions

Accepted Solutions
djakubiak
Contributor II
Contributor II
Author

Hello Albert,

In addition, I had to change the owner of the QSR database with pgAdmin and put qliksenserepository.

Best Regards.

David

View solution in original post

10 Replies
djakubiak
Contributor II
Contributor II
Author

Hi Allan,

Yes, I follow this article.

The only solution that I found is to delete the "public" schema with pgAdmin.

I don't know if it's the right solution but the service "Qlik Sense Repository Service" don't running after.

I have these messages in Windows Event Viewer :

"The description for Event ID 300 in the Qlik Sense Service Dispatcher source could not be found. Either the component that triggered this event is not installed on the local computer or the installation is corrupted. You can install or repair the component on the local computer."

And

ERROR: relationship '_locktable' does not exist at character 18

INSTRUCTION : DELETE FROM _locktable WHERE name = $1 AND node = $2 AND inactive = 'false'

"ERROR: relationship '_locktable' does not exist at character 32

INSTRUCTION : SELECT COUNT(id) FROM _locktable
WHERE name = $1 AND inactive = 'true'
"

Best regards.

David

 

Albert_Candelario

Hello @djakubiak ,

Wouldn't be better to drop all the database and start the restoring process from scratch?

Cheers,

Albert

Please, remember to mark the thread as solved once getting the correct answer
djakubiak
Contributor II
Contributor II
Author

Hi Albert,

I execute the drop command before and I have the same error...

Best Regards.

David

Albert_Candelario

Hello @djakubiak ,

The original error or the latest one that you posted?

Cheers,

Albert

Please, remember to mark the thread as solved once getting the correct answer
djakubiak
Contributor II
Contributor II
Author

Excuse me,

When restoring the QSR_backup.tar, I have this message :

pg_restore: error : could not execute query: ERROR: "the “public” schema already exists"
The command was : CREATE SCHEMA public;

-> Dropping the database not solve this error -> I must drop the schema with pgAdmin

When I run "Repository.exe -bootstrap -standalone -restorehostname" :

[ERROR] Fatal exception during bootstrap: Inactive lock existance check for database 'QSR' failed: ERROR: 42P01: the relation « _locktable » not exist

Best Regards

David

djakubiak
Contributor II
Contributor II
Author

Hi Allan,

The script is executed correctly but the error is the same.

pg_restore: during PROCESSING TOC:
pg_restore: of TOC entry 3; 2615 2200 SCHEMA public postgres
pg_restore: error: could not execute query: ERROR: schema "public" already exists
The command was: CREATE SCHEMA public;

Best Regards

David

Albert_Candelario

Hello @djakubiak ,

We saw @Alan_Slaughter  response was accepted as solution, did it work at the end?

Cheers,

Albert

Please, remember to mark the thread as solved once getting the correct answer