Running SQL script in Patch - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

psaunders
Posts: 30
Joined: Fri Oct 29, 2010 3:08 pm

Running SQL script in Patch

Hi,

I have created a Patch which from a version which has a new SQL file attached to it, however, upon running the patch the SQL Scripts did not run but the file updates did.

Any reason why? aips are attached

Thanks
Rudy
Attachments
Patch.aip
(1.88 KiB) Downloaded 674 times
iAssist 0.9.11.1.aip
(242 KiB) Downloaded 594 times
iAssist 0.9.10.0.aip
(239.31 KiB) Downloaded 688 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Running SQL script in Patch

Hi Rudy,

Please try to set :

Code: Select all

PATCH
as your script condition for both your SQL scripts. This is a property which is set only when a patch runs.

Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
psaunders
Posts: 30
Joined: Fri Oct 29, 2010 3:08 pm

Re: Running SQL script in Patch

Thanks for the reply mihai.petcu, i also want it to run on install.

The current condition is "1", should i set it to "(INSTALL) OR (PATCH)" or "(1) OR (PATCH)"

Thanks
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Running SQL script in Patch

Hi Rudy,

Actually you need to set the script condition to:

Code: Select all

(NOT Installed) OR PATCH
"NOT Installed" will make the script to run when the package is installed, not when the package is removed or repaired.

Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
psaunders
Posts: 30
Joined: Fri Oct 29, 2010 3:08 pm

Re: Running SQL script in Patch

Hi,

I did that but it still didnt run. Attached is the .aip

Thanks
Rudy
Attachments
iAssist 0.9.11.1.aip
(242.04 KiB) Downloaded 683 times
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Running SQL script in Patch

Hi,

Can you please create a verbose log while installing the patch and send it to support at advancedinstaller dot com so we can investigate it?

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
psaunders
Posts: 30
Joined: Fri Oct 29, 2010 3:08 pm

Re: Running SQL script in Patch

Will do, but can you tell me how to do it please

Thanks
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Running SQL script in Patch

Hi,

In my previous post I placed a link towards an article that explains how to create a verbose log, I will post it again:
http://www.advancedinstaller.com/user-guide/qa-log.html

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
psaunders
Posts: 30
Joined: Fri Oct 29, 2010 3:08 pm

Re: Running SQL script in Patch

Thanks

Here it is
Attachments
patch.zip
(136.25 KiB) Downloaded 613 times
psaunders
Posts: 30
Joined: Fri Oct 29, 2010 3:08 pm

Re: Running SQL script in Patch

Hi,

Any luck with the patch log?

Thanks
Rudy
psaunders
Posts: 30
Joined: Fri Oct 29, 2010 3:08 pm

Re: Running SQL script in Patch

Hi,

I was speaking with support over email and managed to fix it with their help. I did the following.

I changed all of my custom actions, which started and stopped the services, to 'deffered with no impersonation'. I also set the execute condition to include 'PATCH'. The scripts were also set to 'modify/repair' as the patch is seen a modifing the application.

If anyone needs a hand just ask and i will let you know

Thanks all
Rudy
udayk
Posts: 126
Joined: Thu Jan 19, 2012 12:30 pm

Re: Running SQL script in Patch

Hi Rudy and Mihai,

I followed steps as Rudy said,

I changed all of my custom actions, which started and stopped the services, to 'deffered with no impersonation'. I also set the execute condition to include 'PATCH'. The scripts were also set to 'modify/repair' as the patch is seen a modifing the application.

In my script i want to create new database using the patch script,but i get ODBC Connect : timeout exceeded exception,

Can you please tell me any alternative, regarding this script running through patch.

Thank you,
Uday.

Return to “Common Problems”