1.
You are a database administrator on an instance of SQL Server 2008. You issue the following statement to create the Document table: CREATE TABLE Document( DocumentID int IDENTITY(1,1) NOT NULL, Title nvarchar](50) NOT NULL, Status tinyint NOT NULL, DocumentSummary nvarchar(max) NULL, DocumentObj varbinary(max) NULL); You want to ensure that all DocumentObj values are stored in the database, but are not stored in-row. You query sys.tables for the Document table and display the following results: Which action should you take?
2.
You are a database developer. You plan to design a database solution by using SQL Server 2008. The database will contain three tables. The structure of the three tables is as shown in the following table. You need to minimize disk space usage without altering the data types in the tables of the database. What should you do?
3.
You are a database developer on an instance of SQL Server 2008. You are designing an application to be used by the human resources department. Your Employee table needs to contain the following information: The employee's unique identifier The employee's last name and first name The numeric identifier of the department in which the employee works The unique employee identifier of the employee's manager The date the employee was hired You want to be able to easily navigate the organization chart using a tree-like structure and easily identify each employee's level in the organization chart. You also want to minimize code complexity. Which action should you take?
4.
You are a database developer on an instance of SQL Server 2008. You have a database that contains a large table named InvTransaction. The InvTransaction table contains historical data on inventory transactions that previously occurred. The table is queried occasionally and used to produce monthly reports, but is very rarely modified. The InvTransaction table is defined as follows: The InvTransaction table contains millions of rows, and has the following additional characteristics: A clustered index exists on the TranID column. The LocationID column for most transactions has a value of 1. The TranType column for most transactions has a value of 'T1'. Each BinID column has a bin value between 1 and 100 because there are a maximum of 100 bins for each location. Most of the TranDetails column values have similar descriptions. You want to minimize the amount of storage used by the table, but not directly modify any of the table's columns. Which action should you take?
5.
You work in an International company named TAKEEEN. And you're in charge of the database of your company. You intend to use SQL Server 2008 to create a database solution. A stored procedure that uses the TRY/CATCH syntax is created in a new database. When the stored procedure is executed, the stored procedure logs information about each step in the TRY block into a table when it is executed, the table is named dbo.RunningLog. If an error happens, the stored procedure must roll back the changes made to the target tables and retain the log entries stored in the dbo.RunningLog table. So what should you do to make sure that the given tasks can be performed by the stored procedure?
6.
You are a database developer on an instance of SQL Server 2008. Your Transaction table has a PRIMARY KEY constraint defined on the TrxID column. Your Transaction table also contains columns named TrxType and TrxDisposition. You want to generate a list of the number of transactions by type and disposition. You want the result set to display the following data: A total transaction count for each type A total transaction count for each disposition A grand total count of all transactions Which action should you take?
7.
You maintain a database named Manufacturing on an instance of SQL Server 2008. You have created a stored procedure named usp_WorkOrderUpdate that is frequently used to update the status of work orders as they are completed. The usp_WorkOrderUpdate stored procedure performs related updates to several tables in the database when a work order is marked as complete. You have used transactions within the procedure to ensure that all table updates are successful. You need to issue a query against the WorkOrderHistory table, which is one of the tables updated in the usp_WorkOrderUpdate stored procedure. You want your query to execute as quickly as possible, ignoring any locks that the usp_WorkOrderUpdate procedure has acquired, and reading all rows even if they contain uncommitted data. Which action should you take?
8.
You are a database developer on an instance of SQL Server 2008. You have an EventMaster table defined using the following statement: CREATE TABLE EventMaster ( EventID int PRIMARY KEY, EventDesc varchar(50) NOT NULL, Provider varchar(30), EventDate datetime, Cost money, MaxSeats int); You currently have a clustered index on the table's primary key, and a nonclustered index on the Provider column. Rows are frequently added to the EventMaster table as new events are scheduled. Your booking representatives frequently query the EventMaster table to return the event description and cost of events provided by specific providers within a given time range. You want to optimize query performance. Which action should you take?
9.
You are a database developer. You develop a database by using SQL Server 2008 in an enterprise environment. The database has a table named Sales.Inventory. The table is partitioned into four geographic regions. You update the Sales.Inventory table for each region by using the following stored procedure. CREATE STORED PROCEDURE usp_Update @RegionID tinyint AS UPDATE Sales.Inventory SET Qty = T.CurrentQuantity FROM Sales.Inventory I JOIN Sales.TempData T ON I.ItemID = T.ItemID AND I.RegionID = @RegionID; The UPDATE statement locks the Sales.Inventory table when a single region is updated. You need to prevent the locking of the Sales.Inventory table when a single region is updated. What should you do?
10.
You are a database developer on an instance of SQL Server 2008. Your organization has a production database named Prod and a database named Dev that is used by the development team. You want to create a CLR user-defined type (UDT) that will be passed as parameter input to a stored procedure. Using a .NET Framework language, you write and compile the necessary code to create an assembly. In the Dev database, you register the assembly using a CREATE ASSEMBLY statement and create the type. With no additional actions, which databases will be able to access the UDT?