Giter Club home page Giter Club logo

sqldba-ssms-solution's Introduction

SQLDBA-SSMS-Solution

This is SQL Server Management Solution containing various projects having SQL scripts to help DBA in carrying out daily activities.

Donation

If this project help you reduce time to develop, you can give me a cup of coffee :)

PayPal UPI
paypal upi

Below are some highlights:-

1. Backup-Restore

This project contains Scripts for SQL Server Instance/Database migration. Following are the files:-

1) Generate - Backup Script.sql                                 
2) Script Out DB Permissions in case of DB Refresh.sql          
3) Generate - Restore Script.sql                                
4) Script Out DB_Owner from Source.sql                          
5) Set Compatibility Level as per Model.sql                     
6) Execute CheckDB _ UpdateStats for Migrated DBs.sql           
7) Copy Latest Full backup to Location - Reading BackupFile.sql 
7) Copy Latest Full backup to Location - Using BackupHistory.sql
8) Fix Orphan Logins for All DBs.sql                                     
Query - Backup History.sql                                      
Query - Restore History.sql 

2. BlitzQueries

This project contains script files that can be used for Health Checkup or Performance Troubleshooting of SQL Server. File Other queries.sql within this project contains TSQL code to find variety of informations like:-

- Check when SQL Services were started
- Check if compatibility Model of databases are up to date
- Ad hoc queries, and m/r settings
- Find queries using DBCC commands inside them
- Find Most Expensive Queries
- Top Queries by Average IO
- Expensive Queries Having Cursor
- Expensive Queries Having Joins to Table-Valued Functions
- Queries with implicit conversion
- Adhoc queries against Database
- Find queries with multiple plans
- Query to examine IO subsystem latencies
- Active tables without clustered index
- Find tables with forwarded records on Single Database
- Find tables with forwarded records on All Databases
- Find Query with Compilation Timeout
- Find all disabled indexes
- Get Cumulative Waits on Server
- Find Un-trusted Foreign Keys
- Find Usage Stats for Table and Indexes

It also contains scripts for finding WhatIsRunning and also modified version of sp_WhoIsActive. Screenshot for WhatIsRunning.sql:-

Screenshot for modified versin of who_is_active_v11_30:-

3. [sp_HealthCheck]

This project contains a procedure named [sp_HealthCheck] This procedure gives currently running queries, CPU and Memory usage, Usage of Data & Log Volumes, Space utilization of data/log files, Lead Blockers, and session details performing Backup/Restore/Rollback.

4. Custom Log Shipping Script

Log Shipping has many benefits and is often used a Disaster Recovery option. But, If you use Domain Account for SQL Services, then Log Shipping using Custom scripts could be established in much easier way than the default log shipping method. For this purpose, I have created by own Log Shipping procedure [dbo].[usp_DBAApplyTLogs]

Latest Code of [usp_DBAApplyTLogs]

To learn on how to use this script, please watch below YouTube video:-

Watch this video

sqldba-ssms-solution's People

Contributors

imajaydwivedi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.