• 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.