SQL-Hero FAQ

Submit a question

Click on each question to see the answer for that topic.

Installation

Q: How do I upgrade SQL-Hero® after it's been installed?

There are two main options: using automatic updates or running a manual update.

Automatic updates can be configured during installation and also from the Settings tab:

Manual updates can be done by running the SQL-Hero install program and selecting the Update / Repair option as in:

Note that updating server-side components can only be done using the manual approach.

Configuration / Customization

Q: Is it possible to use TCP binding with SQL-Hero services?

Yes, if you are using IIS 7. This can give a performance boost and is as easy as referencing your SQL-Hero application server using the format "net.tcp://servername:portnumber" (on the Settings tab/window). You can also do this using the SQLHeroProfiles.xml file, located in your SQLHero program directory. The port number corresponds to what your web site's net.tcp binding is set to (see point #1 below).

If you encounter problems, check for the following things:

  1. Ensure at the web site level (on your SQL-Hero application server) there is a binding specified for 'net.tcp', including a port number in the form 'portnumber:*'.

  2. Establish support for net.tcp binding for the SQLHeroServerServices web application.

  3. Ensure the Net.Tcp Listener Adapter Windows service on the SQL-Hero application server is running.

Q: Why does SQL-Hero slow down Visual Studio start-up? Are there options to make it faster?

On start-up, SQL-Hero integration checks to see if you have any pending notifications and in doing so, needs to establish communications with the SQL-Hero application server. This initialization takes some time but is segmented in such a way that if you don't want to have the SQL Editor open by default, for example, extra time to do that can be saved. You can also do certain things like load projects while SQL-Hero is initializing. Often times, slowness is a problem when you have SQL-Hero on a laptop and are moving to different locations, using VPN's, etc. You can establish different profiles that point at different SQL-Hero application servers - or no application server, to avoid some overhead. To do this, you create or modify the SQLHeroProfiles.xml file located in your SQL-Hero program directory. The following example of SQLHeroProfiles.xml allows you to have two profiles - one for when you're connected to a network that has access to the SQL-Hero application server 'bluerobin' and another for when you wish to work completely off-line (and using the desktop version only).

<Profiles> <Profile server="http://bluerobin">Connected</Profile> <Profile server="">No Server</Profile> </Profiles>

Additionally, you can completely disable SQL-Hero's Visual Studio integration using the disablevisualstudio attribute in the SQLHeroProfiles.xml file, as in:

<Profiles> <Profile disablevisualstudio="true" server="http://bluerobin">No Visual Studio</Profile> </Profiles>

Optionally the target attribute can be used to tie a profile to either "standalone" or "visualstudio". (If this attribute is missing, it will target both.)

Q: How can I change "new object" templates that come with SQL-Hero?

In your SQL-Hero directory (typically C:\Program Files\SQLHero), there is a Templates subdirectory. Templates are .xml files that can be edited using any text editor. Standard "new object" templates have file names that start with "Template_XX_CR_", where XX reflects the default database type (SQL 2000, 2005 and 2008) and CR represents "Create". The next characters in the name represent the object type (e.g. "P" for stored procedure). If you are using the SQL-Hero application server, changing the templates on the server will automatically propagate to all developers.

Q: How can I change user-defined property defaults, as expressed in out-of-the-box SQL-Hero templates?

The <!DEFINE_UDP/> tag is found in standard templates, located in the Templates subdirectory under the location where SQL-Hero is installed. Changing the default values in these tags will cause the central repository to be updated the next time the template that contains them is invoked.

Troubleshooting

Q: On start-up, I seem to be encountering problems - is there something I can do?

There is a "safe mode" option you can try. Hold down your left Shift key while SQL-Hero start (either under Visual Studio or the standalone executable version). A more extensive safe mode can be achieved by holding both left Shift and Control (under Visual Studio, this completely disables SQL-Hero integration and is an alternative to using the disablevisualstudio attribute, described elsewhere.

I've reinstalled the program and have lost my list of local connections. Is there a way to recover them?

As an optional feature, whenever SQL-Hero exits, it can update a file called Connections.LastGood.dbconn with all of your local connections, plus global ones that use Windows authentication. This is disabled by default, as a security measure. To enable this, go into the SQLHeroConfig.xml file located in its program file directory and add the following element, underneath the ROOT element:

<SaveLastGood>True</SaveLastGood>

Q: Are errors collected anywhere that can be reviewed?

Yes, a file called SHExceptions.log is created in your Application Data folder for all reportable errors and some handled errors, as well. Because of that you can sometimes use this file to track down specifics as to why you're receiving a particular error message in cases where it's not clear.

Technical

Q: What's the difference between Null Run and Test Run user-defined properties?

NullRunParameters are used to arrive at the result set columns for stored procedures. You should pick input values that are known to produce results. Side-effects are okay, since the call is wrapped in a transaction that is rolled back. Null run parameters are not database specific and therefore will apply across different regions such as development, staging and production. TestRunParameters are used specifically for unit testing. The actual data returned in the result set is often important for verifying expected results and as such, this user-defined property is database specific. The options generally exists in testing to exercise either or both of these types of calls: the reason for Test Run parameters is obvious, but for Null Run, we want to be sure that continues to work, given that it can potentially use a different code path to arrive at its results.

Q: Can I backup my list of connections? (Or share them, without publishing them globally.)?

The answer is "yes" to both questions. You can explicitly export local connections from the connection grid to a file using the Export toolbar option. You can later import from file to the connection grid using the Import toolbar option. Global connections are stored in the central repository. Note the security implications of this: credentials are saved in the export file in plaintext.