Category Archives: Uncategorized

Running a plethora of T-SQL

Have you ever needed to run a bunch of scripts, over and over and over? And the SSMS tabs – it can be a mess. This is mind-numbing work – call in the computers. Check out this script I forked from GitHub and modified: https://github.com/propellor/Powershell-pasen/blob/master/Run-Sql.ps1

You point the script it at a folder of scripts and it will fire them off using invoke-sqlcmd. You can use it in a sort-of debugging mode, to get those scripts all working when you get a mess from a co-worker or vendor and have it pick up rerunning from the failed script. Alternatively, if someone else is responsible for the fixin’ and you are just the runner, you can have all the failed scripts rename themselves to .failure.

Also, my first GitHub fork.

UPDATE: Since doing this, I’ve started using RoundhousE, which does the same thing, but waaaay better. Using TFS and octopus deploy, we package up roundhouse with some sql scripts and let developers deploy database scripts to staging and then production.

Enabling Network Trace in Reporting Services


I’m trying to set up reporting services 2005 to use ssl with a 2008 instance also on the same machine also using ssl.  I’m trying to use the simple method of changing the ssl port of the 2005 site.  The website’s ssl certificate seems valid when I go to the /Reports directory, but a call is going bad somewhere inside.

The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

I was directed to activate network tracing for the .net application as outlined here:

 http://msdn.microsoft.com/en-us/library/a6sbz1dx.aspx

After figuring out what version of .net the application is using, which can be found in the IIS settings for the site, activating was as simple as moving the proper xml into my web.config file for the SSRS web application.

I also added this code to direct the trace output:







Now I’m seeing  the network.log file in the reportmanager directory.  I also see some calls happening to the webservice which don’t include the 444 port number which would be necessary to make the ssl connection.

HTTP 404 Not Found with Reporting Services and Windows 7 (Server 2008)

IIS reserves port 80. SQL 2008 reporting services is now using it’s own ‘web server’ – HTTP.sys.  In reporting services configuration manager change the Report Manager URL advanced settings.  In the ‘Multiple Identities for Report Manager’, edit the entry and change the TCP Port to not be 80.  Common alternates are 8080 or 8000.
http://technet.microsoft.com/en-us/library/bb630449.aspx