SQL Server Metadata using Powershell
If you are new at your job or a new client you would like to gather and review the sql server meta data to understand the environment and get...
2019-08-01 (first published: 2019-07-10)
651 reads
If you are new at your job or a new client you would like to gather and review the sql server meta data to understand the environment and get...
2019-08-01 (first published: 2019-07-10)
651 reads
This is a simple powershell script to query and display hardware and OS information from a remote computer.It uses CIM (Common Information Model) that is available since Powershell version...
2019-07-23
2,701 reads
At one of my clients I received an email from one of the IT Project Managers asking a simple question:"Can you please let us know which databases reside on...
2019-07-18 (first published: 2019-07-03)
14,059 reads
I realize that this is a bit of a lengthy script for something that you can use a one liner in the power shell:
Example:
Get-ADUser
But I needed to highlight certain properties of given user and take certain actions based on the values. And the result is this power shell script.
2019-07-15 (first published: 2019-07-02)
1,290 reads
You may have situations where the CPU % usage is well below the alert threshold but still queries are running slow because they are waiting for CPU to be...
2019-07-11
102 reads
Most of the times I use the CSV files whenever I need to import or export SQL Server data. And then if I need to do further analysis on...
2019-07-11
4,220 reads
I should start off by mentioning that this post is applicable to sql server versions 2012 and up. If you have an older version of sql server, the solution...
2019-07-09 (first published: 2019-06-26)
1,854 reads
This is actually part 2 of a process I am creating to automatically discover SQL Server instances in an Active Directory domain. So there will be a series of...
2019-06-28
7,591 reads
First, some blah... blah... blah...
By default when a primary key constrained is created on a table/view, SQL Server automatically creates a unique clustered in order to enforce it. And...
2019-06-27
81 reads
I was at a client where they are using non-Microsoft clustering technology to achieve the high availability of SQL Server instances....
2019-06-26 (first published: 2019-06-13)
1,750 reads
By Steve Jones
I use ConEmu for my terminal interface. I’m still on Windows 10 at home,...
Creating a Fabric workspace takes about 30 seconds. Restructuring workspaces after people have built...
By Steve Jones
It’s a small change, but a handy one. Flyway Desktop (FWD) now includes the...
Comments posted to this topic are about the item Adding new column with DEFAULT...
Comments posted to this topic are about the item Advanced Deployment Scenarios: Stairway to...
Comments posted to this topic are about the item You Need a DBA Pipeline
Which number did the two COUNT(*) return:
DROP TABLE IF EXISTS #tmp CREATE TABLE #tmp (id INT NOT NULL) INSERT INTO #tmp (id) SELECT gs.value FROM GENERATE_SERIES(1, 5) AS gs ALTER TABLE #tmp ADD my_value INT NOT NULL CONSTRAINT df_tmp_my_value DEFAULT 1 SELECT COUNT(*) FROM #tmp AS t WHERE my_value = 1 ALTER TABLE #tmp DROP CONSTRAINT df_tmp_my_value ALTER TABLE #tmp ADD CONSTRAINT df_tmp_my_value DEFAULT 2 FOR my_value SELECT COUNT(*) FROM #tmp AS t WHERE my_value = 1See possible answers