Sherbaz

SherLabs Engineering. Knowledgebase on Tech & Hobbies

Skip to content
Menu
  • Home
  • About me
  • TV
  • Top Questions
    • Most Wanted

Tag: SQL Server

Database MailPosted onJune 10, 2013

Quick queries to Troubleshoot Database Mail in SQL Server

Use below queries one by one and hopefully, you will be able to find and fix your Database Mail issue. sysmail_help_queue_sp @queue_type = ‘Mail’ select…

Read More
Index MaintenancePosted onJune 10, 2013June 10, 2013

Resumable Auto-Index Rebuild and Reorganize Script

As part of SQL server database maintenance, the indexes have to be defragmented on regular basis by rebuild or reorganize for consistant performance. Most of…

Read More
Index MaintenancePosted onJuly 3, 2012June 20, 2013

Code: Find missing indexes

Below query will be helpful in finding all missing indexes in a database. I got this query from one of my friend. I am not…

Read More
SQL ServerPosted onMarch 21, 2012March 21, 2012

Tip: Rename a live production database.

I had a requirement from application team that I should rename a database when the application is running and the transactions were happening. The reason…

Read More
SQL ServerPosted onMarch 19, 2012March 19, 2012

Workaround: Control SQL Agent Job Steps based on query outcome.

Below workaround will help you incase if you wanna control SQL agent job steps based on a SQL query output. For eg: Suppose you have…

Read More
SQL ServerPosted onMarch 16, 2012March 16, 2012

Read Disk Read/ Write for all databases in an instance and Sort them

Below Query will help you read live file level Disk read and write information. WIll behandy for performance tuning capacity planning. select db.name,files.filename,* from sys.dm_io_virtual_file_stats(NULL,…

Read More
SQL ServerPosted onJanuary 26, 2012August 5, 2015

Access Denied error while attaching the database files moved from Windows 2003 server to the new SQL instance on Windows 2008

Issue It’s quite common that we use detach-attach method to migrated SQL server databases from Windows Server 2000 or 2003 to Windows server 2008. During…

Read More
Interview QuestionsPosted onJanuary 7, 2012December 31, 2013

Interview Questions: SQL Server DBA

 Questions Explain SQL Server Failover Clustering? How do we check index Fragmentation? TSQL syntax for Index rebuild and reorg. Difference between the two. How users…

Read More
SQL ServerPosted onDecember 20, 2011May 22, 2012

Automatically Rebuild or Reorg index based on fragmentation

The Attached SQL Query can be safely used for rebuilding or reorganizing all indexes in a particular database based on the fragmentation level. Note: The…

Read More
SQL ServerPosted onNovember 18, 2011January 7, 2012

Executing CHECKDB on all user databases via TSQL

Run below Query. And once the query executes completely, go through the SQL Server Error log to see the results. declare databases cursor for select…

Read More

Posts pagination

Previous Page Page 1 Page 2 Page 3 Next Page

Hire me !

I am Available  on Direct Hire

Categories

  • MongoDB (1)
  • PHP (2)
  • Products (2)
  • Puzzles (1)
    • Rubik's Cube (1)
  • Random Posts (1)
  • Software Development (1)
  • SQL Server (48)
    • Always-on (1)
    • Backup & Restore (1)
    • Data purge (2)
    • Database corruption (1)
    • Database Mail (1)
    • Failover Cluster (2)
    • Index Maintenance (5)
    • Interview Questions (2)
    • Partitioning (1)
    • Performance Tuning (10)
    • Replication (1)
    • Reporting Services (1)
    • Security (3)
    • Tools (1)
  • Unix (1)
  • Wintel (8)
    • AD (1)
    • Remote (1)
    • VMware (1)
    • Windows 2012 (2)
  • Wordpress (1)

Archives

Tags

active directory Alerting Automation batch operation BigFix BigFix action script bulk cascade CHECKDB Cluster connected table Database Attach Database Health Check Database Mail delete dependency deprecated Failover Cluster fixlet foreign keys gMSA Index Defragmentation Index Maintenance Index Rebuild Index Reorganize linux LVM Migration Monitoring Performance Tuning php powershell purge Puzzle Rubik's Cube Security sp_depends SQL Server SQL Server 2012 SQL Server 2014 SQL Server Licensing Storage Tricks ubuntu update

Recent Posts

  • BigFix Action Script for SQL Server and Powershell
  • Data purge on Connected Tables – Part 2 (With Filter)
  • Generate DB Attach Script in TSQL
  • Data purge on Foreign key connected tables
  • SQL Server Failover Cluster with Managed Service Account (MSA) – Step by step walk-through and troubleshooting until successful

Pages

  • About me
  • Top Questions
    • Most Wanted
  • TV

Recent Comments

  • Publication properties: Immediate_Sync and allow_anonymous – Database knowledge (MS SQL Server…) on Replication – Adding New Article without Generating Snapshot – By Nideesh
  • dileep on Auto restore multiple databases in One shot using powershell
  • dileep on Auto restore multiple databases in One shot using powershell
  • Sherbaz on Auto restore multiple databases in One shot using powershell
  • dileep on Auto restore multiple databases in One shot using powershell

My Web Works

  • SplitExpense.in Free Online Easy expense share + track tool ! This is a smartphone version and its desktop edition is available at https://splitexpense.in/desktop
  • Zonik India Pvt Ltd

Categories

June 2025
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
2930  
« Sep    
© Copyright 2025 – Sherbaz
Allium Theme by TemplateLens ⋅ Powered by WordPress