Point out the correct statement.

2025

Point out the correct statement.

  1. A.

    To access a mirrored database, a connection string must contain the database name

  2. B.

    When the linked server is defined against an instance of SQL Server, catalog refers to the default database to which the linked server is mapped

  3. C.

    [ @location= ] 'location' is the location of the database as interpreted by the OLE DB provider in sp_addlinkedserver

  4. D.

    All of the mentioned

Attempted by 2 students.

Show answer & explanation

Correct answer: D

Concept

SQL Server's distributed-query and database-mirroring features are governed by precisely documented parameters and connection-string contracts: sp_addlinkedserver's @catalog and @location parameters configure how a linked server resolves its target database and how the OLE DB provider is initialized, while a client connecting to a mirroring session must supply specific fields in its connection string.

Application

  1. Mirrored-database connection string: per Microsoft's Database Mirroring documentation, a client must explicitly supply the initial database (catalog) name in the connection string when connecting to a mirroring session, optionally alongside a Failover Partner server name for automatic reconnection if the principal is unavailable -- so this statement is accurate.

  2. sp_addlinkedserver @catalog: when the linked server points to another instance of SQL Server, the @catalog parameter specifies the default database to which that linked server is mapped -- this matches Microsoft's own Transact-SQL reference wording for @catalog almost verbatim, so this statement is accurate.

  3. sp_addlinkedserver @location: the @location parameter is provider-specific location data, interpreted by the target OLE DB provider, and SQL Server passes it through as the DBPROP_INIT_LOCATION property when initializing that provider -- this too matches the documented behaviour, so this statement is accurate.

Cross-check

Testing each claim independently against the current SQL Server reference documentation (sp_addlinkedserver's parameter list and the Database Mirroring connection-string requirements) turns up no exception -- none of the three claims can be ruled false. Since a combination answer is offered and every individual claim it bundles together is verified true, the umbrella choice covering all three is the one that holds without exception.

Result

All of the mentioned statements are correct.

Explore the full course: Computer Science

Loading lesson…