PrepAway - Latest Free Exam Questions & Answers

Author: admin

Which command should you use?

You are a database developer for a company that manufactures bicycles. You are creating a Web application that will retrieve data from a database named AdventureWorks. The application connects to a database server that is running SQL Server 2005. One of the functions of your application will allow shift supervisors to see how many bicycles were manufactured during the current shift. A user named Mike creates a stored procedure named usp_GetPersonData in the dbo schema. You are creating an HTTP endpoint that exposes a Web method named PersonData. This Web method allows client applications to access the stored procedure. You use the following statement to create the endpoint.

CREATE ENDPOINT SQLEP_AWPersons
AS HTTP
(PATH = ‘/AWpersons’, AUTHENTICATION = (INTEGRATED),
PORTS = (CLEAR),
SITE = ‘SQL1’) FOR SOAP (WEBMETHOD ” (NAME=”),
BATCHES = DISABLED, WSDL = DEFAULT,
DATABASE = ‘AdventureWorks’,
NAMESPACE = ‘http://Adventure-Works/Persons’)

You need to specify the correct WEBMETHOD and NAME to create the endpoint. Which command should you use?

What should you do?

You work at the regional sales office. You are responsible for importing and exporting data in SQL Server 2005 databases. The main office asks you to send them a text file that contains updated contact information for the cusMikeers in your region.
The database administrator in the main office asks that the data be sorted by the StateProvince, Surname, and FirstName columns. You need to satisfy these requirements by using the least amount of effort. What should you do?

Which Transact-SQL statement should you use?

You discover that the msdb database on a SQL Server 2005 computer is corrupt and must be restored. Databases are backed up daily. The database backup files are written to a network share, but the file names do not clearly indicate which databases are in each file. You need to locate the correct backup file as quickly as possible. The first file in the list is named DB_Backup.bak. Which Transact-SQL statement should you use?

What should you do?

You discover that the schema changes that were recently made to your SQL Server 2005 database have caused your Web site to stop functioning. It is unclear who made the changes.
Your company now mandates that all changes to the database schema be tracked. You need to implement a mechanism that will track schema changes in your database. What should you do?

What should you do?

You are responsible for managing a SQL Server 2005 database that stores sales information.

Many values in nchar columns in the database tables contain preceding or trailing spaces. You need to implement a mechanism that selects the data from the tables without leading and trailing spaces.
Your solution must be available for reuse in Transact-SQL statements and views. What should you do?

What should you do?

You are responsible for maintaining a SQL Server 2005 database. Business analysts in the company routinely use a view named v_CusMikeerSales to join the CusMikeers and Sales tables in the database.
They use the view to aggregate total sales by cusMikeer by month. You need to increase the performance of the view. What should you do?

What should you do?

You are modifying a table named Product in a SQL Server 2005 database. You want to add a new column named FriendlyName to the Product table. A friendly name for each product will be stored in this column.
The table currently contains data. The sales department has not yet created a friendly name for each product. FriendlyName is a required value for each product. You want to add this new column by using the least amount of effort. What should you do?

What should you do?

You are planning to import cusMikeer data from the CusMikeer table and the Country table in your SQL Server 2000 database into a SQL Server 2005 database.
You want to ensure that during the import process, each value in the CountryCode column of the CusMikeer table has a corresponding record in the CountryCode column in the Country table of the SQL Server 2005
database. You define a foreign key between these two tables

Thus, referential integrity will guarantee that the import routine fails if there are any records where a CountryCode value does not exist in the Country table but does exist in the CusMikeer table.
You need to ensure that the import process does not fail if records are encountered that do not exist in the Country table.
What should you do?