How to use the dbrepair utility.

Version 2
    Share:|

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    BMC Performance Analyzer for Mainframes


    APPLIES TO:

    BMC Performance Analyzer for Mainframes



    QUESTION:

     
       How to use the dbrepair utility in Visualizer.  
       
       Visualizer 4.2.02  
       
        
        Visualizer 4.2.03   
        
         
         Visualizer 4.2.04    
      
     
       
       Windows  


    ANSWER:

     

    Legacy ID:KA293797

      

    How to use the dbrepair utility:

      

    1.  Run a Database backup or make sure a current database backup is available (just for safety sake).
    2.  Open up the Command Prompt window (DOS prompt).
    3.  Change directories to the Visualizer directory (i.e. c:\Program Files\BMC Software\Visualizer).
    4.  Enter the following command on the Command prompt:

      
       

    dbrepair -d <data source name> -u <userid> -p <password> -l <log file path> -r �i
     
    Where:

       

    <data source name> = ODBC Data Source Name for this database
    <userid>           = Database User Id
    <password>         = Database Password

       

    **Note** - If SQL Server Windows Authentication Mode (Trusted Connections)is being used for the DSN the -u and -p switches can be omitted from the commandline.

       

    <log file path>    = drive, path and filename for the log file

       

    Usage: dbrepair -d <DSName> -u <username> -p <password> -f <platform> -l <log file> -x <description files>  -v -t -r -m �i

       

    -d ODBC DSN name (or DSN full string)
    -u <username>, if required by datasource
    -p <password>, if required by datasource
    -f <platform> (all platforms if not specified)
    -l <log file full name>
    -x <path to description files>
    -v (preview report)
    -t (trace diagnostics)
    -r (repair references)
    -m (remove duplicates)
    -i (rebuild stored procedures and index files)

       

    **Note** - The -m (duplicate removal) switch should only be used if you know dynamic table duplicates are present in the database because a different sql query is used to detect the duplicates which returns a much larger row set to process.  Dbrepair will take longer to run in this case.

       

    Example:

       

    dbrepair -d visdb -u visuser -p vis_password -l c:\temp\dbrepair_log.txt -r �i

      

    5.  While this is running (in live mode) no other update events (populate, summary or delete) should be run against this database.
    6.  All the messages go to the log file so only the following will be seen on the command prompt:

      
       

    C:\Program Files\BMC Software\Visualizer>dbrepair -d visdb -u visuser -p vis_password -l c:\temp\dbrepair_log.txt -r -i

       

    Starting dbrepair for visdb ... Wed May 21 17:24:25 2008

       

    End dbrepair. Wed May 21 17:24:33 2008

      

    7.  When it is done look at the log file to insure that dbrepair ran successfully.  The log should be similar to the following.

      
       

    Starting dbrepair for visdb ... Wed May 21 17:24:25 2008

       

    Reading description files from C:\Program Files\BMC Software\Visualizer\
    Repair operations:
    -Reference repair
    -Index/stored procedure repair

       

    Platform: DistSys Meas/Smry
    Processing Reference repair...
     Dynamic tables for invalid references...    
     Static and MASF tables for unreferenced objects...    
     ...table CAXNODES unreferenced records:  1   
     ...table CAXCMDS unreferenced records:  22   
     ...table CAXDSKS unreferenced records:  1   
     ...table CAXNBTCS unreferenced records:  4   
     ...table CAXNICS unreferenced records:  1   
     ...table CAXNTUSS unreferenced records:  3   
    Processing stored procedure and index rebuild...
    Completed process

       

    End dbrepair. Wed May 21 17:24:33 2008

      
    Related Products:  
       
    1. BMC Performance Assurance for Servers

     


    Article Number:

    000031364


    Article Type:

    FAQ/Procedural



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles