Thank you to Nova Southeastern University(NSU), all sponsors, speakers and volunteers for putting on a great SQL Saturday #379. Met lots of passionate people that showed how much of a community we have in Broward County. I attended the following sessions and talked to lots of people about Code for Fort Lauderdale.
- DH2i & DxEnterprise Stand-Alone to Clustered in Minutes
- PowerShell and Python – The Clash Part Deux
- PowerShell with Visual Studio SQL Data Tools
DH2i & DxEnterprise Stand-Alone to Clustered in Minutes
This was a vendor session for DH2iworks across multiple SQL versions and OSes. It was a very interesting session, particularly for a developer less familiar with virtual environments (at least standing them up, configuring, updating, feeding, watering, etc.). I know that for me, it introduced the following new and/or less familiar terms.
- quorum – the minimum number of members of a deliberative assembly. In the context of Clustering and High Availability, it is minimum number of nodes that must be in a cluster for it to be viable.
- InstanceMobility – The ability to move an instance of a virtual machine across physical machine boundaries
- SAN – Consolidated block level storage (as opposed to file level storage). Only block level operations are supported.
- Internet Small Computer System Interface(iSCSI) SAN – Allows for the emulation of a SAN over IP networks
The DH2i & DxEnterprise works across multiple SQL versions and OSes. Microsoft Clustering is not designed for Quality of Service(QoS). I was impressed by the demo given showing how to build out a 2 node cluster. You can see the steps below.
- Create individual nodes
- Add the disks
- Create a vhost
- Set the two nodes to be active on this vhost
In the demonstration, one node was running Windows Server 2008 R2 and the other node was running Windows Server 2012. He explained how this simplifies implementing a non-traditional cluster(different OS/SQL versions). As an added benefit, it provides a way to perform a consistent install on each node.
PowerShell and Python – The Clash Part Deux
Jorge Besadaz (email@example.com, firstname.lastname@example.org)
Below is a comparison between Python and PowerShell.
- Powershell is installed by default.
- Politically correct to use PowerShell
- Can instantiate .NET classes
- “Steal from the Best, And Create the Rest”. Chad Miller is better than you, see for yourself on CodePlex.
- PowerGUI Script Editor
- Easy to learn
- Very good support for windows
- has modules for everything
- has “batteries included” philosophy
There is a great video from Jeff Snover, PowerShell Creator, that you can watch. You can find the presentation here.
PowerShell with Visual Studio SQL Data Tools
Max demonstrated how to debug PowerShell with Visual Studio and use many of the data tools available. There were big changes between versions of powershell (2-5).
- VS 2013 Community Edition is free
- PowerShell Script Project
- Use system.management.automation.runspace to manage runspaces
- SQL Server Management Objects (SMO)
- SAPIEN is editor of choice.
- PowerShell Studio 2012
“I can do it. You can do it!” -Max
This is going to be a very short post but will be useful many developers.
It is registering one one startup script that will be fired when the page will be loaded.
Say you have used at several time and it was working but now it is failing. Similarly Page.ClientScript provide many other methods that will also not work.
View original post 58 more words
Having a beta version of one nuget package (e.g. Identity Manager) and trying to update an independent package (e.g. FluentValidation). You run the Update-Package command only to be greeted with the following
You can view a screenshot of this below.
The solution is to use the -pre flag in addition to update-package. However I still don’t understand why updating one package depends on an unrelated one.
To Nuget’s credit, they have this issue and it should be included in an upcoming release.
I needed to automate a full deployment of all my services, databases and the client that consumed them frequently.
I am using an on premise installation of TFS 2012 and Visual Studio 2015. I needed to leverage multiple builds since msbuild arguments (the ones that you use to automatically publish/deploy) apply to every project/solution being built. This can potentially lead to multiple different builds.
Fortunately, this can be accomplished using PowerShell. TFS provides a good useful well-documented interface.
Below are some helpful references that I found on my way to the above solution.
I had the following peculiar bug with the way Model Errors were presented in the view for my ASP.NET MVC 2 website. The code for the view is below.
You can see the ordering of the fields is First Name, Last Name, Name and Phone. As you can imagine, the validation messages should reflect this ordering. However I was getting the following output instead.
This isn’t a show stopper issue, but it is the kind of things that customers notice (and good QA people). After registering, users add more information at this screen. For this reason, it should be as elegant as possible to keep them coming back. I assumed this would be an easy fix. I’d just go to the validation code and fix the ordering of the errors.
You can see from the code that it is yielding the validation errors the same way that I would like them to be presented. As it turns out, this didn’t make a whole lot of difference. Then I realized that the validation code was not the issue at all.
The errors are displayed in the order that the properties are listed in the mode.
I’ll give you a moment to allow that to sink in. It’s an issue that is difficult to diagnose but easy to rectify. The original model property ordering below outputs the incorrect ordering.
The model should appear like below to achieve the desired user experience.
Once you make that change, the errors display like below.
I opened up Commerce Server Manager expecting to be able to browse to the Profile Definitions in Commerce Server 2009 using Commerce Server Manager. Instead of the expected interface, I was greeted with “Server Error in Application ‘Default Web Site’ HTTP Error 404.0 Not Found” like the screen shot below.
This can be rectified with the below steps.
- Open Internet Information Services(IIS) Manager
- Right Click on Default Web Site
- Click Add Virtual Directory
- Enter Widgets under Alias
c:\Program Files (x86)\Common Files\Microsoft Shared\Enterprise Servers\Commerce Server\Widgetsunder Physical Path
After following those steps and refreshing Commerce Server Manager you should see the below interface.
I stood up a development that featured both Commerce Server 2007 and SharePoint 2010. Within the environment, there is a public site and a private site. The SharePoint public site authenticates with a custom provider for Commerce Server 2007. The SharePoint private site uses windows authentication. Once the public site loaded correctly, I was greeted by the below Authentication Failed Exception on the private site. You can see from the screenshot below that it’s not pretty.
Unfortunately, the stack trace here doesn’t provide too much direction.
I checked the Event Viewer to try glean some useful information. I found the following event.
This only offered misdirection and confusion as it referenced the Commerce Server in the stack trace, which couldn’t be the case since this site used Windows Authentication. The solution came down to the aspnet:AllowAnonymousImpersonation setting, which was configured to true. Once it was modified to false, the site came up as desired. Below is the working configuration.