사용자 도구

사이트 도구


dbms:mssql:edu:maintain_sql2005:module9

Lesson 1: Introduction to High Availability

Factors Affecting Availability

  • Software failures
  • Hardware component failures
  • Network failure
  • Power failure and natual disaster

Considerations for Optimizing Database Availablity

  • Hardware component redundancy
  • Network redundancy
  • RAID
  • Server and database redundancy

Lesson 2: Implementing Server Clustering

What Is Server Clustering?

  • Virtual Server
    • Appears on the network as a normal server
  • Editions
    • Enterprise Edition
    • Developer Edition
    • Standard Edition

Considerations for Cluster Preparation

Check configuration and compatibility of:

  • Hardware
  • Windows cluster configuration
  • Shared disk

How to Install SQL Server in a Cluster

  • Virtual Server
    • Specify a virtual server name in SQL Server Setup
  • Instances
    • Only one instance of SQL Server in each resource group

Lesson 3: Implementing Database Mirroring

What Is Database Mirroring?

  • Alternative to failover clustering
  • Mirror Server
    • Provides a hot standby
  • Witness Server
    • Monitors the primary and mirror database servers
  • Client redirection
    • Automatic client redirection

Options for Database Mirroring Configuration

Mode Automatic Failover Full Protection from Data Loss
High Availability O O
High Protection X O
High Performance X X

What Are Database Mirroring Endpoints?

  • TCP endpoint that enables network communication between servers
    CREATE ENDPOINT endpointName
        STATE=STARTED
        AS TCP ( LISTENER_PORT = listenerPortList )
        FOR DATABASE_MIRRORING
        (
            [ AUTHENTICATION = WINDOWS [ authorizationMethod ]
            ]
            [ [,] ENCRYPTION = REQUIRED
                    [ ALGORITHM { algorithm } ]
            ]
            [,] ROLE = ROLE
        )

How to Prepare Servers for Database Mirroring

  1. Create mirroring endpoints and logins
  2. Set recovery model to FULL
  3. Back up database and restore on mirror server
  4. Copy server-level resources

How to Establish a Mirror Session

  1. Set the pricipal server on the mirror server
  2. Set the server on the principal server
  3. Change the session mode from High Protection
    • Add a witness server for High Availability mode
    • Set partner safety off for High Performance mode

How to Handle Failover

  • Automatic failover
    • Mirror and witness form quorum
    • Role changes automatically
  • Manual failover
    ALTER DATABASE AWData
    SET PARTNER FAILOVER
  • Forced service
    ALTER DATABASE AWData SET PARTNER
    FORCE_SERVICE_ALLOW_DATA_LOSS

Lesson 4: Implementing Log Shipping

What Is Log Shipping?

  • A high-availability technique that applies log backups to a standby server

How to Implement Log Shipping

  • Implement log shipping in either:
    • SQL Server Management Studio
    • Transact-SQL
      sp_add_log_shipping_primary_database
      @DATABASE = N'AdventureWorks'
      ,@backup_directory = N'c:\lsbackup'
      ,@backup_share = N'\\tribeca\lsbackup'
      ,@backup_job_name = N'LSBackup_AdventureWorks'

How to Switch Server Roles

  1. Copy transaction log backups
  2. Back up primary database with NORECOVERY
    BACKUP LOG AdventureWorks TO AWLogBackup
    WITH NORECOVERY
  3. Restore primary database on secondary server
    RESTORE LOG AdventureWorks FROM AWLogBackup
    WITH RECOVERY
  4. Disable log shipping jobs
  5. Configure log shipping on new primary server

Lesson 5: Implementing Peer-ot-Peer Replication

Considerations for Using Peer-to-Peer Replication

  • Effects of transactions and cnoflicts
  • Improved performance and scalability
  • Control over network traffic
  • Suitability over intermittent network connections

Implementing Distributed Load Balancing

  • Update and read load balancing
  • Read load balancing

Implementing Distributed High Availability

  • Synchronizing nodes
  • Peer-to-peer replication topologies
  • Implementing a peer-to-peer replication topology
dbms/mssql/edu/maintain_sql2005/module9.txt · 마지막으로 수정됨: 2008/05/22 15:09 저자 gauryan