Setting transaction isolation level from TeamCity Runner

AlexMBanksAlexMBanks Posts: 15 Bronze 2
edited February 19, 2016 9:19AM in SQL CI 2
We are using sqlCI with the supplied TeamCity runner and I can't figure out how to set the transaction isolation level to "READ COMMITTED".

One of our databases is using a linked server, so without the transaction isolation level switch the BUILD phase of SQL CI fails. I'm trying to add the extra SQL Compare flag in the "Additional parameters:" but no matter what I've tried it seems to fail due to the space in the value.

The command being run, from the logs, looks like this:
<pathTo>sqlCI.exe build /temporaryDatabaseServer=<server> /temporaryDatabaseName=<db name> /scriptsFolder=<folder> /packageId=<packagename> /packageVersion=<packagenumber> "/additionalCompareArgs=/TIL:"READ COMMITTED""

And I get messages similar to
'Parsing commandline options failed with error: COMMITTED is not a valid command line option'

It looks like it's breaking on the space but I can't find any way to encode the space properly for this to work. I've tried every combination of single quotes, double quotes and escape characters (slashes and backticks, for Powershell) I could think of.

The syntax and examples don't offer any help in this case. Hopefully this is something simple that I'm overlooking, but if this is a bug then I can't use SQL CI for our builds.

Comments

  • Hi,

    I think the problem is being caused by the two pairs of quotes. Escaping the pair around READ COMMITTED with a backslash should fix the problem. Enter the following in the textbox in the buld runner -
    /TIL:"READ COMMITTED"
    
    Does that help?
    Software Engineer
    Redgate Software
  • Hi,

    I think the problem is being caused by the two pairs of quotes. Escaping the pair around READ COMMITTED with a backslash should fix the problem. Enter the following in the textbox in the buld runner -
    /TIL:"READ COMMITTED"
    
    Does that help?

    Hi Rob,

    yes, that worked, thank you. I could have sworn I'd tried that - perhaps I had only tried forward slashes. The Curse of the Friday Afternoon Brain strikes again, I suppose!
Sign In or Register to comment.