Quantcast
Channel: MSSQL – Kenneth Dalbjerg
Browsing latest articles
Browse All 22 View Live

msSQL Session running on database

To see witch session id, that run command against a database, you can run this:

View Article


Monitoring a Automatic Seeding in msSQL Always on Availability Groups

This command, can be run on both the primary and secondary node.

View Article


mssql get the backup information with copy_only information.

I need to find a way to see if the backup chain where broken. On my search I found this could script, created by “hot2use”I have found this script on a...

View Article

Implement SQL Server Agent Jobs with AlwaysOn Availability Groups

The function I use fn_hadr_group_is_primary from this post is a UDF (User Defined Function) that we create in the master database. The function gets an Availability Group name as an input parameter and...

View Article

MSSQL – check that the Agent Job have been run as Schedule

I have this problems, that if a schedule inside a Agent job, have not been started for some reason, there will be no errors about this problem. So Í have created this script, that...

View Article


MSSQL database roles get all securables – Full script out the Database Roles

Thanks for the script to John Eisbrener – Check for new version here: https://dbaeyes.wordpress.com/2013/04/19/fully-script-out-a-mssql-database-role/

View Article

SQL – Check with statements that are blocked

You can check which statements are blocked by running this

View Article

MSSQL Backup History Query

To see MSSQL history Query, run this SQL query. It will show all backups between the 1 january 2021 and 1 february 2021, order by Database and then Last backup time. It will also...

View Article


MSSQL – Always On availability group – Get sync status

If you wan to know the sync status of a always On availability group database replication, this command can be used:

View Article


MSSQL – See status of running jobs

If you ever need to see the status of a running jobs, this TSQL can be very helpfull

View Article
Browsing latest articles
Browse All 22 View Live