Category Archives: SQL Server

C# Parallel Tasks gives MAJOR Speed Increase

I just used parallel tasks to decrease the time a process took from over an hour to about 2 minutes.  I was wary of creating so many database contexts, but it paid off in a major way!

See the snippet of code below to see how I used the Parallel.ForEach.  .Net created almost 100 threads during the execution.

Important
If you need someone with my ability to decrease processing times on a full time basis, please contact me through LinkedIn 

Have a great day!

Converting Oracle Comments to SQL Server.

I downloaded some code a recently that creates an Oracle Database, but I don’t have Oracle, so I converted most of the code to SQL Server.  One of the harder things to convert was the column and table comments.  One of the features of Oracle that Microsoft SQL Server does not have directly is commenting. It appears that you can have comments on a table and comments on a column (field) in the table.

Well after doing some research into how to convert these to SQL Server,  I came across an article at http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=37796 that told how to do this.  Well, I had a script with over 1,100 comments, so I used LinqPad to create a small program that would convert my script using Regular Expressions.

Here is the code for that, please let me know if this helps anyone.  It sure made my work a lot easier.

This is for Table Comments:

And here is the code for Column comments.