Book Image

Microsoft SQL Server 2008 High Availability

By : Hemantgiri S. Goswami
Book Image

Microsoft SQL Server 2008 High Availability

By: Hemantgiri S. Goswami

Overview of this book

<p>Every business has it's mission critical applications and data. Therefore, it is very important to keep database servers up and running all the time – 24 X 7. There is a need to store and process terabytes of data to cater for business needs, and it is vital to make data highly available.<br /><br />High availability is all about the site being accessible all the time. High availability solutions minimize the downtime for these mission critical applications.</p> <p>Microsoft SQL Server is a powerful relational database engine, widely used to store and maintain data in Enterprises of various levels be they small, medium or large.</p> <p>This book will teach you how best to use these readily-available options and save you time in making your websites highly available.<br /><br />This Microsoft SQL Server 2008 High Availability book will take you through pre and post installation concepts and common issues you come across while working with SQL Server HA. It will teach you how these various HA solutions can be installed using GUI and the command line. It will also show you how to troubleshoot common issues you may encounter whilst installing or managing the HA option in your environment. It provides references to external links for more advanced learning on the topic.<br /><br />This book starts with an introductory chapter into the windows domain, domain users and various handshake methods available with Windows server. It also offers information the different authentication methods available with SQL Server - giving you an insight into the importance of security. After you are through with the security aspects, your journey to installing SQL Server HA will start. It will cover the concepts of database mirroring, log shipping, clustering, and replication.<br /><br />By the end of this book you will be confident enough to take up the challenge to install any of the SQL Server HA options.</p>
Table of Contents (18 chapters)
Microsoft SQL Server 2008 High Availability
Credits
Foreword
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface

Chapter 8: Database Mirroring


  • Question: How do I make sure which port is associated with Database Mirroring?

    Answer: Execute the following code to get the list of port(s) that are associated with the database mirroring:

    SELECT type_desc, port FROM sys.tcp_endpoints;
    GO
    
  • Question: How do I ensure that endpoints are started?

    Answer: Execute the following code to confirm whether or not the endpoints are started:

    SELECT state_desc FROM sys.database_mirroring_endpoints
    
  • Question: I am getting Error: 1418; how do I resolve this error?

    Answer: Error 1418 is related to general network error. We have to make sure that the ports we will be using to establish database mirroring are available; also make sure that the firewall are not blocking them.

  • Question: Principal and Mirror server are not on the same domain or trusted domain; which service accounts do I use?

    Answer: Use the local accounts on the both Principal and Mirror, which has the identical name and password.

  • Question: How do I ensure that the service account has the CONNECT permission for the endpoints?

    Answer: Execute the following code to confirm whether the service account has the CONNECT permission. Execute this code into both the server to check and confirm.

    SELECT 'Metadata Check';
    SELECT EP.name, SP.STATE,
    CONVERT(nvarchar(38), suser_name(SP.grantor_principal_id))
    AS GRANTOR,
    SP.TYPE AS PERMISSION,
    CONVERT(nvarchar(46),suser_name(SP.grantee_principal_id))
    AS GRANTEE
    FROM sys.server_permissions SP, sys.endpoints EP
    WHERE SP.major_id = EP.endpoint_id
    ORDER BY Permission, grantor, grantee;
    GO
    
  • Question: My database mirroring session occasionally shows time-out error.

    Answer: Generally synchronous mode (High Safety) has 10 seconds time out value configured. This value is dependent on the ping request being sent between Principal and Mirror server.

    Sometimes the ping acknowledgement comes late due to various reasons such as network congestion or slow processing, but this delay is considered as time out, and depending on the operating mode, it may failover. Hence, it is always recommended to be cautious while configuring the time out value.

    The typical time out value (10 seconds) is good enough. But if we wish, we can increase this value by executing following command:

    ALTER DATABASE AdventureWorks SET PARTNER TIMEOUT 15
    GO
    

    To get the current time out value, execute the following query:

    SELECT mirroring_connection_timeout
    FROM
    sys.database_mirroring
    GO