Scripts

Technical Article

Post SQL Server Installation steps with PowerShell

I bet, each DBA would change some settings after the SQL Server installation as per their company standard . I wrote this PowerShell script for one of my client who has below standards: Port should be 1433, static Disable SQL telemetry* & SQLWriter services Change recovery model to FUll for all databases except tempdb and […]

5 (2)

You rated this post out of 5. Change rating

2020-07-02 (first published: )

2,521 reads

Technical Article

move db files to different location dynamically

Lately, I'm dealing with lots of DB migrations and came across situation that I have no proper dynamic script to move DB files to different location. There are an option to proceed manually scripting one by one DB and execute it. Another option is detach attach DB - I'm not a big fan of this […]

3 (2)

You rated this post out of 5. Change rating

2020-07-01 (first published: )

1,717 reads

Technical Article

Insert Multiple Rows

Insert multiple rows in the table using insert syntax which is the same as single insert rows. So, we have to use value likewise, single rows than there is the same process but include coma and insert the value of another row in your query. In this paragraph, we were given a syntax with insert […]

You rated this post out of 5. Change rating

2020-06-29

1,234 reads

Technical Article

How to register SPN for SQL service account

Check if the SPN is already registered: setspn -l domain\xxxxx If not, run below commands: setspn -A MSSQLSvc/abc.xx.companyname.com:1433 domain\xxxxx setspn -A MSSQLSvc/abc.xx.companyname.com domain\xxxxx setspn -A MSSQLSvc/abc:1433 domain\xxxxx setspn -A MSSQLSvc/ abc domain\xxxxx   Verify again, setspn -l domain\xxxxx

5 (1)

You rated this post out of 5. Change rating

2020-06-17 (first published: )

6,758 reads

Technical Article

SQL Service account status with PowerShell

One of my client has the requirement to have SQL Service account running with domain account and should not be with local account. You may receive SSPI error after changing it to domain account. In order to fix that issue check my previous blog "How to register SPN for SQL service account" Output:

5 (1)

You rated this post out of 5. Change rating

2020-06-17

954 reads

Technical Article

Monitor basic Database parameters like Recovery Model, Page Verify, Auto Close, Auto Shrink, DB Owner, Auto Create Statistics Enabled, DB Create Date etc with PowerShell command.

I have created this script for one of our client, the requirement was all the databases should be in full recovery model and should be monitored. Also, I added other important parameters like AutoShrink, AutoClose etc. Output:

5 (2)

You rated this post out of 5. Change rating

2020-06-16

1,030 reads

Technical Article

Getting more info about who or what connect to your SQL Server

A couple of days ago I was playing with my small SQL Server enviroment (test) and auditting login events. I went ahead and created the audit for FAILED_LOGIN_GROUP and SUCCESSFULL_LOGIN_GROUP (let it run for a while). USE [master] GO CREATE SERVER AUDIT [Audit_LoginEvents] TO FILE ( FILEPATH = N'<PathToStoreData>' ,MAXSIZE = 100 MB ,MAX_FILES = […]

You rated this post out of 5. Change rating

2020-06-03 (first published: )

1,763 reads

Blogs

Part 2: The Modern Azure Data Warehouse – ADF and ADLS

By

In today’s data-driven world, having the right tools to manage and process large datasets...

A New Word: Flichtish

By

flichtish – adj. nervously aware how much of your self-image is based on untested...

Automating Container Image Builds with Docker Build Cloud and Github Actions

By

In a previous post we went through how to use Docker Build Cloud to...

Read the latest Blogs

Forums

Backup with Checksum Show No Issues, While DBCC CHECKDB Reports Errors

By IT researcher

I took a backup with the CHECKSUM option, which was successful and showed no...

Realities of Predictive Analysis

By Louis Davidson (@drsql)

Comments posted to this topic are about the item Realities of Predictive Analysis

Linked Server Product Name?

By Brandie Tarvin

Just came across something weird. Was wondering if anyone else has ever seen this....

Visit the forum

Question of the Day

Creating Statistics on XML

I have a table in SQL Server 2022 that is an XML data type. I have an index on this column and want to create statistics using CREATE STATISTICS for some of the data in the column. What should I do?

See possible answers