Archives: April 2017
I was chatting on the SQL Community Slack with my friend Sander Stad b | t about some functions he is writing for the amazing PowerShell SQL Server Community module dbatools. He was asking my opinion as to how to enable user choice or options for Agent Schedules and… Read more
Just a short post today. When you open a new file in VS Code (Using CTRL + N) it opens by default as a plain text file.
To change the language for the file use CTRL +K, M.
That’s CTRL and K together and then M afterwards separately.
then you… Read more
That looks cool. Twitter in VS Code, one less programme to open Here how it works
Open VS Code and hit CTRL + P and type ext install twitter or hit CTRL + SHIFT +… Read more
Last week I was showing a co-worker some PowerShell code and he asked what the editor was that I was using. Visual Studio Code I said. Why do you use that? What does it do?
This is what I showed him
Runs on any Operating System
Code (as I shall… Read more
WARNING – Contains Orange and light-hearted photos
I have returned home from SQLBits 2017 The Disco Edition. I am exhausted, my body is pointing out to me in a variety of ways that this is the only week of the year that I spend so much time on my feet.… Read more
There are times when DBA’s are required to export database user permissions to a file. This may be for a number of reasons. Maybe for DR purposes, for auditing, for transfer to another database or instance. Sometimes we need to create a new user with the same permissions as another… Read more
A good security practice is to backup our SQL Servers to a network share but not allow users to be able to browse the share. How can we ensure that our SQL Server has access or test it if it has been set up by someone else?
Lets set this… Read more
SQL Server uses identity columns to auto generate values, normally keys. When you create an identity column, it has a data type and that data type has a maximum number of values.
- BigInt 9,223,372,036,854,775,808
- Int 2,147,483,647
- SmallInt 32,767
- tinyint 255
What happens when you try to insert a value in… Read more
In my last post I showed Get-DbaLastGoodCheckDb from dbatools. This module is a community based project written by excellent, brilliant people in their own time and available to you free. To find out more and how to use and install it visit https://dbatools.io
In a similar fashion to my post… Read more
As good SQL Server DBA’s we want to ensure that our databases are regularly checked for consistency by running DBCC CheckDB. This will be frequently scheduled using an Agent Job or by using Ola Hallengrens Maintenance Solution
We can check for the last known good DBCC Check using the undocumented… Read more
If your server collation is different to your database collation then you may find that you get an error similar to this
Cannot resolve the collation conflict between “SQL_Latin1_General_CP1_CI_AS” and “Latin1_General_CI_AS” in the equal to operation.
when your queries use the tempdb
It would be useful to be able to… Read more
Whilst I was writing my Test-DbaLastBackup Posts I ran into a common error I get when importing datatables into a database
I was using this table
and when I tried to add the results of the Test-DbaLastBackup I got this
Exception calling “WriteToServer” with “1” argument(s): “The given value of…