Automated Tracing with BAT File

The following script can be used to start an extended event trace and start the workload at the same time.   (copy past to a workload.bat file) START cmd.exe /C sqlcmd -S.\SQL2016 -iscript1.sqlSTART /MIN /WAIT cmd.exe /C sqlcmd -S.\SQL2016 -itrace.sql START cmd.exe /C sqlcmd -S.\SQL2016 -iscript1.sqlSTART /MIN /WAIT cmd.exe /C sqlcmd -S.\SQL2016 -itrace.sql      

Use Power BI to trace SQL Server RPC Calls and correlate them with Wait_info

The following code creates an extended event session that correlates wait_info and stored procedure (RPC calls) and allows you to analyze the data using Power BI. Make sure to configure your right logfile path (where the Extended Event file is written) Also enable xp_cmdshell to allow the script to cleanup the logfiles after the trace

Run T-SQL in parallel agents jobs and wait till all the jobs are done

The following script extends the work of John Huang and his excellent blog post about parallel SQL Execution using the SQL Agent: http://www.sqlnotes.info/2012/01/04/parallel-task-scheduling-1-jobs/ The extension is a wrapper to obfuscate the logic to wait for all the jobs to be done. This approach can significantly improve the duration of large database operations. E.g you can

Neural Networks in T-SQL

  it might not be the fastest option to train a neural network but it seems to be a quite elegant approach to use T-SQL to implement the backpropagation algorithm. In order to learn and better understand the algorithm I decided to port the C# neural network example from Dr. James McCaffrey(MSR) to Sql Server.

Linear Regression Example with Python and theano

  In my last blog post I described how to install the theano library on windows. Now this is an example of what you can do with it. I`m currently going through the theano tutorials presented in this video by Alec Radford and adding some lines of code to make it easier to reproduce. This

Use Power BI and Google Analytics to measure MSDN Blog performance

  Did you know that you can add the Google Analytics Tracking code to your msdn blog posts and use Power BI to measure your blog performance? Just add your tracking code from your Google Analytics Account to every blogpost and then connect to the Analytics Data Source using the free Microsoft Power BI Desktop

Deep Learning – Simple installation guide for Theano on Windows

  Many tutorial videos for convolutional neural networks on youtube (e.g. https://www.youtube.com/watch?v=S75EdAcXHKk) require the theano python library. I spent an entire weekend figuring out how to install theano on a windows x64 machine and wanted to share the following quick installation steps: Its really simple if you know how! (I found that the official documentation

SQL Server 2016 (CTP3) R Integration

  This is how you get R Integration in SQL Server 2016 (CTP3): Create a SQL 2016 CTP3 VM in Azure Run SQL 2016 Setup and install “Advanced Analytics Extensions” Feature Download and install: https://www.microsoft.com/en-us/download/details.aspx?id=49525 Download and install: https://www.microsoft.com/en-us/download/details.aspx?id=49505 (only the 81.3 MB file) Run sp_configure ‘external scripts enabled’,1 in a SQL Query window to