Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| tma:pv:procedures:cestas_reduction_bdd [29/06/2018 16:07] – stephane.laforet | tma:pv:procedures:cestas_reduction_bdd [26/08/2020 09:14] (Version actuelle) – [PV_DB] thomas.perrin | ||
|---|---|---|---|
| Ligne 13: | Ligne 13: | ||
| ===== Suppression des données antérieures à... ===== | ===== Suppression des données antérieures à... ===== | ||
| - | ''Code « DELETE | + | Avant d'effectuer une opération de type DELETE |
| - | GO | + | SELECT TOP 10 * FROM [pv_db].[dbo].[MEA_INV] where dtol < ' |
| - | DELETE | + | GO\\ |
| - | GO | + | |
| - | DELETE FROM [pv_db].[dbo].[MEA_PBEMDel] where dtol < ' | + | |
| - | GO | + | |
| - | DELETE FROM [pv_db].[dbo].[MEA_PBEMAux] where dtol < ' | + | |
| - | GO | + | |
| - | DELETE FROM [pv_db].[dbo].[MEA_PVBox] where dtol < ' | + | |
| - | GO | + | |
| - | DELETE FROM [pv_db].[dbo].[MEA_FLD] where dtol < ' | + | |
| - | GO | + | |
| - | DELETE FROM [pv_db].[dbo].[MEA_GBEMDel] where dtol < ' | + | |
| - | GO »'' | + | |
| - | ===== Chapitre 1 ===== | + | |
| - | ==== Sous-chapitre 1 ==== | + | |
| - | **Gras** | + | |
| - | // | + | |
| - | __Soulignage__ | + | |
| - | '' | + | |
| - | < | + | |
| - | ==== Sous-chapitre 2 ==== | + | |
| - | ===== Chapitre 2 ===== | + | vous pouvez effectuer cette requête avec un order " |
| - | ==== Sous-chapitre 1 ==== | + | |
| - | ==== Sous-chapitre 2 ==== | + | Lorsque vous êtes certain de votre date de butée de suppression vous pouvez faire le DELETE : |
| + | DELETE FROM [pv_db].[dbo].[MEA_INV] where dtol < ' | ||
| + | GO\\ | ||
| - | Vous pouvez ajouter des notes de pied de page ((Ceci | + | Cette phase est à répéter pour toutes les table de la base PV_DB. Voici par exemple la suite de requètes ayant permis la suppression |
| - | ^ | + | DELETE FROM [pv_db].[dbo].[MEA_INV] where dtol < ' |
| - | | **Titre colonne 1** | + | GO\\ |
| - | |aligné gauche | + | DELETE FROM [pv_db].[dbo].[MEA_DCBox] where dtol < ' |
| - | | centre | + | GO\\ |
| - | | aligne droite| | + | DELETE FROM [pv_db].[dbo].[MEA_PBEMDel] where dtol < ' |
| + | GO\\ | ||
| + | DELETE FROM [pv_db].[dbo].[MEA_PBEMAux] where dtol < ' | ||
| + | GO\\ | ||
| + | DELETE FROM [pv_db].[dbo].[MEA_PVBox] where dtol < ' | ||
| + | GO\\ | ||
| + | DELETE FROM [pv_db].[dbo].[MEA_FLD] where dtol < ' | ||
| + | GO\\ | ||
| + | DELETE FROM [pv_db].[dbo].[MEA_GBEMDel] where dtol < ' | ||
| + | GO\\ | ||
| + | ===== Sauvegarde et réduction ===== | ||
| + | ==== PV_DB ==== | ||
| + | La base de donnée PV_DB est de type simple, il suffit de faire une réduction : | ||
| - | Exemple | + | Click droit sur la base => Tâche => Réduire => Fichier\\ et dans type de fichier, choisir données puis journal |
| - | [[http:// | + | |
| - | Balise pour mettre en relief l' | + | {{:tma: |
| - | <WRAP center round download | + | Pour vérifier que la réduction des fichiers a bien fonctionné, |
| - | bloc information | + | ==== CCDATA ==== |
| + | La base CCDATA est de type Complet. La sauvegarde de son journal suffit à le réduire drastiquement. | ||
| + | Pour des raisons encore non élucidées il faut parfois faire les manipulations plusieurs fois ou attendre quelques minutes pour voir le fichier réduire de taille. | ||
| + | |||
| + | La requête est la suivante : | ||
| + | |||
| + | BACKUP LOG ConextControlData TO DISK = ' | ||
| + | CHECKPOINT\\ | ||
| + | BACKUP LOG ConextControlData TO DISK = ' | ||
| + | DBCC SHRINKFILE(2, | ||
| + | |||
| + | La commande " | ||
| + | Dans le nom du journal, la portion de date est bien évidemment à adapter. | ||
| + | |||
| + | <WRAP center round info 60> | ||
| + | En cas de non réduction des tailles, il est toujours possible, via le clique droit, de réduire la base de donnée et le fichier. | ||
| </ | </ | ||
| + | |||
| <WRAP center round info 60> | <WRAP center round info 60> | ||
| - | bloc information | + | Lors de la campagne de 2017, les " |
| </ | </ | ||
| - | <WRAP center round important 60> | ||
| - | bloc important | ||
| - | </ | ||
| - | <WRAP center round help 60> | ||
| - | bloc aide | ||
| - | </ | ||
| - | <WRAP center round todo 60> | ||
| - | bloc à faire | ||
| - | </ | ||
| - | <WRAP center round alert 60> | ||
| - | bloc alerte | ||
| - | </ | ||
| - | |||
| - | <wrap em> | ||
| - | <wrap hi> | ||
| - | <wrap lo>peu important</ | ||
| - | |||
| - | |||
| - | {{tag> | ||
| - | Les tags peuvent : | + | {{tag> |
| - | * être associés à une catégorie. | + | |
| - | * Contenir plusieurs mots. Dans ce cas, remplacer les espaces par des **_** | + | |