The System Change Detail tables are important for auditing and database performance. You can optimize the System Change Detail tables by eliminating redundant or obsolete records. This procedure helps optimize the performance of the database and CA Service Catalog.
Follow these steps:
select count(*) from usm_system_change_detail where old_value!=new_value
select count(*) from usm_system_change_detail where old_value=new_value
Complete the remaining steps if a significant number of obsolete records exist, especially If more obsolete records than useful records exist. Otherwise, skip the remaining steps and finish preparing the Catalog database and the DBMS.
Select * into usm_system_change_detail_temp from usm_system_change_detail where old_value!=new_value
Note: For detailed instructions to perform the backup, see your DBMS documentation. For a sample script that restores indexes and constraints, see the sample script for SQL Server that follows these steps.
Sample Script
The following sample script applies to SQL Server. This script backs up indexes and database constraints. You can use this script as a model for backing up the indexes and database constraints in Step 3a.
ALTER TABLE [dbo].[usm_system_change_detail] ADD CONSTRAINT [XPKusm_system_change_detail] PRIMARY KEY CLUSTERED ( [id] ASC, [name] ASC ) WITH ( PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON ) ON [PRIMARY]
ALTER TABLE [dbo].[usm_system_change_detail] WITH CHECK ADD CONSTRAINT [$usm_s_r00002c5700000000] FOREIGN KEY ( [id] ) REFERENCES [dbo].[usm_system_change] ([id])
ALTER TABLE [dbo].[usm_system_change_detail] CHECK CONSTRAINT [$usm_s_r00002c5700000000] ALTER TABLE [dbo].[usm_system_change_detail_ext] WITH CHECK ADD CONSTRAINT [$usm_s_r00002c6100000000] FOREIGN KEY ( [id], [name] ) REFERENCES [dbo].[usm_system_change_detail] ([id], [name])
ALTER TABLE [dbo].[usm_system_change_detail_ext] CHECK CONSTRAINT [$usm_s_r00002c6100000000]
You have optimized the System Change Detail tables. Next, finish preparing the Catalog database and the DBMS.
|
Copyright © 2013 CA.
All rights reserved.
|
|