Bitwise Logic In SQL Server

David Fowler shows how to use bitwise logic in SQL Server:

Bitwise operators are operators that work on the individual bits of a value.  Let’s take a little look at the three bitwise operators that we’ve got in SQL server (there is actually a fourth but I’ll talk about that one another time) and hopefully things will start making a bit of sense.

Now let us never speak of this again…

Windows OS Setup For DBAs

Jeff Mlakar continues his environmental diagnostics guide, this time looking at Windows Server settings:

If Anti-Virus software is running on the SQL host machine there should be exclusions for the following types of files:

  • MDF – these file extensions are associated with SQL Server database files
  • LDF – these file extensions are associated with SQL Server transaction log files
  • BAK – these file extensions are associated with SQL Server backup files
  • TRN – these file extensions are associated with SQL Server trace files

All database related files should be white-listed by your anti-virus product!

If your company has some draconian policy that states every machines must have AV running on it then whitelist the database files. Most SQL machines are not outward facing and have no internet access. They cannot be reached directly from outside the network and there is little need to run scans on it.

Read the whole thing.

Integrating dbatools Into VSCode

Andrew Pruski shows how to integrate dbatools Powershell commands into Visual Studio Code:

The first dbatools commands that I looked at are: –

These commands do exactly what they say on the tin. Pretty standard stuff for DBAs but what’s cool is how we can use Visual Studio Code to quickly and easily check that all our databases are being backed up and have a recent (good) CHECK DB.

I’m going to setup two scripts to run the dbatools commands against my SQL instances via Visual Studio Code Tasks.

Read on to see how Andrew did it.

Plotly And Power BI

Leila Etaati shows how to use Plotly to generate interactive R charts in Power BI:

In the last two posts (Part 1 and 2), I have explained the main process of creating the R custom Visual Packages in Power BI. there are some parts that still need improvement which I will do in next posts. In this post, I am going to show different R charts that can be used in power BI and when we should used them for what type of data, these are Facet jitter chart, Pie chart, Polar Scatter Chart, Multiple Box Plot, and Column Width Chart. I follow the same process I did in Post 1 and Post 2. I just change the R scripts  and will explain how to use these graphs

Leila includes several examples of chart types and shows that it’s pretty easy to get this working.

Naming Graph Edges

Greg Low is trying to find a common nomenclature for edges in graphs:

Positive (Forward) Direction

I’d also like to see the tables use a forward direction naming rather than reverse (like “Written By”). So perhaps:

($from_id) the member Wrote the post ($to_id)

($from_id) who Likes who/what ($to_id)

($from_id) the reply to the main post RepliesTo the main post ($to_id)

Avoid passive voice.  That’s good advice in general.

Maintenance Plans In SQL Server 2016

Kendra Little describes some changes to maintenance plans in SQL Server 2016:

Working with maintenance plans is supposed to be easy, but I find it to be quite difficult.

In part, this is because they can often be buggy. To write this post today, I had to go back and install SSMS 16.5, because I wasn’t able to configure logging or change some aspects about my test maintenance plan in SSMS 17. (I use case sensitive instances, and this bug also impacts things like the maintenance plan log dialog box.)

And in part this is because the documentation for maintenance plans doesn’t tend to be as clear as the documentation for TSQL commands. So in the interest of saving other folks time, I wanted to share what I learned about the Rebuild Index Task, Reorganize Index Task, and Update Statistics Task in SQL Server 2016.

Though if you’re reading this, you probably already have a better solution than maintenance plans…

Database Connection Leaks

Michael J. Swart explains how to find database connection leaks:

So, if your application experiences connection timeouts because of a database connection leak, the stack traces may not help you. Just like an out-of-memory exception due to a memory leak the stack trace has information about the victim, but not the root cause. So where can you go to find the leak?

Even though database connection leaks are a client problem, you can find help from the database server. On the database server, look at connections per process per database to get a rough estimate of the size of each pool:

This is a good thing to remember, particularly if you have a busy system.

Interactive CallBimlScript

Ben Weissman introduces a feature coming to BimlExpress:

So far, there wasn’t much you could do but either replicate a lot of logic, parse the XML returned, use countless annotations or have many many different versions of your callee.

All of these options aren’t too appealing, right?

But: help is here! In addition to the known CallBimlScript, you can now use: CallBimlScriptWithOutput! It allows you to make use of a dynamic object to be returned by the CallBimlScript (in addition to the Biml code) which effectively means: you can return any kind of information back to the caller.

I can see this being useful for debugging and for centralizing flow logic a little bit better.  Click through for a sample script.

Categories

July 2017
MTWTFSS
« Jun  
 12
3456789
10111213141516
17181920212223
24252627282930
31