A particular SQL instance has been removed and the historical performance data is no longer needed. How do I remove it from the repository database?
Quest cannot be held responsible for the unwanted loss of data as a result of the unsupervised use of the following script and stored procedures. Please ensure that all necessary precautions are taken with regards to backing up the Repository data prior to using the script.
Please use the attached script and the following instructions:
Edit the attached purge_repository_data.sql script: /* Substitute '<INSTANCE_NAME>' with your 'instancename' etc. '<HOSTNAME>' with the hostname.
declare @instance_name varchar(40)
declare @host varchar(64)
declare @inst_key int
declare @num_of_work_times int
set @instance_name = '<INSTANCE_NAME>'
set @host = '<HOSTNAME>'
select @inst_key = INSTANCE_KEY from QUEST_INSTANCE_DIM where INSTANCE_NAME = @instance_name and HOST = @host
while exists (select * from QUEST_INSTANCE_DIM where INSTANCE_KEY = @inst_key)
exec SC_MSSQL_DROP_ALL @inst_key, @num_of_work_times
exec CM_MSSQL_DROP_ALL @inst_key, @num_of_work_times