Skip to main content

Posts

SQL Server–Activate Memory Optimized tables

When trying to create a Memory Optimized table in SQL Server, I got the following error message: Cannot create memory optimized tables. To create memory optimized tables, the database must have a MEMORY_OPTIMIZED_FILEGROUP that is online and has at least one container. To fix this I first had to add a new memory optimized filegroup to the database: ALTER DATABASE OntSessionTmp ADD FILEGROUP ontsessiontmp_mod CONTAINS MEMORY_OPTIMIZED_DATA After creating the filegroup I had to link a container: ALTER DATABASE ontsessiontmp ADD FILE (name='ontsessiontmp_mod1', filename='F:\Program Files\Microsoft SQL Server\MSSQL13.ONTINST2\MSSQL\DATA\ontsessiontmp_mod1') TO FILEGROUP ontsessiontmp_mod Now I could switch a table to a Memory Optimized version. Yes!

Install .NET Core 3.1 SDK on Ubuntu 18.04 inside WSL

I’m a big fan of WSL ( Windows Subsystem for Linux ) to test my .NET Core applications on Linux. Recently I tried to install the .NET Core 3.1 SDK on my Ubuntu distribution inside WSL: bawu@ORD02476:~$ sudo apt-get install dotnet-sdk-3.1 Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package dotnet-sdk-3.1 E: Couldn't find any package by glob 'dotnet-sdk-3.1' E: Couldn't find any package by regex 'dotnet-sdk-3.1' This didn’t seem to work. He couldn’t find the .NET Core 3.1 SDK inside the package manager. I first tried to refresh the packages list: bawu@ORD02476:~$ sudo apt update 0% [Connecting to archive.ubuntu.com] [Connecting to security.ubuntu.com] Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease Get:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic-backports InRelea...

Delete a Windows Service

I’m so spoiled on using TopShelf that I don’t know anymore on how to remove a Windows Service the old fashioned way. If you have Powershell 6 or higher, you can do the following: Remove-Service –name “Your Service Name” An alternative is to directly use the Service Control Manager: sc.exe delete "Your Service Name" Don’t forget the ‘.exe’ when invoking the Service Control Manager inside a Powershell command window. More information: https://docs.microsoft.com/en-us/dotnet/framework/windows-services/how-to-install-and-uninstall-services

RedisTimeoutException - High ‘in’ value

While investigating a performance issue we noticed that the we had a lot of RedisTimeoutExceptions inside our logs: 2019-12-15 16:26:57.425 +01:00 [ERR] Connection id "0HLS1E3OEP520", Request id "0HLS1E3OEP520:0000001D": An unhandled exception was thrown by the application. StackExchange.Redis.RedisTimeoutException: Timeout performing PEXPIRE CookiesStorageAuthSessionStore-4a07a1bb-04e0-442d-9223-e1612967bf2b, inst: 2, queue: 8, qu: 0, qs: 8, qc: 0, wr: 0, wq: 0, in: 14411, ar: 0, clientName: SERVER1, serverEndpoint: Unspecified/redis:6379, keyHashSlot: 4822 (Please take a look at this article for some common client-side issues that can cause timeouts: http://stackexchange.github.io/StackExchange.Redis/Timeouts ) You would think that this indicates there is a performance issue in Redis but this turned out not to be the case. Let’s have a second look at the error message and especially the strange parameters: inst: 2, queue: 8, qu: 0, qs: 8, qc: 0, wr: ...

OpenLayers - Use SVG icons for markers

On one of my projects we are using OpenLayers to visualize geographical data. I got stuck when I tried to show markers on a map by using SVG icons. My first attempt looked like this: But on the map I only got a weird black triangle.😕 I tried a lot of alternatives but nothing made any difference. In the end I found out that I could fix it by specifying a size(width and height) inside my SVG file: Remark: Changing the scale and size properties on the style seems to have no affect when using SVG’s. So make sure to set an appropriate size in the SVG file.

Disable transformations in ASP.NET Core

By default when you add a web.config file to an ASP.NET Core application, the config file is transformed with the correct processPath and arguments. This can be quite annoying especially if you want to apply some web config transformation magic. Inside the documentation , I found that you can prevent the Web SDK from transforming the web.config file by setting the <IsTransformWebConfigDisabled> property in the project file: This disabled the web config transformation behavior but didn’t solve the problem that Visual Studio updated the web.config file. A colleague sent me another (undocumented?) flag <ANCMPreConfiguredForIIS> : Remark: This setting only works when you are running in IIS InProcess.

Change password in another domain

As a consultant I’m active at multiple clients. For each of these clients I get a domain account to be able to login onto their systems. But as they all enforce a password policy, I have to update a lot of passwords every month(thank god that password managers exists). Here is a quick tip of you want to change the password of an Active Directory account but your PC isn’t part of the same domain: You can still change your password if your PC is able to talk to the domain controller: Hit CTRL-ALT-DELETE Select Change a Password You’ll see the Change a Password screen where the focus is on the old Password field. But what is not immediately obvious is that you can change the username(and domain!) in the first field. By setting here a different username you can change the password directly for any account you have access to.