单选题 server’s msdb database in an e-mail message to the administrator of another SQL Server computer.You create a job that contains the following steps:--Detach the msdb database--Send the database to the administrator in an e-mail message--Reattach the msdb databaseYou test the job, and it fails on the first step. You need to ensure that the msdb database is mailed to the administrator every night.What should you do?
【正确答案】 C
【答案解析】解析:Explanation: The current job fails since the detach msdb statement fails. It fails because detaching a database requires that no one is using the database. The msdb database is used by the SQL Server Agent service, which performs scheduled activities such as backups and replication tasks. We want to send the msdb database. The msdb database could be detached if all processes that use it where terminated. Then we could send the database file and reattach the msdb database. This would stop scheduled tasks from being run during this period. A better approach would to be to backup the database and send the temporary file instead. Note: A new SQL Server 2000 installation automatically includes six databases: master, model, tempdb, pubs, Northwind, and msdb. The master, model, and tempdb databases cannot be detached. Incorrect answers: A: The problem that the SQL Service Agent is using the msdb database. This problem would still be there even user account running the SQL Server Agent service is changed. B: The msdb database is used by the SQL Server Agent service and the database file would be locked. It cannot be sent directly in an e-mail message. D: The msdb database could be detached if all processes that use it where terminated. Then we could send the database file and reattach the msdb database. This would stop scheduled tasks from being run during this period.