| Home  | Casa  | Hardware  | Networking  | Programmazione  | Software  | Domanda  | Sistemi  |   
software  
  • Adobe Illustrator

  • Software di animazione

  • Antivirus Software

  • Software Audio

  • Backup dei dati

  • masterizzare CD

  • masterizzare DVD

  • Compressione dei dati

  • Software Database

  • Desktop Publishing

  • Desktop Video

  • Digital Video Software

  • Drupal

  • Software didattico

  • ingegneria del Software

  • Tipi di estensione di file

  • Financial Software

  • Freeware, Shareware & Abandonware

  • GIMP

  • Graphics Software

  • Software Home Recording

  • Microsoft Access

  • Microsoft Excel

  • Microsoft Publisher

  • Microsoft Word

  • Aprire Source Code

  • Altro Software per computer

  • Giochi per PC

  • Photoshop

  • Portable Document Format

  • PowerPoint

  • presentazione Software

  • produttività Software

  • Quicktime

  • Gestione Desktop remoto

  • SQL Server

  • Skype

  • Software versioni Beta

  • Consulenti Software

  • Società di sviluppo software

  • Software Licensing

  • Fogli di calcolo

  • Software Preparazione Tax

  • Software Utility

  • Web Clip Art

  • Windows Media Player

  • Word Processing Software
  •  
    Conoscenza Informatica >> software >> Software Database >> Content
    Come Defrag di un database MSSQL
    Una frammentazione del database si verifica quando l'ordine logico del l'indice del database non corrisponde l'allocazione fisica dei dati sul disco . Come i cambiamenti di dati all'interno del database , le tabelle di indice del database diventano sparsi in tutto il disco. Aumenta il tempo necessario per accedere ai dati , con conseguente riduzione delle prestazioni delle applicazioni . I comandi della console di database MSSQL consentono di ricostruire o deframmentare gli indici . È necessario utilizzare l'istruzione DBCC DBEREINDEX di deframmentare un indice di database MSSQL . Istruzioni
    1

    Fare clic sul pulsante "Start " di Windows e selezionare " Tutti i programmi ". Clicca per aprire The Sims 2

    Inserire le seguenti istruzioni SQL nella finestra della console " Console di gestione di SQL . " :

    SET NOCOUNT ON ;

    DECLARE @ nometabella varchar ( 255) ;

    DECLARE @ execstr varchar ( 400 ) ;

    DECLARE @ objectid int ;

    DECLARE @ IndexID int ;

    DECLARE @ frag decimale ;

    DECLARE @ maxfrag decimale ;

    SELECT @ maxfrag = 30.0 ; ' . '

    DICHIARARE tabelle CURSOR FOR

    SELECT + TABLE_SCHEMA + NOME_TABELLA

    DA INFORMATION_SCHEMA.TABLES

    DOVE TABLE_TYPE = ' tabella di base' ;

    CREATE TABLE # FragList (

    NomeOggetto char ( 255 ) , < br

    ObjectId > int , Stati

    IndexName char ( 255 ) , Stati

    IndexID int , Stati

    Lvl int , brevi

    CountPages int , Stati

    countRows int , Stati

    MinRecSize int , Stati

    MaxRecSize int , Stati

    AvgRecSize int , Stati

    ForRecCount int , brevi

    Estensioni int , brevi

    ExtentSwitches int , brevi

    AvgFreeBytes int , Stati

    AvgPageDensity int , Stati

    ScanDensity decimale , Stati

    BestCount int , Stati < p > ActualCount int , Stati

    LogicalFrag decimale , Stati

    ExtentFrag decimale) ;

    tavoli aperti ;

    ANDARE A PRENDERE DOPO

    dalle tabelle

    INTO @ nome_tabella ;

    MENTRE @ @ FETCH_STATUS = 0

    BEGIN

    INSERT INTO # FragList

    EXEC ( ' DBCC SHOWCONTIG ( '' ' + @ nometabella + ''' ) per

    CON FAST, TABLERESULTS , ALL_INDEXES , NO_INFOMSGS ');

    ANDARE A PRENDERE DOPO

    dalle tabelle

    INTO @ nometabella ;

    END;

    tavoli stretti ;

    DEALLOCATE tabelle ;

    DICHIARARE indici del cursore per i

    Seleziona NomeOggetto , ObjectId , IndexID , LogicalFrag

    FROM # FragList

    DOVE LogicalFrag > = @ maxfrag

    E INDEXPROPERTY ( ObjectId , IndexName , ' IndexDepth ') > 0 ;

    indici aperti;

    ANDARE A PRENDERE DOPO

    da indici

    INTO nometabella @ , @ objectid , IndexID @ , @ frag ;

    MENTRE @ @ FETCH_STATUS = 0

    BEGIN

    PRINT ' esecuzione di DBCC INDEXDEFRAG ( 0 , ' + RTRIM ( @ nometabella ) + ' , Stati

    ' + RTRIM ( @ IndexID ) + ' ) - frammentazione attualmente '

    + RTRIM ( CONVERTITO ( varchar ( 15 ) , @ frag ) ) + '% ';

    SELECT @ execstr =' DBCC INDEXDEFRAG ( 0 , '+ RTRIM ( @ ObjectID ) + ' , Stati

    ' + RTRIM ( @ IndexID ) + ' )';

    EXEC ( @ execstr ) ;

    ANDARE A PRENDERE DOPO

    indici

    INTO nometabella @ , @ objectid , IndexID @ , @ frag ;

    END;
    indici CHIUDI

    ;

    DEALLOCATE indici ;
    < p > DROP TABLE # FragList ; .

    GO
    3

    Fare clic su " File" e selezionare "Esegui " per deframmentare l'indice del database MSSQL


    Previous :

    next :
      Articoli Correlati
    ·Come utilizzare Litespeed Con TSM Archivio 
    ·Come scoprire una dimensione del database utilizzando u…
    ·Come rimuovere SSRS Opzioni di esportazione 
    ·Come modificare i Diritti del documento con Adobe Pro 9…
    ·Come estendere Gameshark dati di SPSS 
    ·Come caricare le immagini nel Accesso 
    ·Come trovare connessioni attive usando T - SQL 
    ·Come si ordina per data 
    ·Come utilizzare Access 2000 per selezionare Somma nella…
    ·Come impostare calcoli in OmniForm 
      Articoli in evidenza
    ·Software utilizzato in Educazione 
    ·Come ridurre Ping in CSS 
    ·Come copiare e incollare un documento Excel in un nuovo…
    ·Definizione di un lettore di illegale Plugin Adobe 
    ·Come aggiungere un Matrix per PowerPoint 
    ·Come caricare filmato con un contenitore in Flash MX 
    ·Istruzioni per PCSX2 
    ·Come fare la Spark Effect gioielli in Photoshop 
    ·Come collegare un multi - pagina di Adobe Acrobat docum…
    ·Come convertire un file AVI a giocare in un DVD Player 
    Copyright © Conoscenza Informatica http://it.wingwit.com