1

I can't seem to figure out how to execute a sql statement like for example truncate table against a postgresql db using SSIS. I am able to connect to the postgresql db from SSIS just fine.

1
  • What have you tried? Have you tried execute SQL Task? If you have, please post the error / behaviour that you see. Commented Feb 10, 2017 at 8:39

2 Answers 2

2

Just adding Toolbox Execute SQL Task, then edit Toolbox and in tab General fill in the following fields:

  • Connection Type: OLE DB

  • Connection: choose your postgresql connection

  • SQLStatement: insert your query

    That's all. I hope this help you.

Sign up to request clarification or add additional context in comments.

1 Comment

One note on this answer, there is a pay-for OLEDB provider for postgres, but the out-of-the-box provider is ODBC. If you are using ODBC, it would be an ADO.NET connection type for the sql task
1

Use Execute SQL Task and create an ADO.NET Connection instead of ODBC or OLE DB and create a connection for your PostgreSQL.

enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.