Database Space Capacity Planning

  • SumonB

    Old Hand

    Points: 350

    Adding Some more details.. there are the databases with the same name for different servers.

  • Knivethait

    Grasshopper

    Points: 17

    Hi

    Its really a good stuff , but could you tell about the powershell script how it works? because while executing the Write-DbSpaceToDb.ps1 am getting error like

    Exception calling "Fill" with "1" argument(s): "Invalid object name 'server_space_lku'."

    At D:\spaceanalysis\SpaceAnalysis\SpaceAnalysis\Write-DbSpaceToDb.ps1:27 char:19

    + [void]$da.fill <<<< ($dt)

    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException

    + FullyQualifiedErrorId : DotNetMethodException

    Please please help me with this

    Thanks

    Nivetha

  • DBA2015

    SSC Enthusiast

    Points: 100

    I am getting this error:

    A job step received an error at line 83 in a PowerShell script. The corresponding line is 'foreach {'. Correct the script and reschedule the job. The error information returned by PowerShell is: 'Exception calling "WriteToServer" with "1" argument(s): "Violation of PRIMARY KEY constraint 'PK_db_space'. Cannot insert duplicate key in object 'dbo.db_space'. The duplicate key value is (****\***, _DB, R:\DB.mdf, Feb 10 2011 12:00AM). The statement has been terminated." Violation of PRIMARY KEY constraint 'PK_db_space'. Cannot insert duplicate key in object 'dbo.db_space'. The duplicate key value is (****\***, DB, R:\DB.mdf, Feb 10 2011 12:00AM). The statement has been terminated. '. Process Exit Code -1. The step failed.

    I assume this is because we cannot run this more than once on a day. But what if we added a new instance to monitor. Is there a way to rather replace any existing data so that the job continues.

Viewing 3 posts - 91 through 93 (of 93 total)

You must be logged in to reply to this topic. Login to reply