Advertisements

Dell M3800 missing pause/break key

I love my Dell M3800 but shortly after unboxing I realized that there was no PAUSE/BREAK key on the keyboard so breaking into code was not looking good.

I eventually found a registry hack to re-map another key on the keyboard, but then I loss the functionality of that key. 

Finally a co-worker of mine discovered that pressing CTRL+Fn+F12 = CTRL+BREAK!

Advertisements

Windows 10 Beta–how to sign into Domain instead of Microsoft Account

After installing the Windows 10 Enterprise beta the first thing you’ll notice is that Microsoft tries to make you sign into a Microsoft account immediately instead of giving you the option to first join your domain.

If you sign in immediately and then join the domain later, you’ll end up with two different profiles, both loaded with Microsoft Profile stuff, which is NOT A GOOD THING.

image

There’s no obvious way to “not” sign into the Microsoft account and instead join the domain.

So here’s the work around I’ve come up with.

At this point in the installation, disconnect from the Internet by either unplugging a physical netwok cable, entering airplane mode if you have the switch on your computer to do so, or otherwise just break your connection to the Internet.  If testing in a virtual machine, enter the settings of the VM< and either change the network adapter to “Host Only” such as in VMWare workstation
image

image

or if using a Windows Hyper V server, open Settings…

image

image

Then change the Networking Adapter Virtual Switch to “Not connected”.

When that step is complete, click the Back arrow at the top left of the screen to return to the previous screen, then click the “Next” button again to be presented with the old “Local Account” creation tool:

image

 

On this screen create an account name such as “Admin” – something OTHER THAN the name that you intend to log into this computer with later when joined to the domain.  This step is important to avoid ending up with your C:\User\ folder being called YourName.DomainName instead of just YourName.

When done, re-connect the machine to the network, then join the machine to the domain:

image

Type “Join a domain” in the box at the bottom of the screen.

image

Click “Change”

image

Enter the computer name that you want, the domain name that you want, then have a domain admin or user with add computer rights on the domain to authenticate to the domain and you’re set.

image

After restarting your computer, click the “Back” arrow to switch user:

image

Click the “Other User” option:

image

Then finally sign in with your domain credentials.

image

Note: if you aren’t normally a domain administrator, you may need your domain admin to first log into the machine to make your domain account be an admin of the machine if that is appropriate for your usage scenario.

 

NOTE: If you’re reading this from home and are trying to figure out how to join the domain over a VPN connection, this IS POSSIBLE by creating a shared network connection while logged in as that “Admin” user.  But that’s a topic for a different post.  If doing this with VMWare workstation, and using NAT networking as long as the host computer is already connected to the VPN this VM should also be able to use that VPN connection for the domain authentication.

Another note: Windows 10 Beta build 9926 seems to install just fine on VMWare Workstation 10 and does not appear to require an upgrade to version 11 even though the VMWare web site seems to encourage that.  I was able to successfully install VMware v10 tools to the Windows 10 machine.

One limitation of VMWare Workstation 10 however seems to be that it limits the maximum screen resolution to 2560×1920:

image

Supposedly version 11 fixes that and adds support for full QHD+ (3200×1800) displays like the one in my Dell M3800.  That alone may be worth the upgrade just to not be annoyed by the screen resolution not matching the actual display.  Otherwise the VM seems to run fine on Version 10.

Deleting Duplicate Rows, Keeping only most recent using ROW_NUMBER()

Every once in a while I encounter a data migration scenario where the destination table doesn’t enforce a Unique Index and when re-running data migration code if you forget to purge records in the destination prior to inserting without the unique index you could end up with duplicates.

Today’s posting focuses on one way of deleting the duplicates – using the Row_Number() OVER (PARTITION BY ) ORDER BY  syntax in SQL Server to assign row numbers by what I want to be the Unique records and then delete those that are duplicates.

In the example below, I have a table that stores salesperson assignments – it populates a table called the CommissionSalespersonDefaults.

The inserts in this example were run 3 times over a period of months.  But since the delete was omitted, every time the statements were run I ended up with duplicates/triplicates, etc. in that table, like this:

CommissionSalespersonDefaultsID

CustomerCode

ShipToCode

Commissionable

Salesperson1

22

20THC

 

TRUE

AA1

9538

20THC

 

TRUE

PrI

21971

20THC

 

TRUE

PrI

There should only be one record for this CustomerCode/ShipToCode combination in this table – I need to delete two of them, but in case some attribute is different like in this case the sales rep changed from the 1st migration to the 2nd/3rd I only want to keep the last one – the one with ID 21971.

There are a number of ways to get this done, but for today’s article I’m focusing on the Row_Number() OVER (PARTITION BY ) ORDER BY feature in SQL Server.

Here’s a Select statement showing just the first 9 records with this in action:

I like to see what I’m about to do when it comes to delete statements so I usually start with a select statement giving me a preview of what’s about to happen:

SELECT TOP 9 * FROM CommissionSalespersonDefaults s 

INNER JOIN (

  SELECT *

  , ROW_NUMBER()

    OVER (

           PARTITION BY CustomerCode, ISNULL(ShipToCode, )

           ORDER BY CommissionSalespersonDefaultsID DESC

         ) AS RowNumber

  FROM CommissionSalespersonDefaults

) Numbered ON s.CommissionSalespersonDefaultsID = Numbered.CommissionSalespersonDefaultsID

What the query does is add the RowNumber, with it resetting after each change in whatever you put in the Partition By part – in this case, in each change in CustomerCode+ShipToCode.  The ORDER BY Clause tells SQL Server the order in which to order the records prior to assigning the row numbers.  Here’s a sample of the output

RowNumber

CommissionSalespersonDefaultsID

CustomerCode

ShipToCode

Commissionable

Salesperson1

1

21971

20THC

 

TRUE

PrI

2

9538

20THC

 

TRUE

PrI

3

22

20THC

 

TRUE

AA1

1

21972

212

 

TRUE

SCS

2

9539

212

 

TRUE

SCS

3

23

212

 

TRUE

SCS

1

21973

280T

 

TRUE

TSW

2

9540

280T

 

TRUE

TSW

3

24

280T

 

TRUE

TSW

So it’s easy to see here that what we want to delete are any records where the RowNumber is > 1.

DELETE CommissionSalespersonDefaults

FROM CommissionSalespersonDefaults

INNER JOIN (

  SELECT *

  , ROW_NUMBER()

    OVER (

            PARTITION BY CustomerCode, ISNULL(ShipToCode, )

            ORDER BY CommissionSalespersonDefaultsID DESC

          ) AS RowNumber

  FROM CommissionSalespersonDefaults

) Numbered ON CommissionSalespersonDefaults.CommissionSalespersonDefaultsID = Numbered.CommissionSalespersonDefaultsID

WHERE RowNumber > 1

Now I have a table containing only the most recently imported records.

 

Security Update MS14-066 causes major performance problems in Microsoft Access / SQL Server applications

http://www.microsoft.com/en-us/download/details.aspx?id=44618

This week Microsoft released a number of security updates this week to patch an issue with schannel as described in this article:  When the update is installed to a server running Microsoft SQL Server (So far, confirmed as issue with SQL Server 2008 R2, SQL Server 2012, SQL Server 2014) client applications that access the database via ODBC such as Microsoft Access clients pointing to SQL Tables encounter a major performance hit.

https://technet.microsoft.com/library/security/MS14-066

Our customers are reporting that this security update causes MAJOR performance problems in any Microsoft Access application with a SQL Server backend (any version).  For example, a simple operation such as clicking from one line of an order to another (without performing ANY data updates) can take from 5 to 15 seconds!  For users having to update hundreds of lines of orders, the application becomes nearly unusable – an activity that used to take 5 minutes could take hours.to complete.

Please, if you have not installed this update yet – DO NOT INSTALL IT to the SQL Server machine (it can be installed to clients or other servers).

If you have installed the update and are experiencing this issue, please remove the following specific update from the computer running Microsoft SQL Server to get your system back to performing normally:

Click Start, then type: “Update”, click “View installed updates”

clip_image002

In the list of updates scroll down until you find the list of updates installed recently (your exact date may differ).  Select “Security Update for Microsoft Windows (KB2992611)” and click Uninstall.  After a reboot application performance restores to normal.

image

As of November 13th at 11:49 AM we know that if you select each one of these under this group, and uninstall, then reboot that performance returns to normal.

KB3010788, KB3008627, KB3006226, KB3005607, KB3003743, KB3003057, KB3002885, KB2993958, KB2992611, KB2991963, KB2978120

Update: as of 2014-11-13 3:20PM our most recent test looks like it may only be KB2992611 as the root cause of this performance problem.  The client machine does not appear to have to have the update removed.

Update: as of 2014-11-13 5:00PM we have a case open with Microsoft to figure out the underlying performance problem.  Obviously we want our customers to be able to install security updates, but it can’t be at the expense of being able to use the software that runs your company.  I’ll post additional updates when we hear back from the Windows Team.

Update: as of 2014-11-14 1:30PM: Update from Microsoft on our open case: The SQL Team is working directly with the Windows team and have been able to reproduce performance issues.  They’ve created a specific tool to gather performance stats related to the issue and are working with one of my techs to gather the stats in our lab environment with both the patch installed and with it removed.

Update as of 2014-11-17 2:00 PM: Microsoft has completed data capture of several traces of client to server communication with the patch applied and removed.  Status: Ball in Microsoft’s court.  Waiting on analysis.

Update: Per the user comments below, this performance issue may affect any client (not just MSAccess clients) that happen to use the built-into-Windows SQL Server Driver: 

image

Put differently, you may be affected if your connection string looks like this:

Driver={SQL Server};Server=ComputerNameRunningSQL;Database=SQLDBName;Uid=SQLAuthUser;
Pwd=SQLAuthPass;

Or like this:

Driver={SQL Server};Server=ComputerNameRunningSQL;Database=SQLDBName;
Trusted_Connection=Yes;

Update: 2014-11-28 1PM – Just received this notification e-mail from Microsoft:

The following bulletins have undergone a major revision increment.

* MS14-066 – Critical

Bulletin Information:

=====================

MS14-066 – Critical

https://technet.microsoft.com/library/security/ms14-066

– Reason for Revision: V2.0 (November 18, 2014): Bulletin revised to announce the reoffering of the 2992611 update to systems running Windows Server 2008 R2 and Windows Server 2012. The reoffering addresses known issues that a small number of customers experienced with the new TLS cipher suites that were included in the original release. Customers running Windows Server 2008 R2 or Windows Server 2012 who installed the 2992611 update prior to the November 18 reoffering should reapply the update. See Microsoft Knowledge Base Article 2992611 for more information.

– Originally posted: November 11, 2014
– Updated: November 18, 2014
– Bulletin Severity Rating: Critical
– Version: 2.0

We have not tested this yet, but will shortly. 

UPDATE: 2014-11-18 1:50PM: Part 2 of the Rev 2 patch worked!

In my example, I went back to the URL: https://technet.microsoft.com/library/security/ms14-068, selected the Windows Server 2008 R2 patch (for the test machine I was using this time I needed that one), then when I clicked download I now see a second option:
 image

Windows6.1-KB3018238-x64.msu

On installing that 2nd file listed the problem was resolved.  Performance is back to normal for this particular Windows Server 2008 R2 server with SQL installed!

UPDATE: 2014-12-01: Windows 7 SP1 No patch available.

If you are running SQL Server on your laptop for example to demo your application or as a developer we’ve discovered that there is no KB3018238 available.  Attempting to install that KB on Windows 7 simply results in an error: The update is not applicable to your computer:

image

I’ve contacted Microsoft under my original case on this issue. Their reply so far: “KB3018238 is not available in Windows 7.” – Yes, that would be the point of my call…

So for those of you who do development on Windows 7, or those of you who are salespeople with copies of your company’s ERP database installed locally are in the same situation – either do not install KB2992611 and have a working application, or do not install it, have a working application but be at risk.

Fixing Major Hyper-V Virtual Machine Performance Problem on Server 2012 R2

Recently I implemented a brand new, very powerful server with solid state disks running Windows Server 2012 R2.  But something shocking happened when I did: Every VM that I moved to that new server performed so poorly that users could not stand to use the machine. 

File transfers to or from the server were also taking an unacceptably long time to complete.

After some searching we figured out that the “Virtual Machine Queues” advanced driver option of the various network adapters in the server had defaulted to True. 

Changing these settings to Disabled instantly restored performance of the server back to normal / acceptable levels and user complaints instantly went away.

Here are the step-by-step instructions to changing this setting on Windows Server 2012 R2 machine’s network adapters:

Open the Network Connections panel (right-click start, choose run… type: ncpa.cpl hit enter):

image

Right-click a network adapter and choose properties.

image

Click the Configure… button

Click Advanced, then scroll down to Virtual Machine Queues and change the value from Enabled to Disabled:

image

Here it is again on an Intel NIC:

clip_image002

Changing this setting for me at least made a dramatic improvement in network throughput and in Microsoft Hyper-V guest OS performance.

New Text Document option missing from right-click context menu

For some reason the “New Text Document” option went missing from my right-click context sensitive menu in Windows Explorer.  Here’s how I went about fixing it.

First of all, what you need to know about the right-click menus is that they are mostly maintained in the registry under the HKCR key.

In the case of .txt files, you’re looking for HKCR\.txt:

image

When the context menu option to create new text documents was missing, on my machine there weren’t any sub-keys under this .txt key.

To find the correct values I simply connected to another computer where the key was working and then copied the values from there, but to save you time, here are the values that worked for me:

image

There should be a Key “ShellNew” under the .txt key containing these values:

Expandable String Value: “ItemName” with value: @%SystemRoot%\system32\notepad.exe,-470

String Value: “NullFile” without any configuration setting

image

There should be a Key: “PersistentHandler” also under .txt

with default value set to: {5e941d80-bf96-11cd-b579-08002b30bfeb}

Once those items are in place, the right-click, new, Text Document option should re-appear on the explorer context sensitive menu.

Visio Stencil for Drobo B1200i

After spending way too much time searching for a Stencil for the Drobo B1200i I finally gave in and created one myself.

image

You can download a copy of the Drobo.vss file here: http://1drv.ms/1cHycKv

This stencil includes a Front View of the Drobo B1200i Rack Mount iSCSI disk array with cover on, and a back view also with Fan cover on.
image

Both the Front and Back views includes these Shape Data Elements:

image

On the back of the unit I’ve included connection points on each of the Power Supplies, and each Network Adapter port:
image

If you find these shapes useful, leave a comment below.