Skip to main content
Announcements
UPGRADE ADVISORY for Qlik Replicate 2024.5: Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
nithin_seeni
Contributor II
Contributor II

Failed (retcode -1) to execute statement 'use database"xxx"'

While creating a target endpoint for Snowflake and connecting to the database in Snowflake facing the error "Failed (retcode -1) to execute statement 'use database"xxx"' "

Labels (1)
2 Solutions

Accepted Solutions
john_wang
Support
Support

Hello @nithin_seeni ,

Welcome to Qlik Community forum and thanks for reaching out here!

Looks to me this is a permission issue, or if the database/schema is accessible. Would you please connect to Snowflake by the same account  and execute below SQL:

use database "XXX";

To see if you get the same error.

BTW, there is another discussion: Snowflake End point error in QLIK replicate.

Hope this helps.

John.

 

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!

View solution in original post

sureshkumar
Support
Support

Hello @nithin_seeni 

Additional information on what John was added.

Required permissions

The required permissions differ according to whether or not the schema and/or the target tables already existed before the Replicate task started.

Please check permissions as mentioned in the user guide

Tables created by Replicate

  • USAGE ON DATABASE
  • CREATE SCHEMA ON DATABASE
  • USAGE ON DATABASE
  • USAGE ON SCHEMA
  • CREATE FILE FORMAT ON SCHEMA
  • CREATE STAGE ON SCHEMA
  • CREATE TABLE ON SCHEMA

Required permissions #Required permissions | Qlik Replicate Help

 

Regards,

Suresh

View solution in original post

4 Replies
john_wang
Support
Support

Hello @nithin_seeni ,

Welcome to Qlik Community forum and thanks for reaching out here!

Looks to me this is a permission issue, or if the database/schema is accessible. Would you please connect to Snowflake by the same account  and execute below SQL:

use database "XXX";

To see if you get the same error.

BTW, there is another discussion: Snowflake End point error in QLIK replicate.

Hope this helps.

John.

 

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
sureshkumar
Support
Support

Hello @nithin_seeni 

Additional information on what John was added.

Required permissions

The required permissions differ according to whether or not the schema and/or the target tables already existed before the Replicate task started.

Please check permissions as mentioned in the user guide

Tables created by Replicate

  • USAGE ON DATABASE
  • CREATE SCHEMA ON DATABASE
  • USAGE ON DATABASE
  • USAGE ON SCHEMA
  • CREATE FILE FORMAT ON SCHEMA
  • CREATE STAGE ON SCHEMA
  • CREATE TABLE ON SCHEMA

Required permissions #Required permissions | Qlik Replicate Help

 

Regards,

Suresh

nithin_seeni
Contributor II
Contributor II
Author

After adding the default role at the snowflake end to the account issue is fixed. 

john_wang
Support
Support

Thank you so much for the update @nithin_seeni .

 

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!