run SQL script - 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!

jrahma
Posts: 51
Joined: Wed Jan 07, 2009 11:56 am

run SQL script

I am creating a package which I need it to run SQL Server package in a specefic instance..

How can I do that?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: run SQL script

Hi,

You can try adding SQL Server as a prerequisite to your package. Please note that Advanced Installer has predefined prerequisites for SQL Server. For the prerequisite you set a custom command line which sets the instance.

You can find more details about SQL Server installation with a custom command line here:
http://msdn.microsoft.com/en-us/library/ms144259.aspx

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jrahma
Posts: 51
Joined: Wed Jan 07, 2009 11:56 am

Re: run SQL script

but how can I attach the .sql files contains the codes to use it later in the command line script?

Should I include in the EXE package or it should be separated?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: run SQL script

Hi,

I'm not sure I understand what you mean. Installing SQL server with a specific instance can be done through its package command line. If you want to run SQL scripts during the installation you can use the "SQL Scripts" page in an Enterprise project. Please note that the User Guide contains a SQL Scripts tutorial which may help you.

Basically, the prerequisite installs SQL Server by using the SQL Server installer from Microsoft. After that, the package can run the SQL scripts you need.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”