Giter Site home page Giter Site logo

imajaydwivedi / space-capacity-automation Goto Github PK

View Code? Open in Web Editor NEW
13.0 3.0 2.0 11.82 MB

This automation has been designed to eliminate manual efforts on Space Capacity ESC tickets where DBA has to add new data or log files on new volume, and restrict data or log files on old volume. Apart from this, this procedure can be used for variety of tasks related to capacity management.

License: MIT License

TSQL 100.00%
data-files log-files sql-server sql-server-database space-capacity tsql disk-space files-folders restrict-file-growth automation

space-capacity-automation's People

Contributors

imajaydwivedi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

space-capacity-automation's Issues

Error while executing the script to modify tempdb files

@imajaydwivedi

In the first place this script is really awesome and safe. Couldn't imagine the work behind developing this. almost of the features are working as expected and posting below to let you know the issue I have faced. Also attached the screen shot of Verbose

After executing the function
EXEC tempdb..[usp_AnalyzeSpaceCapacity] @expandTempDBSize = 1 ,@output4IdealScenario = 1

I get error "Arithmetic overflow error for data type tinyint, value = -3.". unable to solve this in the code. May you please help here to come out if it.
tempdb space calc issue_ verbose_output_1
tempdb space calc issue_1

@getVolumeSpaceConsumers - Add column [Depth]

Kindly make below modifications in resultset of @getVolumeSpaceConsumers:

  • Get size of files & folder in format "<size_in_kb>(size in gb/mb/kb)"
    This would help in sorting of the data in excel
  • Add a new column [Depth] to show depth of file or folder
  • Change column name [size] to [Size_DirectItemsOnly]
    This would contain size of all direct items (files only)
  • Add new column [Size_IncludingNestedChilds]
    This would contain size of all child items direct or indirectly nested for path
  • Issue# Some folder items are not showing size

getvolumespaceconsumers - depth

Performance Optimization

  • Analyze Query Plan for Each Feature
  • Check Indexing Strategy
  • Checks efficiency of Loops, Cursor, CTEs
  • Check Any re-compilation factor
  • Check usability of Statistics
  • Evaluate performance with #tempTable Vs @tableVariable
  • Reducing Code to remove any possibility of Blockings
  • Check Dynamic SQL efficient usage with sp_executesql
  • Check any kind of Execution Plan Warnings using Extended Events
  • Introduce Standardization of naming convention, data types
  • Check for Deprecated Features used in Automation(Take SQL2012 as Base Version)

Incorrect File Path for tempdb files with @expandTempDBSize

I am executing below code to get additional tempdb files, but code generated is not showing accurate file path.

EXEC tempdb..[usp_AnalyzeSpaceCapacity] @expandTempDBSize = 1, @tempDbMaxSizeThresholdInGB = 16, @output4IdealScenario = 1

image

@handleXPCmdShell - Not Working

This functionality is not working. Do the needful using Agent Job

  • Verify if xp_cmdshell is not enabled
  • Create a SQL Agent Job with TSQL code to enable xp_cmdshell configuration settings
  • Execute Job Created to enable cmdshell "Before" execution of main code
  • Execute Job Created to diable cmdshell "After" execution of main code
  • Drop SQL Job Created after execution of Parameters

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.