Question With Answer : 70-229 Designing and Implementing Databases with Microsoft SQL Server 2000 Enterprise Edition
1. You are a database developer for the A. Datum Corporation. You are creating a database that will store statistics for 15 different high school sports. This information will be used by 50 companies that publish sports information on their Web sites.
Each company's Web site arranges and displays the statistics in a different format. You need to package the data for delivery to the companies.
What should you do?
A. Extract the data by using SELECT statements that include the FOR XML clause.
B. Use the sp_makewebtask system stored procedure to generate HTML from the data returned by SELECT statements.
C. Create Data Transformation Services packages that export the data from the database and place the data into tab-delimited text files.
D. Create an application that uses SQL_DMO to extract the data from the database and transform the data into standard electronic data interchange (EDI) files.
Ans:A
2. You are a database developer for a mail order company. The company has two SQL Server 2000 computers named CORP1 and CORP2. CORP1 is the online transaction processing server. CORP2 stores historical sales data. CORP2 has been added as a linked server to CORP1.
The manager of the sales department asks you to create a list of customers who have purchased floppy disks. This lists will be generated each month for promotional mailings. Floppy disks are representatives in the database with a category ID of 21.
You must retrieve this information from a table named SalesHistory. This table is located in the Archive database, which resides on CORP2. You need to execute this query from CORP1.
Which script should you use?
A. EXEC sp_addlinkedserver 'CORP2', 'SQL Server'
GO
SELECT CustomerID FROM CORP2. Archive.dbo.SalesHistory
WHERE CategoryID = 21
B. SELECT CusomerID FROM OPENROWSET ('SQLOLEDB', 'CORP2'; 'p*word', 'SELECT CustomerID FROM Archive.dbo.SalesHistory WHERE CategoryID = 21')
C. SELECT CustomerID FROM CORP2.Archive.dbo.SalesHistory
WHERE CategoryID = 21
D. EXEC sp_addserver 'CORP2'
GO
SELECT CustomerID FROM CORP2.Archive.dbo.SalesHistory
WHERE CategoryID = 21
Ans:C
3. You are a database developer for Trey Research. You create two transactions to support the data entry of employee information into the company's database. One transaction inserts employee name and address information into
the database. The other transaction inserts employee demographics information into the database. This transaction is less important than the first transaction.
The database administrator has notified you that the database server occasionally encounters errors during periods of high usage. Each time this occurs, the database server randomly terminates one of the transactions.
You must ensure that when the database server terminates one of these transactions, it never terminates the more important transaction.
What should you do?
A. Set the DEADLOCK_PRIORITY to LOW for the transaction that inserts the employee name and address information.
B. Set the DEADLOCK_PRIORITY to LOW for the transaction that inserts the employee demographics information.
C. Add conditional code that checks for server error 1205 on the transaction that inserts the employee name and address information. If this error is encountered, restart the transaction.
D. Add the ROWLOCK optimizer hint to the data manipulation SQL statements within the transactions.
E. Set the transaction isolation level to SERIALIZABLE for the transaction that inserts the employee name and address information.
Ans:B
4. You are a database developer for your company's SQL Server 2000 online transaction processing database. Many of the tables have 1 million or more rows. All tables have a clustered index. The heavily accessed tables have at least one nonclustered index.
Two RAID arrays on the database server will be used to contain the data files. You want to place the tables and indexes to ensure optimal I/O performance.
You create one filegroup on each RAID array.
What should you do next?
A. Place tables that are frequently joined together on the same filegroup. Place heavily accessed tables and all indexes belonging to those tables on different filegroups.
B. Place tables that are frequently joined together on the same filegroup. Place heavily accessed tables and the nonclustered indexes belonging to those tables on the same filegroup.
C. Place tables that are frequently joined together on different filegroups. Place heavily accessed tables and the nonclustered indexes belonging to those tables on different filegroups.
D. Place tables that are frequently joined together on different filegroups. Place heavily accessed tables and the nonclustered indexes belonging to those tables on the same filegroup.
Ans:C
5. You are a database developer for your company's SQL Server 2000 database.You update several stored procedures in the database that create new end-of-month reports for the sales department.
The stored procedures contain complex queries that retrieve data from three or more tables. All tables in the database have at least one index.
Users have reported that the new end-of-month reports are running much slower than the previous version of the reports.
You want to improve the performance of the reports.
What should you do?
A. Create a script that contains the Data Definition Language of each stored procedure. Use this script as a workload file for the Index Tuning Wizard.
B. Capture the execution of each stored procedure in a SQL Profiler trace. Use the trace file as a workload file for the Index Tuning Wizard.
C. Update the index statistics for the tables used in the stored procedures.
D. Execute each stored procedure in SQL Query Analyzer, and use the Show Execution Plan option.
E. Execute each stored procedure in SQL Query Analyzer, and use the show Server Trace option.
Ans:E
6. You are a database developer for Wide World Importers. You are creating a database that will store order information. Orders will be entered in a client/server application. Each time a new order is entered, a unique order number must be assigned.
Order numbers must be assigned in ascending order. An average of 10,000 orders will be entered each day.
You create a new table named Orders and add an OrderNumber column to this table.
What should you do next?
A. Set the data type of the column to UniqueIdentifier.
B. Set the data type of the column to int, and set the IDENTITY property for the column.
C. Set the data type of the column to int. Create a user-defined function that selects the maximum order number in the table.
D. Set the data type of the column to int. Create a NextKey table, and add a NextOrder column to the table. Set the data type of the NextOrder column to int. Create a stored procedure to retrieve and update the value held in the NextKey
Ans:B
7. You are a database developer for a technical training center. Currently, administrative employees keep records of students, instructors, courses, and classroom assignments only on paper.
The training center wants to eliminate the use of paper to keep records by developing a database to record this information. You design the tables for this database.
Your design is shown in the exhibit: