1.
You are a database administrator on an instance of SQL Server 2008. Your development team is using the Test database. Each developer has a SQL login and is a member of the db_owner fixed database role. By default, all developers use the dbo schema. Your company recently hired a contract development team to work on a special development project. The contractors need the ability to create new database tables, views, and stored procedures in the Test database. You also want to meet the following requirements: Database objects created by the contractors must be separately maintained and easily differentiated from the objects created by the development team. Contractors must be able to query and view the definitions of all existing database objects, but not alter them. The administrative effort required to manage and secure database objects should be minimized. Which actions should you take?
2.
You are a database developer on an instance of SQL Server 2008. You have an Employee table created with the following statement: CREATE TABLE Employee ( EmpID int IDENTITY(1,1) PRIMARY KEY, LastName varchar(35) NOT NULL, FirstName varchar(25) NOT NULL, HireDate datetime, Salary money, MgrID int); The MgrID column will contain the EmpID associated with each employee's manager. You want to create a self-referencing relationship to support this. Which action should you take?
3.
You have a table in a database that contains 30 million rows. You need to ensure that the table meets the following requirements: Enables queries on all string values within the table Enables queries to be returned by order of proximity Minimizes the amount of time required to execute queries What should you do?
4.
You are a database developer on an instance of SQL Server. Your Prod database currently contains a view named OrderDetailsView that joins five tables. Users will frequently perform queries using the view, and you want to improve the performance of these queries. Which action should you take?
5.
You are a database developer on an instance SQL Server 2008. You have a Purchase table defined as follows: The Purchase table contains millions of rows and you want to optimize query performance. Most purchases have not been voided, and do not contain a VoidDate. You are creating a stored procedure that will query the Purchase table based on a specified date range and return information for all non-voided orders, and you want the stored procedure's query to perform optimally. Which action should you take?
6.
You are a database administrator on an instance of SQL Server 2008. You have implemented database roles and used role membership to grant all user permissions. Your company has recently hired a contractor who needs permissions associated with the Developer role. The Developer role has permission to query all tables, as well as to create database objects. Due to privacy concerns, you do not want the contractor to be able to access specific table columns in the Employee table, which the Developer role allows. You create the Contractor user. You want to assign the appropriate permissions with the least administrative effort. Which additional action(s) should you take?
7.
You are designing a maintenance strategy for a database that contains several views. The views will be assigned custom permissions. You need to recommend a solution that will allow developers to modify the views without affecting the view's existing permissions. What should you recommend?
8.
You are the database developer on an instance of SQL Server 2008. You are designing a new database to track projects and project managers within your organization. You must create a data model representing the relationship between the Project entity and the ProjectManager entity that will support the following requirements: Each project may have one or more project managers, depending on the size of the project. Each project manager may be assigned to manage a single project or multiple projects. Each project has a specific date on which the project is scheduled to begin. Which action should you take?
9.
You are a database developer on an instance of SQL Server. You have a table named ProjectDetails that is partitioned by the ProjectDate column. You have several queries that are performing poorly. To improve performance, you want to create a table- aligned index on the ProjectDetails table. Which action should you take?
10.
You are a database developer on an instance of SQL Server 2008. Your database contains the SalesHeader and SalesDetail tables as shown: The SalesHeader and SalesDetail tables both contain millions of rows. You execute the following query against the tables: SELECT ProductID, SpecialOfferID FROM SalesDetail d INNER JOIN SalesHeader h ON d.SalesOrderID = h.SalesOrderID WHERE SpecialOfferID = 5; The query execution plan is displayed as follows: Which action should you take?