Running SQL script in Patch

Having trouble running Advanced Installer? Got a bug to report? Post it all here.

Running SQL script in Patch

Postby psaunders » Tue Dec 14, 2010 5:10 pm

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 68 times
iAssist 0.9.11.1.aip
(242 KiB) Downloaded 52 times
iAssist 0.9.10.0.aip
(239.31 KiB) Downloaded 59 times
psaunders
 
Posts: 30
Joined: Fri Oct 29, 2010 3:08 pm

Re: Running SQL script in Patch

Postby mihai.petcu » Wed Dec 15, 2010 10:35 am

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
http://www.advancedinstaller.com/
mihai.petcu
 
Posts: 3452
Joined: Thu Aug 05, 2010 8:01 am

Re: Running SQL script in Patch

Postby psaunders » Wed Dec 15, 2010 10:41 am

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
psaunders
 
Posts: 30
Joined: Fri Oct 29, 2010 3:08 pm

Re: Running SQL script in Patch

Postby mihai.petcu » Wed Dec 15, 2010 11:04 am

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
http://www.advancedinstaller.com/
mihai.petcu
 
Posts: 3452
Joined: Thu Aug 05, 2010 8:01 am

Re: Running SQL script in Patch

Postby psaunders » Wed Dec 15, 2010 12:34 pm

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 79 times
psaunders
 
Posts: 30
Joined: Fri Oct 29, 2010 3:08 pm

Re: Running SQL script in Patch

Postby Bogdan » Wed Dec 15, 2010 3:42 pm

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
http://www.advancedinstaller.com/
Bogdan
 
Posts: 2398
Joined: Tue Jul 07, 2009 7:34 am

Re: Running SQL script in Patch

Postby psaunders » Wed Dec 15, 2010 3:46 pm

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

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

Re: Running SQL script in Patch

Postby Bogdan » Wed Dec 15, 2010 3:49 pm

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
http://www.advancedinstaller.com/
Bogdan
 
Posts: 2398
Joined: Tue Jul 07, 2009 7:34 am

Re: Running SQL script in Patch

Postby psaunders » Wed Dec 15, 2010 4:06 pm

Thanks

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

Re: Running SQL script in Patch

Postby psaunders » Thu Dec 16, 2010 12:18 pm

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

Postby psaunders » Fri Dec 17, 2010 3:34 pm

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
psaunders
 
Posts: 30
Joined: Fri Oct 29, 2010 3:08 pm

Re: Running SQL script in Patch

Postby udayk » Fri Feb 24, 2012 4:35 pm

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.
udayk
 
Posts: 126
Joined: Thu Jan 19, 2012 12:30 pm


Return to Common Problems

Who is online

Users browsing this forum: Bing [Bot], JLavalley and 3 guests