Thursday, September 29, 2011

Fixing Orphaned Users after DB Restore

I restored a database that was backed up from our integration environment, and restored it to my local SQL Server and then my software couldn't log in via SQL Server Authentication.

You see the issue is that the SID was not recognized and needs to be rebuilt. You can find out what you need to use by issuing the following command: 

MSSMS - exec sp_change_users_login











This will list the users that are currently orphaned. So to fix, you just need use the Auto_Fix argument and add the user.

exec sp_change_users_login 'Auto_Fix', 'youUserId'


Tuesday, September 27, 2011

While studying the upcoming browsers and looking to decide on which HTML 5 browser to target, I came across the great article that is just reminding me about Microsoft tactics. If you can't beat them, just over saturate the market until you can claim to be a leader, rather then a patchy washed up browser.

IE[x] is the new IE6
IE[x] is the new IE6

Monday, September 19, 2011

And Now for Something Completely Different

WinRT/Metro...the story continues.

I love writing software. I like to tinker with new things and to see what is possible. I was quite excited by two major developments. Windows 8 with Developer tools and the G+ API released last week. This should be straight forward right? I mean promises of a new programming paradigm in HTML 5/JavaScript and visions of circles and Google goodness on a new Tablet device, it should have been a wonderful couple days of coding. Right?

Welcome to your new walled garden:


This all started when I fired up my new preview of Visual Studio 2011 and discover that this edition of VS only supports Tailored applications. Ah, there is a new version of Visual Studio 2011 for MSDN subscribers.

So after much research and continual searching, the truth seems to coalesce into a clearer picture except for all the fear uncertainty and doubt that I must be on the right track. This is after all a Microsoft product.

HTML / JavaScript skills are not about web development using these languages, but about levering the knowledge of the skillsets so that you can get access to the WinRT APIs. There will still be the requirements of learning a new API and all that that entails.

C# has gotten some slightly different interfaces to allow you access to WinRT, but it seems this is all about moving away from Win32. There is a new sandbox and security model and as such, some times will not cross over between Metro Style land and traditional C#.

If you need some shared code, then you'll have to be writing something compatible with the Portal Library Tools so that you can get access to  your existing data. And now we've got a new picture emerging. What we really have is the language of your choice, to a new WinRT API structure. You can go with C# with its really thing layer between, with JavaScript, or with C++/Cx extensions and their new COM redux.

There are two platforms that you can target. The Desktop and all the traditional .NET development, including Silverlight and all that this experience gives you, or the new Metro UI for gesture based UI development that targets tablets and smartphones sans Silverlight. This implies that the Silverlight experiment is dead. Well not dead, but on life support. It will live on for Enterprise LOB applications, but the original idea as a Flash killer will not be realized nor will it be the Apple killer Microsoft wanted. And if you want to use these new tablets and smartphones, you will have to target Metro as Win32 will not be supported on ARM.

Todd Anglin has a great diagram about how to choose the best technology with what we know at this point.
C# as a language is not going away, but you're going to have learn a new API stack. Early reports is that converting Silverlight to Metro is not fun, and it would be better to just target a creating new enhancement Metro app to your existing portfolio.

Friday, September 16, 2011

Never enough time

There are only so many hours in a day. It's amazing to hear my children talk to me about being bored with nothing to do. I wonder at what age I stopped having empty spots in my day and I started having no time and having to juggle all my appointments, meetings, and personal tasks.

Well tonight, I finally have some time to check out this tiny thing called Windows 8. After reviewing what I need to get this running, I decided that VMware Workstation 8 is what I would need to get this beast running.

So I have older hardware, an AMD Athlon II X3 with 4 Gb of memory running Windows 7 Professional. It's enough to start off with.

So after finding some excellent instructions on how to install Window 8, I'm at the happy fun time screen:


Wow, this was pretty painless.

Tons of new features to customize, link to Windows Live ID, and bam!!!


Eureka, it just works. Now time to dogfood a new C# application under the new Metrosexual, oh I mean Metro UI Style in Visual Studio 2011. More on this later.