1.
You have a SQL Server 2012 database named DB1. You have a backup device named Device1. You discover that the log file for the database is full. You need to ensure that DB1 can complete transactions. The solution must not affect the chain of log sequence numbers (LSNs). Which code segment should you execute?
2.
You have a SQL Azure database. You need to identify which keyword must be used to create a view that will be indexed. Which keyword should you identify?
3.
Case Study 2: Contoso Ltd Overview Application Overview Contoso, Ltd., is the developer of an enterprise resource planning (ERP) application. Contoso is designing a new version of the ERP application. The previous version of the ERP application used SQL Server 2008 R2. The new version will use SQL Server 2012. The ERP application relies on an import process to load supplier data. The import process updates thousands of rows simultaneously, requires exclusive access to the database, and runs daily. You receive several support calls reporting unexpected behavior in the ERP application. After analyzing the calls, you conclude that users made changes directly to the tables in the database. Tables The current database schema contains a table named OrderDetails. The OrderDetails table contains information about the items sold for each purchase order. OrderDetails stores the product ID, quantities, and discounts applied to each product in a purchase order. The product price is stored in a table named Products. The Products table was defined by using the SQL_Latin1_General_CP1_CI_AS collation. A column named ProductName was created by using the varchar data type. The database contains a table named Orders. Orders contains all of the purchase orders from the last 12 months. Purchase orders that are older than 12 months are stored in a table named OrdersOld. The previous version of the ERP application relied on table- level security. Stored Procedures The current version of the database contains stored procedures that change two tables. The following shows the relevant portions of the two stored procedures: Customer Problems Installation Issues The current version of the ERP application requires that several SQL Server logins be set up to function correctly. Most customers set up the ERP application in multiple locations and must create logins multiple times. Index Fragmentation Issues Customers discover that clustered indexes often are fragmented. To resolve this issue, the customers defragment the indexes more frequently. All of the tables affected by fragmentation have the following columns that are used as the clustered index key: Backup Issues Customers who have large amounts of historical purchase order data report that backup time is unacceptable. Search Issues Users report that when they search product names, the search results exclude product names that contain accents, unless the search string includes the accent. Missing Data Issues Customers report that when they make a price change in the Products table, they cannot retrieve the price that the item was sold for in previous orders. Query Performance Issues Customers report that query performance degrades very quickly. Additionally, the customers report that users cannot run queries when SQL Server runs maintenance tasks. Import Issues During the monthly import process, database administrators receive many supports call from users who report that they cannot access the supplier data. The database administrators want to reduce the amount of time required to import the data. Design Requirements File Storage Requirements The ERP database stores scanned documents that are larger than 2 MB. These files must only be accessed through the ERP application. File access must have the best possible read and write performance. Data Recovery Requirements If the import process fails, the database must be returned to its prior state immediately. Security Requirements You must provide users with the ability to execute functions within the ERP application, without having direct access to the underlying tables. Concurrency Requirements You must reduce the likelihood of deadlocks occurring when Sales.Proc1 and Sales.Proc2 execute. ------------ Question You need to recommend a solution that addresses the concurrency requirement. What should you recommend?
4.
Case Study 2: Contoso Ltd Overview Application Overview Contoso, Ltd., is the developer of an enterprise resource planning (ERP) application. Contoso is designing a new version of the ERP application. The previous version of the ERP application used SQL Server 2008 R2. The new version will use SQL Server 2012. The ERP application relies on an import process to load supplier data. The import process updates thousands of rows simultaneously, requires exclusive access to the database, and runs daily. You receive several support calls reporting unexpected behavior in the ERP application. After analyzing the calls, you conclude that users made changes directly to the tables in the database. Tables The current database schema contains a table named OrderDetails. The OrderDetails table contains information about the items sold for each purchase order. OrderDetails stores the product ID, quantities, and discounts applied to each product in a purchase order. The product price is stored in a table named Products. The Products table was defined by using the SQL_Latin1_General_CP1_CI_AS collation. A column named ProductName was created by using the varchar data type. The database contains a table named Orders. Orders contains all of the purchase orders from the last 12 months. Purchase orders that are older than 12 months are stored in a table named OrdersOld. The previous version of the ERP application relied on table- level security. Stored Procedures The current version of the database contains stored procedures that change two tables. The following shows the relevant portions of the two stored procedures: Customer Problems Installation Issues The current version of the ERP application requires that several SQL Server logins be set up to function correctly. Most customers set up the ERP application in multiple locations and must create logins multiple times. Index Fragmentation Issues Customers discover that clustered indexes often are fragmented. To resolve this issue, the customers defragment the indexes more frequently. All of the tables affected by fragmentation have the following columns that are used as the clustered index key: Backup Issues Customers who have large amounts of historical purchase order data report that backup time is unacceptable. Search Issues Users report that when they search product names, the search results exclude product names that contain accents, unless the search string includes the accent. Missing Data Issues Customers report that when they make a price change in the Products table, they cannot retrieve the price that the item was sold for in previous orders. Query Performance Issues Customers report that query performance degrades very quickly. Additionally, the customers report that users cannot run queries when SQL Server runs maintenance tasks. Import Issues During the monthly import process, database administrators receive many supports call from users who report that they cannot access the supplier data. The database administrators want to reduce the amount of time required to import the data. Design Requirements File Storage Requirements The ERP database stores scanned documents that are larger than 2 MB. These files must only be accessed through the ERP application. File access must have the best possible read and write performance. Data Recovery Requirements If the import process fails, the database must be returned to its prior state immediately. Security Requirements You must provide users with the ability to execute functions within the ERP application, without having direct access to the underlying tables. Concurrency Requirements You must reduce the likelihood of deadlocks occurring when Sales.Proc1 and Sales.Proc2 execute. ------------ Question You need to recommend a solution that addresses the backup issue. The solution must minimize the amount of development effort. What should you include in the recommendation?
5.
Case Study 2: Contoso Ltd Overview Application Overview Contoso, Ltd., is the developer of an enterprise resource planning (ERP) application. Contoso is designing a new version of the ERP application. The previous version of the ERP application used SQL Server 2008 R2. The new version will use SQL Server 2012. The ERP application relies on an import process to load supplier data. The import process updates thousands of rows simultaneously, requires exclusive access to the database, and runs daily. You receive several support calls reporting unexpected behavior in the ERP application. After analyzing the calls, you conclude that users made changes directly to the tables in the database. Tables The current database schema contains a table named OrderDetails. The OrderDetails table contains information about the items sold for each purchase order. OrderDetails stores the product ID, quantities, and discounts applied to each product in a purchase order. The product price is stored in a table named Products. The Products table was defined by using the SQL_Latin1_General_CP1_CI_AS collation. A column named ProductName was created by using the varchar data type. The database contains a table named Orders. Orders contains all of the purchase orders from the last 12 months. Purchase orders that are older than 12 months are stored in a table named OrdersOld. The previous version of the ERP application relied on table- level security. Stored Procedures The current version of the database contains stored procedures that change two tables. The following shows the relevant portions of the two stored procedures: Customer Problems Installation Issues The current version of the ERP application requires that several SQL Server logins be set up to function correctly. Most customers set up the ERP application in multiple locations and must create logins multiple times. Index Fragmentation Issues Customers discover that clustered indexes often are fragmented. To resolve this issue, the customers defragment the indexes more frequently. All of the tables affected by fragmentation have the following columns that are used as the clustered index key: Backup Issues Customers who have large amounts of historical purchase order data report that backup time is unacceptable. Search Issues Users report that when they search product names, the search results exclude product names that contain accents, unless the search string includes the accent. Missing Data Issues Customers report that when they make a price change in the Products table, they cannot retrieve the price that the item was sold for in previous orders. Query Performance Issues Customers report that query performance degrades very quickly. Additionally, the customers report that users cannot run queries when SQL Server runs maintenance tasks. Import Issues During the monthly import process, database administrators receive many supports call from users who report that they cannot access the supplier data. The database administrators want to reduce the amount of time required to import the data. Design Requirements File Storage Requirements The ERP database stores scanned documents that are larger than 2 MB. These files must only be accessed through the ERP application. File access must have the best possible read and write performance. Data Recovery Requirements If the import process fails, the database must be returned to its prior state immediately. Security Requirements You must provide users with the ability to execute functions within the ERP application, without having direct access to the underlying tables. Concurrency Requirements You must reduce the likelihood of deadlocks occurring when Sales.Proc1 and Sales.Proc2 execute. ------------ Question You need to recommend a solution that addresses the index fragmentation and index width issue. What should you include in the recommendation? (Each correct answer presents part of the solution. Choose all that apply.)
6.
Case Study 2: Contoso Ltd Overview Application Overview Contoso, Ltd., is the developer of an enterprise resource planning (ERP) application. Contoso is designing a new version of the ERP application. The previous version of the ERP application used SQL Server 2008 R2. The new version will use SQL Server 2012. The ERP application relies on an import process to load supplier data. The import process updates thousands of rows simultaneously, requires exclusive access to the database, and runs daily. You receive several support calls reporting unexpected behavior in the ERP application. After analyzing the calls, you conclude that users made changes directly to the tables in the database. Tables The current database schema contains a table named OrderDetails. The OrderDetails table contains information about the items sold for each purchase order. OrderDetails stores the product ID, quantities, and discounts applied to each product in a purchase order. The product price is stored in a table named Products. The Products table was defined by using the SQL_Latin1_General_CP1_CI_AS collation. A column named ProductName was created by using the varchar data type. The database contains a table named Orders. Orders contains all of the purchase orders from the last 12 months. Purchase orders that are older than 12 months are stored in a table named OrdersOld. The previous version of the ERP application relied on table- level security. Stored Procedures The current version of the database contains stored procedures that change two tables. The following shows the relevant portions of the two stored procedures: Customer Problems Installation Issues The current version of the ERP application requires that several SQL Server logins be set up to function correctly. Most customers set up the ERP application in multiple locations and must create logins multiple times. Index Fragmentation Issues Customers discover that clustered indexes often are fragmented. To resolve this issue, the customers defragment the indexes more frequently. All of the tables affected by fragmentation have the following columns that are used as the clustered index key: Backup Issues Customers who have large amounts of historical purchase order data report that backup time is unacceptable. Search Issues Users report that when they search product names, the search results exclude product names that contain accents, unless the search string includes the accent. Missing Data Issues Customers report that when they make a price change in the Products table, they cannot retrieve the price that the item was sold for in previous orders. Query Performance Issues Customers report that query performance degrades very quickly. Additionally, the customers report that users cannot run queries when SQL Server runs maintenance tasks. Import Issues During the monthly import process, database administrators receive many supports call from users who report that they cannot access the supplier data. The database administrators want to reduce the amount of time required to import the data. Design Requirements File Storage Requirements The ERP database stores scanned documents that are larger than 2 MB. These files must only be accessed through the ERP application. File access must have the best possible read and write performance. Data Recovery Requirements If the import process fails, the database must be returned to its prior state immediately. Security Requirements You must provide users with the ability to execute functions within the ERP application, without having direct access to the underlying tables. Concurrency Requirements You must reduce the likelihood of deadlocks occurring when Sales.Proc1 and Sales.Proc2 execute. ------------ Question You need to recommend a solution that meets the data recovery requirement. What should you include in the recommendation?
7.
Case Study 2: Contoso Ltd Overview Application Overview Contoso, Ltd., is the developer of an enterprise resource planning (ERP) application. Contoso is designing a new version of the ERP application. The previous version of the ERP application used SQL Server 2008 R2. The new version will use SQL Server 2012. The ERP application relies on an import process to load supplier data. The import process updates thousands of rows simultaneously, requires exclusive access to the database, and runs daily. You receive several support calls reporting unexpected behavior in the ERP application. After analyzing the calls, you conclude that users made changes directly to the tables in the database. Tables The current database schema contains a table named OrderDetails. The OrderDetails table contains information about the items sold for each purchase order. OrderDetails stores the product ID, quantities, and discounts applied to each product in a purchase order. The product price is stored in a table named Products. The Products table was defined by using the SQL_Latin1_General_CP1_CI_AS collation. A column named ProductName was created by using the varchar data type. The database contains a table named Orders. Orders contains all of the purchase orders from the last 12 months. Purchase orders that are older than 12 months are stored in a table named OrdersOld. The previous version of the ERP application relied on table- level security. Stored Procedures The current version of the database contains stored procedures that change two tables. The following shows the relevant portions of the two stored procedures: Customer Problems Installation Issues The current version of the ERP application requires that several SQL Server logins be set up to function correctly. Most customers set up the ERP application in multiple locations and must create logins multiple times. Index Fragmentation Issues Customers discover that clustered indexes often are fragmented. To resolve this issue, the customers defragment the indexes more frequently. All of the tables affected by fragmentation have the following columns that are used as the clustered index key: Backup Issues Customers who have large amounts of historical purchase order data report that backup time is unacceptable. Search Issues Users report that when they search product names, the search results exclude product names that contain accents, unless the search string includes the accent. Missing Data Issues Customers report that when they make a price change in the Products table, they cannot retrieve the price that the item was sold for in previous orders. Query Performance Issues Customers report that query performance degrades very quickly. Additionally, the customers report that users cannot run queries when SQL Server runs maintenance tasks. Import Issues During the monthly import process, database administrators receive many supports call from users who report that they cannot access the supplier data. The database administrators want to reduce the amount of time required to import the data. Design Requirements File Storage Requirements The ERP database stores scanned documents that are larger than 2 MB. These files must only be accessed through the ERP application. File access must have the best possible read and write performance. Data Recovery Requirements If the import process fails, the database must be returned to its prior state immediately. Security Requirements You must provide users with the ability to execute functions within the ERP application, without having direct access to the underlying tables. Concurrency Requirements You must reduce the likelihood of deadlocks occurring when Sales.Proc1 and Sales.Proc2 execute. ------------ Question You need to recommend changes to the ERP application to resolve the search issue. The solution must minimize the impact on other queries generated from the ERP application. What should you recommend changing?
8.
Case Study 3: Litware, Inc Overview You are a database administrator for a company named Litware, Inc. Litware is a book publishing house. Litware has a main office and a branch office. You are designing the database infrastructure to support a new web-based application that is being developed. The web application will be accessed at www.litwareinc.com. Both internal employees and external partners will use the application. You have an existing desktop application that uses a SQL Server 2005 database named App1_DB. App1_DB will remain in production. Requirements Planned Changes You plan to deploy a SQL Server 2012 instance that will contain two databases named Database1 and Database2. All database files will be stored in a highly available SAN. Database1 will contain two tables named Orders and OrderDetails. Database1 will also contain a stored procedure named usp_UpdateOrderDetails. The stored procedure is used to update order information. The stored procedure queries the Orders table twice each time the procedure executes. The rows returned from the first query must be returned on the second query unchanged along with any rows added to the table between the two read operations. Database1 will contain several queries that access data in the Database2 tables. Database2 will contain a table named Inventory. Inventory will contain over 100 GB of data. The Inventory table will have two indexes: a clustered index on the primary key and a nonclustered index. The column that is used as the primary key will use the identity property. Database2 will contain a stored procedure named usp_UpdateInventory. usp_UpdateInventory will manipulate a table that contains a self-join that has an unlimited number of hierarchies. All data in Database2 is recreated each day and does not change until the next data creation process. Data from Database2 will be accessed periodically by an external application named Application1. The data from Database2 will be sent to a database named App1_Db1 as soon as changes occur to the data in Database2. Litware plans to use offsite storage for all SQL Server 2012 backups. Business Requirements You have the following requirements: Costs for new licenses must be minimized. Private information that is accessed by Application1 must be stored in a secure format. Development effort must be minimized whenever possible. The storage requirements for databases must be minimized. System administrators must be able to run real-time reports on disk usage. The databases must be available if the SQL Server service fails. Database administrators must receive a detailed report that contains allocation errors and data corruption. Application developers must be denied direct access to the database tables. Applications must be denied direct access to the tables. You must encrypt the backup files to meet regulatory compliance requirements. The encryption strategy must minimize changes to the databases and to the applications. ------------ Question You need to recommend an isolation level for usp_UpdateOrderDetails. Which isolation level should recommend?
9.
Case Study 3: Litware, Inc Overview You are a database administrator for a company named Litware, Inc. Litware is a book publishing house. Litware has a main office and a branch office. You are designing the database infrastructure to support a new web-based application that is being developed. The web application will be accessed at www.litwareinc.com. Both internal employees and external partners will use the application. You have an existing desktop application that uses a SQL Server 2005 database named App1_DB. App1_DB will remain in production. Requirements Planned Changes You plan to deploy a SQL Server 2012 instance that will contain two databases named Database1 and Database2. All database files will be stored in a highly available SAN. Database1 will contain two tables named Orders and OrderDetails. Database1 will also contain a stored procedure named usp_UpdateOrderDetails. The stored procedure is used to update order information. The stored procedure queries the Orders table twice each time the procedure executes. The rows returned from the first query must be returned on the second query unchanged along with any rows added to the table between the two read operations. Database1 will contain several queries that access data in the Database2 tables. Database2 will contain a table named Inventory. Inventory will contain over 100 GB of data. The Inventory table will have two indexes: a clustered index on the primary key and a nonclustered index. The column that is used as the primary key will use the identity property. Database2 will contain a stored procedure named usp_UpdateInventory. usp_UpdateInventory will manipulate a table that contains a self-join that has an unlimited number of hierarchies. All data in Database2 is recreated each day and does not change until the next data creation process. Data from Database2 will be accessed periodically by an external application named Application1. The data from Database2 will be sent to a database named App1_Db1 as soon as changes occur to the data in Database2. Litware plans to use offsite storage for all SQL Server 2012 backups. Business Requirements You have the following requirements: Costs for new licenses must be minimized. Private information that is accessed by Application1 must be stored in a secure format. Development effort must be minimized whenever possible. The storage requirements for databases must be minimized. System administrators must be able to run real-time reports on disk usage. The databases must be available if the SQL Server service fails. Database administrators must receive a detailed report that contains allocation errors and data corruption. Application developers must be denied direct access to the database tables. Applications must be denied direct access to the tables. You must encrypt the backup files to meet regulatory compliance requirements. The encryption strategy must minimize changes to the databases and to the applications. ------------ Question You need to recommend a solution for Application1 that meets the security requirements. What should you include in the recommendation?
10.
Case Study 3: Litware, Inc Overview You are a database administrator for a company named Litware, Inc. Litware is a book publishing house. Litware has a main office and a branch office. You are designing the database infrastructure to support a new web-based application that is being developed. The web application will be accessed at www.litwareinc.com. Both internal employees and external partners will use the application. You have an existing desktop application that uses a SQL Server 2005 database named App1_DB. App1_DB will remain in production. Requirements Planned Changes You plan to deploy a SQL Server 2012 instance that will contain two databases named Database1 and Database2. All database files will be stored in a highly available SAN. Database1 will contain two tables named Orders and OrderDetails. Database1 will also contain a stored procedure named usp_UpdateOrderDetails. The stored procedure is used to update order information. The stored procedure queries the Orders table twice each time the procedure executes. The rows returned from the first query must be returned on the second query unchanged along with any rows added to the table between the two read operations. Database1 will contain several queries that access data in the Database2 tables. Database2 will contain a table named Inventory. Inventory will contain over 100 GB of data. The Inventory table will have two indexes: a clustered index on the primary key and a nonclustered index. The column that is used as the primary key will use the identity property. Database2 will contain a stored procedure named usp_UpdateInventory. usp_UpdateInventory will manipulate a table that contains a self-join that has an unlimited number of hierarchies. All data in Database2 is recreated each day and does not change until the next data creation process. Data from Database2 will be accessed periodically by an external application named Application1. The data from Database2 will be sent to a database named App1_Db1 as soon as changes occur to the data in Database2. Litware plans to use offsite storage for all SQL Server 2012 backups. Business Requirements You have the following requirements: Costs for new licenses must be minimized. Private information that is accessed by Application1 must be stored in a secure format. Development effort must be minimized whenever possible. The storage requirements for databases must be minimized. System administrators must be able to run real-time reports on disk usage. The databases must be available if the SQL Server service fails. Database administrators must receive a detailed report that contains allocation errors and data corruption. Application developers must be denied direct access to the database tables. Applications must be denied direct access to the tables. You must encrypt the backup files to meet regulatory compliance requirements. The encryption strategy must minimize changes to the databases and to the applications. ------------ Question You need to recommend a solution to improve the performance of usp_UpdateInventory. The solution must minimize the amount of development effort. What should you include in the recommendation?