Infrastructure at your Service

All Posts By

Stéphane Haby

Stéphane Haby

SQL Server Tool: MSSQL-CLI

By | Database Administration & Monitoring, Database management, SQL Server | No Comments

MSSQL-CLI is a useful new command line tool. Not so new because this tool exist since 2018 but a little bit unknow. You find this tool on GitHub here. One of the big advantage is the number of platforms available, Windows of course but also macOS, Ubuntu, Debian, CentOs, Red Hat, OpenSuse, Suse Enterprise and Fedora. This interactive command-line query tool has many advantages like the full IntelliSense support, the auto-complete, the syntax highlighting, the…

Read More
Stéphane Haby

SQL Server Tips: Path of the default trace file is null

By | Database Administration & Monitoring, Database management | No Comments

In addition of my precedent blog about this subject “SQL Server Tips: Default trace enabled but no file is active…”, I add a new case where the default path of the trace file was empty. The first step was to verify if the default trace is enabled with the command: SELECT * FROM sys.configurations WHERE name=’default trace enable’ It is enabled, then I check the current running trace with the view sys.traces SELECT * FROM…

Read More
Stéphane Haby

One day training @ Microsoft Azure Cloud Workshop

By | Big Data, Cloud, Database Administration & Monitoring, Database management, SQL Server, Technology Survey | No Comments

Today, with my colleague Christophe, we follow the Microsoft Azure Training Day: Data and Analytics @ Microsoft Zürich (Wallisellen to be exact). After a presentation of SQL Server 2019, we begin with the First Lab about SQL Server 2019 and new features and we going through intelligent query processing, Data Discovery and Classification for personally identifiable information (PII) and General Data Protection Regulation (GDPR) and secure enclave. One of my favorites part of the lab…

Read More
Stéphane Haby

SQL Server Tips: Orphan database user but not so orphan…

By | Database Administration & Monitoring, Database management | No Comments

Beginning of this year, it is good to clean up orphan users in SQL Server databases. Even if this practice must be done regularly throughout the year of course. 😉 During my cleaning day, a new case appears that I never had before and enjoy to share it with you. To find orphan database-users, I use this query: SELECT *FROM sys.database_principals a LEFT OUTER JOIN sys.server_principals b ON a.sid = b.sid WHERE b.sid IS NULL…

Read More
Stéphane Haby

SQL Server 2019: Java in SQL Server hard to believe, no?

By | Development & Performance, DevOps, SQL Server, Technology Survey | No Comments

It has already been a few months that we are testing the next version of SQL Server: SQL Server 2019. I already blogged about a previous version of SQL Server supporting R and Python. With the new version of SQL Server 2019, Java will also be integrated. The Java runtime used is Zulu Open JRE and can be tested from the CTP3.2 of SQL Server 2019 Step 1: The installation Like a lot of people,…

Read More
Stéphane Haby

SQL Server Temporal Table – How to store a history table in another file?

By | Database Administration & Monitoring, Database management, SQL Server | 2 Comments

Few days ago, a customer asks me if it is possible to move the history table to slower but cheaper storage. The question behind this is whether it is possible to create a history table on a separate filegroup and file. Few years ago, I write a serie of blogs about temporal table here. I will take the same example to try to set up a filegroup specific to a history table. In my sample,…

Read More
Stéphane Haby

SQL Pass Summit 2018: SQL Server 2019 features coming soon!

By | Database Administration & Monitoring, Database management, SQL Server, Technology Survey | No Comments

It’s the 20th anniversary of the event and the keynote today was amazing (see the blog from Christophe) for different reasons but the more important is that is every time better people. Not only DBA’s but also people using their application connected to the database. Today, one of my focus will be the next version of SQL Server 2019 with the session of Bob Ward, Asad Khan & Amit Banerjee from Microsoft. I already tested…

Read More
Stéphane Haby

SQL server security pre-conference @SQL Pass Summit 2018 in Seattle

By | Database Administration & Monitoring, SQL Server, Technology Survey | No Comments

After long hours of flights, Christophe Cosme and I finally arrived in Seattle at the SQL PASS Summit 2018. We picked up our badge and bag and now we are ready to begin… This first day for me started with the pre-conference about SQL Server Security with Denny Cherry. Many topics were discussed like: Network Designs (such as public IP vs. Private IP) Firewall configurations (such as Network Design between Public network, Internal network and…

Read More
Stéphane Haby

SQL Server Tips: How many different datetime are in my column and what the delta?

By | Database management, Development & Performance, SQL Server | No Comments

Few months ago, a customer asks me for finding in a column, how many rows exist with the same date & time and the delta between them. The column default value  is based on the function CURRENT_TIMESTAMP and used as key as well. This is obviously a very bad idea but let’s go ahead… This anti pattern may lead to a lot of duplicate keys and the customer wanted to get a picture of the…

Read More
Stéphane Haby

SQL Server Tips: Drop a database-user attached to a service…

By | Database Administration & Monitoring, Database management, SQL Server | No Comments

Few weeks ago, I have a little issue when I try to drop a database-user without login Unfortunately, I do a little mistake at the beginning… I receive like every morning a report if all AD logins (computers, groups, users) registered on SQL server instances are in the AD with the useful command sp_validatelogins This report indicates that a computer name dbi\server_name$ was no more in the AD. I drop the login without problem and…

Read More