cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Waterdog66
Level 3

SQL Service Broker Install

I am authoring a set of InstallScript based installers for installing and configuring Service Broker for SQL Server.

One of the remaining Items I need to figure out how to do is to run query on a SQL Instance after a SQL Install Script has run, and get the results back into InstallScipt so that I can modify a set of SQL Scripts.

Here are the steps to complete:

1). Install Service Broker on SQL Instance One (Using an Install SQL Script)
2). Query the GUID from Service Broker on Instance One
3). Install Service Broker on SQL Instance Two
4). Query the GUID from the Service Broker on Instance Two
5). Create a Route on SQL Instance One with GUID from SQL Instance Two
6). Create a Route on SQL Instance Two with a GUID from SQL Instance One

Is there native support in InstallScript for getting the results of a SQL Query back into InstallScript?
Labels (1)
0 Kudos
(1) Reply
hidenori
Level 17

Unfortunately, the built-in SQL Scripts functionality does not has the ability that allows you to handle SQL query results outside SQL scripts. In order to accomplish your requirements, you need to write your own code that will manage database connections and run your SQL scripts. There are several sample codes posted in this community forum:

http://community.flexerasoftware.com/showpost.php?p=288448&postcount=17
http://community.flexerasoftware.com/showpost.php?p=266290&postcount=2

Hope that helps.
0 Kudos