3D Molecule Viewer of PDB files

(Best viewed in 1080p HD) This is another application I built in Unity. It parses Protein Data Bank (.pdb) text files and creates a 3D visualization of the molecular structure in Unity. It includes a 3D file picker to open files from the file system.

PDB parsing code credit to Dr. Peter Kuhn at the Scripps Research Institute, who created the C-ME application, whose demo is on CodePlex.

My attempt to create a HUI – a Holographic User Interface

This was my attempt to simulate gaze from the camera and walking around an object, interacting with a HUI (pronounced as in “…, Dewey, and Louie” or “… Lewis and the News”).

Maineiacs does a Let’s Play video of Shift – A game I created in Unity in 48 hours

He found my game on GameJolt (http://gamejolt.com/games/shift/78051) and took the time to make this Let’s Play video. Glad he enjoyed it. I appreciate the constructive suggestions as well.

Demo/Walkthrough of Shift – A game I created in Unity in 48 hours

This is a game I built in 48 hours based on the Global Game Jam theme of 2015: “What do we do now?”. It’s a first person puzzle game built in Unity. You can find it and play it on GameJolt at http://gamejolt.com/games/shift/78051. There are definitely things I’d like to change/fix, but I had to cut myself off at 48 hours. For example, there are only 3 levels, there are UVs I need to adjust, and I’m told there should be more visual feedback and environmental clues rather than text to tell the player what to do. Anyway, here it is. Music by Stephen Lu.

My Data Day at Build – Azure Elastic Databases, Azure Search, IoT, Azure Stream Analytics, and more

Spent a day on nothing but data at Build.  Azure Elastic SQL Databases, Azure Search, Azure Stream Analytics, Azure Machine Learning.  Tons of new data offerings.  And all in the cloud.  You can read my blog on it here:

https://bennettadelson.wordpress.com/2015/05/01/my-data-day-at-build-azure-elastic-databases-azure-search-iot-azure-stream-analytics-and-more/

Working with BimlScript to ease and automate your SSIS development

Business Intelligence Markup Language (Biml) is a great way to simplify your SSIS development to an easy-to-read XML format. BimlScript expands this even further to allow you to embed .NET code in your Biml to have new Biml dynamically generated with schema changes at your source.  In a recent talk I gave, I discussed what BimlScript can do and gave multiple examples and patterns that you can take and apply to your BI development.

I’ve shared my Slides and Code from the session on my OneDrive at this link:
http://1drv.ms/1vwTMGV

Our Powers Combined: A Quick Tour of Microsoft’s Power BI

How Microsoft’s Power BI can handle a Business Intelligence reporting project in minutes with its 4 pillars: Power Query, Power Pivot, Power Map, and Power View:

Can’t Activate Windows 8

If you’re like me, you couldn’t wait to download Windows 8 RTM from MSDN subscriptions today.

And judging by how swamped MSDN was today, a lot of you are like me.

But it’s possible that later that day after you’ve finally downloaded and installed the beautiful thing, you might have one problem:

Activation.

Windows 8 was telling me it wasn’t activated and was giving an annoying message in the corner of my Hulu watching to let me know. When I’d try to activate, it said it couldn’t activate at this time.

I had my product key from MSDN:

But when I was trying to activate, it kept showing me the last several characters of a completely different key, and I couldn’t figure out how to change it to the one I wanted.

Here’s where I finally found how to do it:

1) Navigate to C:\Windows\system32
2) Find cmd.exe, right click it and Run as Administrator (the following command won’t work if you’re not running in this mode)
3) Type “slmgr.vbs -ipk <insert your new product key here>” in the command and execute

Activation should be a breeze after that.

Slides from “Using SQL Azure in an SSMS AddIn”

Slides:  IntroductionToDevelopingWithSQLAzure.pptx

Session Description:  The Cloud is fast becoming the latest hot topic in the technology arena. We need to understand how we as SQL Developers and Administrators can utilize SQL Azure, Microsoft’s platform for relational data storage in the Cloud, to meet our needs. This talk will be a step-by-step demo of how to obtain an Azure subscription, create and administer a SQL Azure database, and work with it from your own SQL Server Management Studio AddIn. You’ll find that Azure is so easy to work with, you’ll get two for the price of one in this talk: you’ll learn Azure and learn how to create a Management Studio AddIn!

Differences in Escalation to Distributed Transaction Coordinator starting in SQL Server 2008

There’s a difference in when connections are escalated to Distributed Transaction Coordinator (DTC) starting in SQL Server 2008.

Microsoft’s Distributed Transaction Coordinator (DTC) is a service that coordinates transactions that span multiple connections to databases.  When multiple connections are made within a Transaction Scope, SQL Server will escalate to DTC.  Past versions of SQL have different conditions about when this escalation happens.  To demonstrate this, I have a SQL Server 2005 instance and a SQL Server 2008 instance running on my local machine against which I’m going to execute the same code.

The difference depends on whether you’re opening multiple connections at once (nested connections) or opening up a new connection and closing it every time you hit the database.  The former (nested connections) will escalate to DTC in SQL Server 2005 and 2008.  The latter (one connection at a time) will escalate to DTC in 2005, but WILL NOT in 2008.

Let’s demonstrate.

First, we’ll need to turn off DTC.  That way we can easily tell when we’ve escalated to DTC as our code will raise an error saying “MSDTC on server ‘SERVERNAME’ is unavailable.” 

To turn it off:

  1. On the Start menu, click Control Panel. In Control Panel, click Administrative Tools. In Administrative Tools, click Services.
  2. In the details pane, click “Distributed Transaction Coordinator“ in the list of services.
  3. On the Action menu, click Stop. 

I’ve made this quick Windows Form to execute 3 different snippets of code against a SQL Server of my choosing.  We’ll see which snippets succeed and which give the afore-mentioned error to indicate that they are escalating to DTC.

 

The first button. “1 Connection”

Code:

        private void btnOneConnection_Click(object sender, EventArgs e)
        {
            string connectionString = @"Data Source=" + tbServer.Text
                + @";Initial Catalog=master;Integrated Security=True; timeout=0";

            using (TransactionScope transactionScope = new TransactionScope())
            {
                SqlConnection connectionOne = new SqlConnection(connectionString);

                try
                {
                    //One connection
                    connectionOne.Open();
                    connectionOne.Close();

                    MessageBox.Show("Success");
                }
                catch (Exception ex)
                {
                    MessageBox.Show("ERROR: " + ex.Message);
                }
                finally
                {
                    connectionOne.Dispose();
                }
            }

        }

Within one Transaction Scope, it opens one SQL connection.  The result:
Against SQL Server 2005 Instance:            Success
Against SQL Server 2008 Instance:            Success

 

The second button.  “2 Connections, 1 at a time”

Code:

        private void btnTwoConnectionsOneAtTime_Click(object sender, EventArgs e)
        {
            string connectionString = @"Data Source=" + tbServer.Text
                + @";Initial Catalog=master;Integrated Security=True; timeout=0";

            using (TransactionScope transactionScope = new TransactionScope())
            {
                SqlConnection connectionOne = new SqlConnection(connectionString);

                try
                {
                    //2 connections, 1 at a time
                    connectionOne.Open();
                    connectionOne.Close();
                    connectionOne.Open(); // escalates to DTC on 05, not 08
                    connectionOne.Close();

                    MessageBox.Show("Success");
                }
                catch (Exception ex)
                {
                    MessageBox.Show("ERROR: " + ex.Message);
                }
                finally
                {
                    connectionOne.Dispose();
                }
            }
        }

Within one Transaction Scope, it will open a connection, close it, and open it again.  Here is the difference.  The result:
Against SQL Server 2005 Instance:            MSDTC on server ‘SERVERNAME’ is unavailable.
Against SQL Server 2008 Instance:            Success

Starting in 2008, a connection closed and reopened will no longer be escalated to the Distributed Transaction Coordinator.  Which is good, because it doesn’t need to be.

 

The third button. “2 Connections, nested”

Code:

        private void btnTwoConnectionsNested_Click(object sender, EventArgs e)
        {
            string connectionString = @"Data Source=" + tbServer.Text
                + @";Initial Catalog=master;Integrated Security=True; timeout=0";

            using (TransactionScope transactionScope = new TransactionScope())
            {
                SqlConnection connectionOne = new SqlConnection(connectionString);
                SqlConnection connectionTwo = new SqlConnection(connectionString);

                try
                {
                    //2 connections, nested
                    connectionOne.Open();
                    connectionTwo.Open(); // escalates to DTC on 05 and 08
                    connectionTwo.Close();
                    connectionOne.Close();

                    MessageBox.Show("Success");
                }
                catch (Exception ex)
                {
                    MessageBox.Show("ERROR: " + ex.Message);
                }
                finally
                {
                    connectionOne.Dispose();
                    connectionTwo.Dispose();
                }
            }
        }

Within one Transaction Scope, it will open two connections, nested.  The result:
Against SQL Server 2005 Instance:            MSDTC on server ‘SERVERNAME’ is unavailable.
Against SQL Server 2008 Instance:            MSDTC on server ‘SERVERNAME’ is unavailable.

SQL Server does, and should, escalate to DTC for a nested connection in both versions.

 

In Summary:

Nested connections will escalate to DTC in SQL Server 2005 and 2008.  Opening one connection at a time will escalate to DTC in 2005, but WILL NOT in 2008.