Which statement should you execute to achieve this?

You are the database administrator for your company. You have set up database mirroring to increase theavailability of your database.
You have a primary SQL Server 2008 instance named Primary1 and a mirroringdatabase instance named Secondary1.
You want to configure the database servers for high availability. To do this, you have decided to add a witnessserver to your mirroring configuration.
You have a SQL Server instance named DbInstance1 that will beconfigured as the witness server. This instance may also act as a secondary server in some events.
You must create an endpoint named MirrorEndpoint on this instance. Which statement should you execute to achieve this?

You are the database administrator for your company. You have set up database mirroring to increase theavailability of your database.
You have a primary SQL Server 2008 instance named Primary1 and a mirroringdatabase instance named Secondary1.
You want to configure the database servers for high availability. To do this, you have decided to add a witnessserver to your mirroring configuration.
You have a SQL Server instance named DbInstance1 that will beconfigured as the witness server. This instance may also act as a secondary server in some events.
You must create an endpoint named MirrorEndpoint on this instance. Which statement should you execute to achieve this?

A.
CREATE ENDPOINT MirrorEndpoint
STATE=STARTED
AS TCP (LISTENER_PORT=1500)
FOR DATABASE_MIRRORING (
AUTHENTICATION=WINDOWS KERBEROS,
ROLE=WITNESS);

B.
CREATE ENDPOINT MirrorEndpoint
STATE=STARTED
AS HTTP (
AUTHENTICATION=(KERBEROS),
CLEAR_PORT=1500)
FOR DATABASE_MIRRORING (ROLE=ALL, MESSAGE_FORWARDING=ENABLED);

C.
CREATE ENDPOINT MirrorEndpoint
STATE=STARTED
AS TCP (LISTENER_PORT=1500)
FOR DATABASE_MIRRORING (
AUTHENTICATION=WINDOWS KERBEROS,
ROLE=PARTNER);

D.
CREATE ENDPOINT MirrorEndpoint
STATE=STARTED
AS TCP (LISTENER_PORT=1500)
FOR DATABASE_MIRRORING (
AUTHENTICATION=WINDOWS KERBEROS,
ROLE=ALL);

Explanation:

You should execute the following statement:
CREATE ENDPOINT MirrorEndpoint
STATE=STARTED
AS TCP (LISTENER_PORT=1500)
FOR DATABASE_MIRRORING (
AUTHENTICATION=WINDOWS KERBEROS,
ROLE=ALL);

To create an endpoint on a witness server, you must configure a transport protocol, and specify a listener port. Adatabase mirroring endpoint only listens on a TCP protocol. An HTTP protocol cannot be used for databasemirroring. In this scenario, DbInstance1 can act as a partner or as a secondary server in other mirroringconfigurations. Therefore, you must set specify the ROLE=ALL clause on a TCP port. The ROLE=ALL clausesignifies that this instance can be used both as a partner as well as a witness. You should not execute the following statement:
CREATE ENDPOINT MirrorEndpoint
STATE=STARTED
AS TCP (LISTENER_PORT=1500)
FOR DATABASE_MIRRORING (
AUTHENTICATION=WINDOWS KERBEROS,
ROLE=WITNESS);
In this statement, the
ROLE=WITNESS
clause specified. This will create an endpoint that can be used only by awitness server. In this scenario, the instance for which the endpoint is being created will be used as both awitness server and a partner server. You should not execute the following statement:
CREATE ENDPOINT MirrorEndpoint
STATE=STARTED
AS HTTP (
AUTHENTICATION=(KERBEROS),
CLEAR_PORT=1500)
FOR DATABASE_MIRRORING (ROLE=WITNESS, MESSAGE_FORWARDING=ENABLED);
This statement is syntactically incorrect. This statement tries to create an endpoint on the HTTP protocol. Anendpoint created for database mirroring can only listen on the TCP protocol. Also, the MESSAGE_FORWARDING clause is not allowed when you create an endpoint for a database mirroringconfiguration. You should not execute the following statement:
CREATE ENDPOINT MirrorEndpoint
STATE=STARTED
AS TCP (LISTENER_PORT=1500)
FOR DATABASE_MIRRORING (
AUTHENTICATION=WINDOWS KERBEROS,
ROLE=PARTNER);
This statement is syntactically incomplete. You are also required to specify the PATH clause in the statement.Also, the ROLE=PARTNER clause is specified. This will create an endpoint that can be used only by a partnerserver. In this scenario, the instance for which the endpoint is being created will be used both as a partner serverand as a witness server.

Objective:
Implementing High Availability

Sub-Objective:
Implement database mirroring.

References:
TechNet > TechNet Library > Server Products and Technologies > SQL Server > SQL Server 2008 > ProductDocumentation > SQL Server 2008 Books Online > Database Engine > Operations > High Availability > DatabaseMirroring > Database Mirroring Deployment > Setting Up Database Mirroring > Database Mirroring Endpoint TechNet > TechNet Library > Server Products and Technologies > SQL Server > SQL Server 2008 > ProductDocumentation > SQL Server 2008 Books Online > Database Engine > Technical Reference > Transact-SQLReference > CREATE ENDPOINT (Transact-SQL)



Leave a Reply 0

Your email address will not be published. Required fields are marked *