Which Transact-SQL batch should you use to ensure that the database is always in a consistent state?
Exhibit:
Domain.com is storing its customer data in a data warehouse.It includes three separate SQL Server 2005 tables for storing customer data. Each table is used to horizontally partition data that is migrated from a SQL Server 2000 installation to SQL Server 2005. Data is partitioned as shown in the table displayed in the exhibit. The database does not allow customers to opt-out of e-mail marketing offers. You need to add a new OptOutFlag column to each of the customer tables. You must ensure that this column is added to either all three customer tables or none of them. You must also ensure that the database is always in a consistent state.
Which Transact-SQL batch should you use?
Which Transact-SQL batch should you use to ensure the following?
You work as a database administrator at Domain.com. Domain.com stores client information in a data warehouse. The data warehouse contains three separate SQL Server 2005 tables for storing client information.
The information stored in three separate tables named CK_Staff1, CK_Staff 2 and CK_Staff 3. The tables are used to horizontally partition information that is migrated from a SQL Server 2000 installation to a SQL Server 2005. The information is partitioned as shown in the table displayed below:
Table
Stores employee surnames
beginning in letters
CK_Staff1 A – J
CK_Staff2 K – P
CK_Staff3 R – Z
The database is configured in order that Domain.com employees are unable to opt-out of e-mail notifications to their personal email addresses. You have received instruction from the CIO to add a new OptOutFlag column to every CK_Staff table.
You need to ensure the following:
1. The column is added to either all three CK_Staff tables or none of them.
2. The database is always in a consistent state.
exhibit Which Transact-SQL batch should you use?
What should you do to meet the following criteria?
You work as the database administrator for an IT training company named Domain.com. All servers on the Domain.com network run Windows Server 2003 and all database servers run SQL Server 2005. The Domain.com network contains a database server named Certkiller -DB01 B01. Certkiller -DB01 hosts a database named CK_Sales that stores sales data for the company. The tables in the CK_Sales database are shown in the following database diagram.
Domain.com decides to switch to commission-based salaries for its Sales staff. You need to generate information that Rory Allen, the manager of the Sales department, will use to calculate the commission for each sales person. Your solution must meet the following criteria:
1. You must be able to use multiple SELECT statements to produce the result set.
2. The result set must be returned as a table for which the PRIMARY KEY constraint is defined.
3. Rory Allen must be able to reference the result set in the FROM clause of a SELECT statement.
exhibit What should you do?
What should you do to identify both the server process ID and the start time of the oldest active transaction
You manage a database named DB1, which is located on a SQL Server 2005 computer. You receive a warning that the drive on which the DB1 log file is located is near capacity. Although the transaction log is backed up every five minutes, you observe that it is steadily growing. You think that an uncommitted transaction might be the cause and you want to investigate.
You need to identify both the server process ID and the start time of the oldest active transaction in DB1. What should you do?
What should you do to identify both the server process ID and the start time of the oldest active transaction
You are employed as a database administrator at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. Your duties at Domain.com are the administrating of a database named CK_Data that is situated on a SQL Server 2005 computer named Certkiller -DB03. As the administrator you receive a warning that the drive on which the CK_Data log file is situated is near capacity. The transaction log is backed up every five minutes. You notice that this is steadily growing. You suspect that an uncommitted transaction may be the reason and you want to investigate it. You want to identify both the server process ID and the start time of the oldest active transaction in CK_Data.
What should you do?
What should you do to ensure that your attempt to resolve the problem has the least possible impact on network
You work as the database administrator at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. All servers on the Domain.com network run Windows Server 2003 and all client computers run Windows XP Professional. The Domain.com network contains a file server named Certkiller -SR10 and a SQL Server 2005 database server named Certkiller -DB01. Certkiller -DB01 hosts a database named CK_Sales that stores sales data for the company.
Domain.com users in the Accounts department use a proprietary application to access the CK_Sales database. After a few months Domain.com users in the Accounts department complain that the application takes a considerable amount of time to perform certain operations. You need to determine which queries that are used by the application are performing poorly. You intend to use SQL Server Profiler to replay the queries. You need to ensure that your attempt to resolve the problem has the least possible impact on network performance and the performance of Certkiller -DB01.
What should you do?
What should you do to get information about each participant in the deadlock?
Domain.com uses SQL Server 2005. Users report with increasing frequency that they receive deadlock error messages in an order processing application. You need to monitor which objects and SQL Server session IDs are involved when deadlock conditions occur. You want information about each participant in the deadlock.
exhibit What should you do?
What should you do to get data regarding every participant in the deadlock?
You are employed as a database administrator at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. The Domain.com network contains a SQL Server 2005 database named Certkiller -DB03.
You have received several reports from users’ stating that they received deadlock error messages in an order processing application. You monitor which objects and SQL Server session IDs are involved when deadlock conditions occur. You want data regarding every participant in the deadlock.
What should you do?
What should you do to monitor which objects and SQL Server session IDs are involved when deadlock conditions o
You are employed as a database administrator at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. The Domain.com network contains a SQL Server 2005 database server named Certkiller -DB03.
You have received a report from the Domain.com users that they receive deadlock error messages in an order processing application.
You need to monitor which objects and SQL Server session IDs are involved when deadlock conditions occur. You also want information about each participant in the deadlock.
What should you do?
What should you do to improve performance of the CK_Sales database by implementing database snapshots?
You work as the database administrator at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. All servers on the Domain.com network run Windows Server 2003 and all clients run Windows XP Professional.
The Domain.com network contains a database server named Certkiller -DB01 that is running SQL Server 2005, Standard Edition. Certkiller -DB01 contains a database named CK_Sales which is used to store data for the Sales department. Members of the Sales department usually access CK_Sales at the start of the day. You want to improve performance of the CK_Sales database by implementing database snapshots. However, the Snapshot Agent is not available in SQL Server Management Studio.
What should you do?