The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,862 other subscribers

Archive for January, 2013

Happy new year! My 2012 blog in review

Posted by jpluimers on 2013/01/04

Wow, it seems that the most popular posts have nothing to do with software development (:

Happy new year everyone!

–jeroen

The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

About 55,000 tourists visit Liechtenstein every year. This blog was viewed about 260,000 times in 2012. If it were Liechtenstein, it would take about 5 years for that many people to see it. Your blog had more visits than a small country in Europe!

Click here to see the complete report.

Posted in About, Personal, Power User, SocialMedia, WordPress | Tagged: , , , , , , , , | Leave a Comment »

Forcing Java Update on Windows

Posted by jpluimers on 2013/01/04

Sometimes the Java Update checker crashes in the middle of something.

The long solution to restart it is to logoff/logon or reboot/logon and wait for it to come up.

The short solution is to manually restart it (you probably need to be Administrator to do this though) using either of these commands:

"%CommonProgramFiles%\Java\jucheck.exe" -auto
"%CommonProgramFiles%\Java\Java Update\jucheck.exe" -auto
"%CommonProgramFiles(x86)%\Java\jucheck.exe" -auto
"%CommonProgramFiles(x86)%\Java\Java Update\jucheck.exe" -auto

To keep it simple: The exact command depends (:

  • if you run on an x86 machine or not, or – on an x64 machine – which of the Java versions (x86 or x64) you have installed
  • if the jucheck.exe is in the Java directory itself, or in a Java Update directory

–jeroen

Posted in Development, Java, Power User, Software Development, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003 | Leave a Comment »

Wordify: .NET/C# – Convert enums to human readable values – Stack Overflow

Posted by jpluimers on 2013/01/03

You’d hope that a method like Wordify with the signature below would be simple right?

public static string Wordify(string pascalCaseString)

Not so. Read the rest of this entry »

Posted in .NET, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development | 1 Comment »

Adding the localized [BUILTIN\Administrators] as SQL Server and giving them SA equivalent rights

Posted by jpluimers on 2013/01/02

On development machines it can be comfortable to add the local Administrators group to SQL Server, and make them equivalent to SA (SQL Server Administrator).

This especially as SA is disabled by default when you install using Windows Authentication mode (which is the default). You can Change Server Authentication Mode to include SQL Server mode, but then you still have to enable SA (you can even rename SA)

This is basically what you want to do:

CREATE LOGIN [BUILTIN\Administrators] FROM WINDOWS WITH DEFAULT_DATABASE=[master];
EXEC master..sp_addsrvrolemember @loginame = N'BUILTIN\Administrators', @rolename = N'sysadmin';
GRANT CONTROL SERVER TO [BUILTIN\Administrators];

There are a few gotchas here:

  • The name of the group BUILTIN\Administrators depends on the localization of your system.
    This is one of the reasons I usually advise clients to have server systems run on the most common ENU (English USA) localization of Windows.
    Another reason is that it is far easier to find information ENU English Messages back on the internet.
  • You need to be SQL Server Administrator to begin with.
    There is a little trick to get this done: you can stop the SQL Server service, then restart SQL Server it in single-user mode.
    In single-user mode, members from the BUILTIN\Administrators group can connect as a member of the sysadmin fixed server role.
  • If you want to access SQL Server as member from BUILTIN\Administrators, you need to run your SQL client tools with the UAC elevated permission (otherwise the Administrative bit is not set, and the BUILTIN\Administrators is not recognized).

That’s what the batch file below solves.

You need to start it as member of BUILTIN\Administrators with elevated privilege (the easiest way is to run it from an elevated command prompt).

It will: Read the rest of this entry »

Posted in Batch-Files, Database Development, Development, Scripting, Software Development, SQL Server, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012 | Leave a Comment »

.NET regular expressions classic: to compile or not to compile?

Posted by jpluimers on 2013/01/01

Every time I use regular expressions (or post about them), it makes me think about the classic RegEx post by Jeff Atwood: to compile or not to compile.

BTW: Happy 2013!

–jeroen

Posted in .NET, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, RegEx, Software Development | Leave a Comment »