A) ?Server=XYZ01;Data Source=Factory; Initial Catalog=FactoryDB;Integrated Security=SSPI? | B) ?Server=XYZ01;Data Source=Factory; Database=FactoryDB;Integrated Security=SSP1? |
C) ?Data Source=XYZ01\Factory; Initial Category=Factory; Integrated Security=SSP1? | D) ?Data Source=XYZ01\Factory; Database=FactoryDB; Integrated Security=SSP1? |
Explanation:
The Data Source attribute of the connection string contains the name, instance or network address of the instance of SQL Server to which to connect. In this scenario we are to connect to the Factory Instance on XYZ01 so we use XYZ01\Factory as data source. To specify the database we should either use the Database or the Initial Catalog attribute. Here we use Database=FactoryDB.
Incorrect Answers:
A, B: There is no Server attribute in the connection string. Instead we should use the Data Source attribute to specify the server and the instance.
C: There is no Initial Category attribute in the connection string. We can use Database or the Initial Catalog attribute to specify the database.