Multiple choice technology web technology

You want to access data that is located on two SQL Server 2005 computers. One Server is SQL 1 and the other server is SQL 2. You have permissions to write a stored Procedure on SQL 1 but on SQL 2 you have only permission to select data. You write a stored procedure on SQL 1. The stored procedure accesses SQL 2 by OPENQUERY T-SQL Statement. The query fails. What should you do to solve the problem?

  1. Add SQL 2 as linked server to SQL 1

  2. Add SQL 2 as remote Server to SQL 1

  3. (c) Reference SQL 2 by an alias

  4. None of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The OPENQUERY function in SQL Server requires a linked server to be configured first. It cannot directly access remote servers without this link. The claimed answer A correctly states 'Add SQL 2 as linked server to SQL 1' is the solution. Option B suggests 'remote server' which is an older SQL Server concept not used with OPENQUERY. Option C suggests using an alias which won't solve the authentication/connectivity issue. Option D is incorrect since adding the linked server is the correct solution.