Some notes on software development... RSS 2.0
# Wednesday, 26 November 2014

Quick code snippet for SQL Server batch deletion:

-- Delete in batches of 5000 DECLARE @rowcount INT = 1, @batchsize INT = 5000 WHILE (@rowcount != 0) BEGIN DELETE TOP (@batchsize) SomeBigTable SELECT @rowcount = @@ROWCOUNT END

There is an excellent article over at sqlperformance.com using different chunking techniques with performance metrics:

http://sqlperformance.com/2013/03/io-subsystem/chunk-deletes

Wednesday, 26 November 2014 10:56:31 (GMT Standard Time, UTC+00:00)  #    -
SQL Server

Before using JavaScript’s RegExp object you may need to escape regular expression characters. These characters are: ( ) [ { * + . $ ^ \ | ?

I’m no RegEx expert but the code I found that works for me is:

text.replace(/([()[{*+.$^\\|?])/g, '\\$1');

 

Thanks once again StackOverflow :-)

Links
http://stackoverflow.com/questions/5663987/how-to-properly-escape-characters-in-regexp

Wednesday, 26 November 2014 10:47:48 (GMT Standard Time, UTC+00:00)  #    -
JavaScript | Regular Expressions
# Wednesday, 04 June 2014

Multiple desktop sessions for the same user is disabled by default on Windows Server 2008R2. To enable multiple sessions for the same user:

  1. Go to Administrative Tools->Remote Desktop Services->Remote Desktop Session Host Configuration
  2. Select properties on the ‘Restrict each user to a single session’ general setting.
  3. Un-check the ‘Restrict each user to a single session’ checkbox.

image

After saving all further new remote desktop sessions will be new unless ‘console mode’ RDP is used.

 

Links
http://www.serverintellect.com/support/windowsserver/2k8-ts-sess/

Wednesday, 04 June 2014 14:32:14 (GMT Standard Time, UTC+00:00)  #    -
Remote Desktop | Windows
# Thursday, 22 May 2014

When using Microsoft.Sdc.Common.tasks with MSBuild you may get a naming clash when using the Delete task. You receive the following: error MSB4062: The "Microsoft.Sdc.Tasks.BizTalk2004.Host.Delete" task could not be loaded from the assembly.

To resolve this you should remove the BizTalk XML elements from the Microsoft.Sdc.Common.tasks file being used:

image

Thursday, 22 May 2014 12:33:38 (GMT Standard Time, UTC+00:00)  #    -
MSBuild
Navigation

Sign In
Extras
Statistics
Total Posts: 116
This Year: 0
This Month: 0
This Week: 0
Comments: 36
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2017
Hadrian Phillips

All Content © 2017, Hadrian Phillips
DasBlog theme 'Business' created by Christoph De Baene (delarou)