Groupe des Utilisateurs Altiris Suisses et Francophones Group

 View Only

Comment réduire la taille d'une base de données Altiris avec des historiques en débordements... ? 

Jun 22, 2010 11:46 AM

Si vous avez l'impression que votre CMDB Altiris est trop grourmande en disque, par rapport au nombre de PC/systèmes en gestion, alors essayer donc d'importer ce rapport:

  • How can I get a report that determines the database table sizes per solution? KB 30567 (cf xml du rapport NS v4.1 joint en attachement)

Les historiques peuvent être de gros consommateurs d'espace disque sur votre base SQL.

Ceci est particulièrement vrai avec la version NS6 (Notification server 6), car les historiques conservent toutes les données après chaque collecte, même si elles restent constantes !
De plus, il faut configurer une durée dans le temps, sans limite sur le nombre d'enregistrements, ou bien en taille ! angry
Ainsi, à cause de quelques cases à cocher dans la configuration des historiques, vous pouvez vous retrouver avec une base de plusieurs dizaine de GB, voir plus :

  • Normalement: 2GB + 1GB par 100 PCs pour un CMS 6 standard, est une dimension relativement courante.
La solution est donc, de supprimer ces historiques en général, peu utilisé, et ne conserver que les plus utiles, par exemple:
  • InvHist_AeX_OS_Add_Remove_Programs
  • InvHist_AeX_AC_Identification
  • InvHist_AeX_AC_Client_Agent
Pour le reste,  après la désactivation, l'espace ne va pas être récupéré pour autant.
Il est alors nécessaire de réaliser un "TRUNCATE" des tables impliquées...
Lesquelles sont les bonnes ? Les mauvaises ?
C'est facile à déterminer, mais c'est très long et fastidieux à construire.
Alors Girard-Perregaux/Sowind vous offre le travail réalisé sous forme d'un joli "copier/coller" avec toutes les tables "sûres", que nous avons testé pour vous ;-)

Mode opératoire:
  1. Sauvegarder votre base de données (avant de prendre le risque de la casser, comme tout le monde, nous déclinons toutes responsabilités etc...;-)
  2. Ouvrir un script SQL sur la base "Altiris" (new request, depuis SQL management Studio, sur la base du serveur Altiris, nommée "Altiris" par défaut)
  3. Copier le contenu de la liste ci-dessous
  4. Coller dans le script
  5. Supprimer les tables dont vous souhaitez conserver les historiques (suggestion ci-dessus par exemple)
  6. Exécuter
  7. 2 secondes: 9GB de récupérés (dans notre cas 70% de l'espace utilisé).
  8. Faire un "Shrink" de votre base (réduire > la taille de la base de données)
enlightened Attention de penser à retirer de cette liste les historiques que vous souhaiteriez conserver.

Voici le script épuré des principales tables après avoir exclu les tables à éviter de purger (toutes contrôlées, mais si vous remarquez un oubli, ou une table à éviter, merci de nous le dire...:)
10 GB, c'est pas énorme de nos jours, mais c'est pas la peine de les sauvegarder et de ralentir les systèmes inutilement ;-)
Bien à tous.

TRUNCATE TABLE InvHist_AeX_AC_Client_Agent
TRUNCATE TABLE InvHist_AeX_AC_Client_Connectivity
TRUNCATE TABLE InvHist_AeX_AC_Identification
TRUNCATE TABLE InvHist_AeX_AC_Inventory_Results
TRUNCATE TABLE InvHist_AeX_AC_Location
TRUNCATE TABLE InvHist_AeX_AC_Machine_Usage
TRUNCATE TABLE InvHist_AeX_AC_NT_Services
TRUNCATE TABLE InvHist_AeX_AC_Primary_User
TRUNCATE TABLE InvHist_AeX_AC_Roles
TRUNCATE TABLE InvHist_AeX_AC_TCPIP
TRUNCATE TABLE InvHist_AeX_DB_MDAC
TRUNCATE TABLE InvHist_AeX_DB_ODBC_Drivers
TRUNCATE TABLE InvHist_AeX_DB_SQL_Server
TRUNCATE TABLE InvHist_AeX_HW_BIOS
TRUNCATE TABLE InvHist_AeX_HW_CPU
TRUNCATE TABLE InvHist_AeX_HW_Disk_Space_Usage
TRUNCATE TABLE InvHist_AeX_HW_Logical_Disk
TRUNCATE TABLE InvHist_AeX_HW_Logical_Disk_Changes
TRUNCATE TABLE InvHist_AeX_HW_Memory
TRUNCATE TABLE InvHist_AeX_HW_Memory_Changes
TRUNCATE TABLE InvHist_AeX_HW_Memory_Modules
TRUNCATE TABLE InvHist_AeX_HW_Modems
TRUNCATE TABLE InvHist_AeX_HW_Monitor
TRUNCATE TABLE InvHist_AeX_HW_Mouse
TRUNCATE TABLE InvHist_AeX_HW_NetWork_Cards
TRUNCATE TABLE InvHist_AeX_HW_PCI_Bus
TRUNCATE TABLE InvHist_AeX_HW_PCMCIA_Devices
TRUNCATE TABLE InvHist_AeX_HW_Physical_Disk
TRUNCATE TABLE InvHist_AeX_HW_Printer
TRUNCATE TABLE InvHist_AeX_HW_SCSI
TRUNCATE TABLE InvHist_AeX_HW_Serial_Number
TRUNCATE TABLE InvHist_AeX_HW_SMBIOS
TRUNCATE TABLE InvHist_AeX_HW_USB_Bus
TRUNCATE TABLE InvHist_AeX_HW_Video
TRUNCATE TABLE InvHist_AeX_HW_Video_Monitor
TRUNCATE TABLE InvHist_AeX_OS_ACLs
TRUNCATE TABLE InvHist_AeX_OS_Add_Remove_Programs
TRUNCATE TABLE InvHist_AeX_OS_Admin_Group
TRUNCATE TABLE InvHist_AeX_OS_AT_Scheduler
TRUNCATE TABLE InvHist_AeX_OS_Audit_Policy
TRUNCATE TABLE InvHist_AeX_OS_Desktop
TRUNCATE TABLE InvHist_AeX_OS_IIS
TRUNCATE TABLE InvHist_AeX_OS_Internet_Explorer
TRUNCATE TABLE InvHist_AeX_OS_Memory_Management
TRUNCATE TABLE InvHist_AeX_OS_Network_Provider
TRUNCATE TABLE InvHist_AeX_OS_Network_Shares
TRUNCATE TABLE InvHist_AeX_OS_Operating_System
TRUNCATE TABLE InvHist_AeX_OS_Provider_Order
TRUNCATE TABLE InvHist_AeX_OS_Quick_Fix_Engineering
TRUNCATE TABLE InvHist_AeX_OS_Results
TRUNCATE TABLE InvHist_AeX_OS_System
TRUNCATE TABLE InvHist_AeX_OS_System_Devices
TRUNCATE TABLE InvHist_AeX_OS_Task_Scheduler
TRUNCATE TABLE InvHist_AeX_OS_TCPIP_Changes
TRUNCATE TABLE InvHist_AeX_OS_Time_Zone
TRUNCATE TABLE InvHist_AeX_OS_User_Profiles
TRUNCATE TABLE InvHist_AeX_OS_Win16_Subsystem
TRUNCATE TABLE InvHist_AeX_OS_Windows_NT
TRUNCATE TABLE InvHist_AeX_Srv_Components
TRUNCATE TABLE InvHist_AeX_Srv_DHCP
TRUNCATE TABLE InvHist_AeX_Srv_DHCP_Options
TRUNCATE TABLE InvHist_AeX_Srv_DNS_Zone
TRUNCATE TABLE InvHist_AeX_Srv_Exchange_Mailbox_Store
TRUNCATE TABLE InvHist_AeX_Srv_Exchange_Server
TRUNCATE TABLE InvHist_AeX_Srv_Exchange_Sites
TRUNCATE TABLE InvHist_AeX_Srv_Exchange_Users
TRUNCATE TABLE InvHist_AeX_Srv_IIS_Application_Pools
TRUNCATE TABLE InvHist_AeX_Srv_IIS_FTP_Site_Details
TRUNCATE TABLE InvHist_AeX_Srv_IIS_Status
TRUNCATE TABLE InvHist_AeX_Srv_IIS_Web_Service_Extensions
TRUNCATE TABLE InvHist_AeX_Srv_IIS_Web_Site_Details
TRUNCATE TABLE InvHist_AeX_Srv_MS_SQL_Server
TRUNCATE TABLE InvHist_AeX_Srv_MS_SQL_Server_Databases
TRUNCATE TABLE InvHist_AeX_Srv_MS_SQL_Server_Logins
TRUNCATE TABLE InvHist_AeX_Srv_MS_SQL_Server_Processors
TRUNCATE TABLE InvHist_AeX_Srv_MS_SQL_Server_Replication
TRUNCATE TABLE InvHist_AeX_Srv_MS_SQL_Server_Startup_Parameters
TRUNCATE TABLE InvHist_AeX_Srv_MS_SQL_Server_Transaction_Logs
TRUNCATE TABLE InvHist_AeX_Srv_Network_NIC_Count
TRUNCATE TABLE InvHist_AeX_Srv_Network_NIC_Details
TRUNCATE TABLE InvHist_AeX_Srv_SCSI_Controllers
TRUNCATE TABLE InvHist_AeX_Srv_System_DSN
TRUNCATE TABLE InvHist_AeX_Srv_VMWare_Client_Count
TRUNCATE TABLE InvHist_AeX_Srv_VMWare_Client_Hard_Disks
TRUNCATE TABLE InvHist_AeX_Srv_VMWare_Client_Power_Settings
TRUNCATE TABLE InvHist_AeX_Srv_VMWare_Clients
TRUNCATE TABLE InvHist_AeX_SW_AClient
TRUNCATE TABLE InvHist_AeX_VirtualMachine
TRUNCATE TABLE InvHist_Applicable_Microsoft_Software_Update
TRUNCATE TABLE InvHist_Computer_Type_Details
TRUNCATE TABLE InvHist_Distribution_Groups
TRUNCATE TABLE InvHist_Global_Active_Directory_Details
TRUNCATE TABLE InvHist_Global_User_General_Details
TRUNCATE TABLE InvHist_Global_Windows_Users
TRUNCATE TABLE InvHist_Identity
TRUNCATE TABLE InvHist_Import_Rule_Imported_Items
TRUNCATE TABLE InvHist_Installed_Microsoft_Software_Update
TRUNCATE TABLE InvHist_Manufacturer
TRUNCATE TABLE InvHist_Microsoft_Service_Pack
TRUNCATE TABLE InvHist_Microsoft_Software_Release
TRUNCATE TABLE InvHist_OU_Membership
TRUNCATE TABLE InvHist_Ownership_Details
TRUNCATE TABLE InvHist_PM_Severity_Rating
TRUNCATE TABLE InvHist_PM_Update_Prerequisite_Collection
TRUNCATE TABLE InvHist_Power_Consumption
TRUNCATE TABLE InvHist_Provider_Reference
TRUNCATE TABLE InvHist_Rack_Units
TRUNCATE TABLE InvHist_Serial_Number
TRUNCATE TABLE InvHist_Service_Pack
TRUNCATE TABLE InvHist_Software_Bulletin
TRUNCATE TABLE InvHist_Software_Component
TRUNCATE TABLE InvHist_Software_Update
TRUNCATE TABLE InvHist_Software_Update_Installation_Type
TRUNCATE TABLE InvHist_Software_Update_Recommended_Commandline
TRUNCATE TABLE InvHist_Subnet
TRUNCATE TABLE InvHist_Synch_Status
TRUNCATE TABLE InvHist_Windows_Operating_System
TRUNCATE TABLE InvHist_Windows_Service_Pack
TRUNCATE TABLE InvHist_Windows_Software_Release

Statistics
0 Favorited
0 Views
1 Files
0 Shares
0 Downloads
Attachment(s)
xml file
Altiris_database_table_sizeV4_1.xml   8 KB   1 version
Uploaded - Feb 25, 2020

Tags and Keywords

Related Entries and Links

No Related Resource entered.