luanto
Posts: 9
Joined: Mon Jan 17, 2022 5:45 am

Postgres - Database script inline is not executed

Hi guys,

In Prerequisites section, I setup to install PosgreSQL from a file in disk, it installs successfully. However, in the SQL Databases section, I cannot configure to execute the inline script to create some tables or database in Postgres server.
Note that I used the Predefined Connection. Not sure what is wrong in my configuration.
My expectation is after Postgres installed, the script should be executed to create database and tables in there. But the fact is after installed Posgres, I use pgAdmin to check and there is only a default database without any tables that I want to create.
Please check the attachment for the configuration screenshots.
Attachments
Capture2.PNG
Capture2.PNG (42.3 KiB) Viewed 7890 times
Capture1.PNG
Capture1.PNG (31.71 KiB) Viewed 7890 times
Catalin
Posts: 7492
Joined: Wed Jun 13, 2018 7:49 am

Re: Postgres - Database script inline is not executed

Hello,

First of all, could you please let me know how you have added the prerequisite? Is it as feature-based, or perhaps post-install?

For example, if it was added as post-install, then perhaps the script tries to execute before the actual installation - this, however, should raise an error during the installation.

Other reason for this would be the incorrect connection. For instance, please make sure that the username and password are actually correct and that there is a database named postgres there. Also, the port number and the ODBC being 64-bit.

In your case, it looks like the installation of the prerequisite succeeds, which makes me think that the issue would be the connection.

Could you please try creating a verbose log (under "Create a log" section) and forward that to me?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
luanto
Posts: 9
Joined: Mon Jan 17, 2022 5:45 am

Re: Postgres - Database script inline is not executed

Hi Catalin,

In Prerequisite section, I choose "New Package Prerequisite" and configured the path to the PostgreSQL installation file. I can confirm that the PostgreSQL is installed successfully with the "posgres" username and password I defined.

In the SQL Database section, I tried many types (Predefine Connection and Custom Connection), many connection strings but they seem not to execute the script.

How can I send the log to you? (Sorry cannot attach the log here because it contains sensitive information of my product)

Thanks
Catalin
Posts: 7492
Joined: Wed Jun 13, 2018 7:49 am

Re: Postgres - Database script inline is not executed

Hello,

Please send the log and a copy of your AIP file (Advanced Installer project) at support at advancedinstaller dot com so I can investigate them.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
luanto
Posts: 9
Joined: Mon Jan 17, 2022 5:45 am

Re: Postgres - Database script inline is not executed

Hi Catalin,

I sent the log to that email. Please double check.

Thanks!
Catalin
Posts: 7492
Joined: Wed Jun 13, 2018 7:49 am

Re: Postgres - Database script inline is not executed

Hello,

Thank you for the provided resources!

I can confirm that I received them.

Once the investigation will be over, I will reply to your email thread.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”