IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Oracle Discussion :

Statistiques d'une instance sur l'autre


Sujet :

Oracle

  1. #1
    Membre habitué
    Homme Profil pro
    CMA-CGM
    Inscrit en
    Novembre 2005
    Messages
    531
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 64
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : CMA-CGM
    Secteur : Transports

    Informations forums :
    Inscription : Novembre 2005
    Messages : 531
    Points : 137
    Points
    137
    Par défaut Statistiques d'une instance sur l'autre
    Bonjour les forumistes...
    est-il possible (comme en DB2) de prendre les statistiques d'une instance A et de les charger sur une instance B...

    Merci pour vos réponses...

  2. #2
    Membre expert
    Avatar de LeoAnderson
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    2 938
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 2 938
    Points : 3 199
    Points
    3 199
    Par défaut
    Oui, on peut !
    http://download-east.oracle.com/docs...s.htm#i1036059

    EXPORT_SCHEMA_STATS Procedure

    This procedure retrieves statistics for all objects in the schema identified by ownname and stores them in the user statistics tables identified by stattab.

    Syntax

    DBMS_STATS.EXPORT_SCHEMA_STATS (
    ownname VARCHAR2,
    stattab VARCHAR2,
    statid VARCHAR2 DEFAULT NULL,
    statown VARCHAR2 DEFAULT NULL);

    Parameters

    Table 103-23 EXPORT_SCHEMA_STATS Procedure Parameters
    Parameter Description
    ownname Name of the schema
    stattab User statistics table identifier describing where to store the statistics
    statid Identifier (optional) to associate with these statistics within stattab
    statown Schema containing stattab (if different than ownname)

  3. #3
    Membre habitué
    Homme Profil pro
    CMA-CGM
    Inscrit en
    Novembre 2005
    Messages
    531
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 64
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : CMA-CGM
    Secteur : Transports

    Informations forums :
    Inscription : Novembre 2005
    Messages : 531
    Points : 137
    Points
    137
    Par défaut
    Merci beaucoup... je testerai ça demain !

    PS : As-tu un exemple ?

  4. #4
    Membre expert
    Avatar de LeoAnderson
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    2 938
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 2 938
    Points : 3 199
    Points
    3 199
    Par défaut
    Google est ton ami !

    http://www.oracle-base.com/articles/...Statistics.php

    Transfering Stats
    It is possible to transfer statistics between servers allowing consistent execution plans between servers with varying amounts of data. First the statistics must be collected into a statistics table. In the following examples the statistics for the APPSCHEMA user are collected into a new table, STATS_TABLE, which is owned by DBASCHEMA:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
          SQL> EXEC DBMS_STATS.create_stat_table('DBASCHEMA','STATS_TABLE');
          SQL> EXEC DBMS_STATS.export_schema_stats('APPSCHEMA','STATS_TABLE',NULL,'DBASCHEMA');
    This table can then be transfered to another server using your preferred method (Export/Import, SQLPlus Copy etc.) and the stats imported into the data dictionary as follows:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
          SQL> EXEC DBMS_STATS.import_schema_stats('APPSCHEMA','STATS_TABLE',NULL,'DBASCHEMA');
          SQL> EXEC DBMS_STATS.drop_stat_table('DBASCHEMA','STATS_TABLE');

  5. #5
    Membre habitué
    Homme Profil pro
    CMA-CGM
    Inscrit en
    Novembre 2005
    Messages
    531
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 64
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : CMA-CGM
    Secteur : Transports

    Informations forums :
    Inscription : Novembre 2005
    Messages : 531
    Points : 137
    Points
    137
    Par défaut
    Merci Léo...
    en fait, je me demande où vont aller les stats exportées de la source ? Dans un fichier ?

    Merci encore pour ta réponse

  6. #6
    Membre expert
    Avatar de LeoAnderson
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    2 938
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 2 938
    Points : 3 199
    Points
    3 199
    Par défaut
    à quoi ça sert que l'on vous réponde si vous ne lisez pas les réponses.....

  7. #7
    Membre habitué
    Homme Profil pro
    CMA-CGM
    Inscrit en
    Novembre 2005
    Messages
    531
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 64
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : CMA-CGM
    Secteur : Transports

    Informations forums :
    Inscription : Novembre 2005
    Messages : 531
    Points : 137
    Points
    137
    Par défaut
    Ouh la la ! en effet, faut que je me réveille aujourd'hui !

    Merci pour tes réponses !

Discussions similaires

  1. [10g] Restauration d'une instance sur un autre serveur
    Par Cereal123 dans le forum Oracle
    Réponses: 7
    Dernier message: 31/01/2006, 19h45
  2. Lien vers une image sur un autre serveur
    Par claralavraie dans le forum ASP
    Réponses: 1
    Dernier message: 23/12/2005, 11h40
  3. lancer une application sur un autre pc local
    Par amireve dans le forum API, COM et SDKs
    Réponses: 4
    Dernier message: 08/09/2005, 21h00
  4. Sauvegarde / restauration d'une base sur un autre PC
    Par LEF97 dans le forum Administration
    Réponses: 2
    Dernier message: 31/08/2005, 15h22
  5. [RMAN] Connexion à une base sur un autre serveur
    Par alxkid dans le forum Oracle
    Réponses: 2
    Dernier message: 23/08/2004, 11h47

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo