1. Trang chủ
  2. » Công Nghệ Thông Tin

Microsoft Press Configuring sql server 2005 môn 70 - 431 phần 10 ppt

107 307 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 107
Dung lượng 3,51 MB

Nội dung

846 Chapter 2: Lesson Review Answers Lesson 3 1. Correct Answer: A A. Correct: When a database is in the Simple recovery model, the database engine minimally logs most operations. B. Incorrect: In a Full recovery model, all transactions are logged. C. Incorrect: In a Bulk-Logged recovery model, only bulk operations are min- imally logged. D. Incorrect: The Simple recovery model logs transactions only minimally. 2. Correct Answers: B and C A. Incorrect: The recovery model is a database-level configuration, so you cannot change the recovery model by using sp_configure. B. Correct: You can change the database recovery model graphically in SSMS. C. Correct: ALTER DATABASE is the Transact-SQL statement that lets you change the recovery model. D. Incorrect: You cannot specify the recovery model in the CREATE DATA- BASE statement. When you create a database with the CREATE DATABASE statement, SQL Server creates it with the recovery model from the model database. 3. Correct Answers: A and D A. Correct: Because the transaction log is truncated in the Simple recovery model, you cannot restore the database to a given point in time. B. Incorrect: You can restore differential backups because they are database backups and you do not need transaction log information. C. Incorrect: You can restore full backups because you do not need transac- tion log information to perform that action. D. Correct: You cannot restore a data page in the Simple recovery model. A page restore requires an unbroken chain of log backups up to the current log file. Lesson 4 1. Correct Answers: B, C, and D A. Incorrect: Database users are database-level objects, not server-level prin- cipals. Z01A62271X.fm Page 846 Friday, April 29, 2005 8:08 PM Chapter 2: Lesson Review Answers 847 B. Correct: Fixed server roles are server principals that let you assign admin- istrative rights to logins. C. Correct: Windows logins are server principals that let you give access to Windows users and groups. D. Correct: SQL Server logins are server principals created, stored, and man- aged in SQL Server. 2. Correct Answers: A and C A. Correct: By using Windows authentication, SQL Server relies on operating system authentication. You can gain access to all the operating system secu- rity features and can implement enterprise-wide policies. B. Incorrect: SQL Server 2005 lets you apply the local Windows Password Policy to SQL Server logins. C. Correct: Windows authentication is the default authentication mode. D. Incorrect: The default authentication mode is Windows authentication. 3. Correct Answers: B and C A. Incorrect: The FROM clause is for Windows logins only. B. Correct: CREATE LOGIN is the recommended syntax for creating SQL Server logins in SQL Server 2005. C. Correct: Although you can create SQL Server logins by using the sp_addlogin stored procedure, this procedure is only for backward compat- ibility. You should use the CREATE LOGIN syntax. D. Incorrect: The sp_grantlogin stored procedure grants access to an operating system user. Lesson 5 1. Correct Answer: B A. Incorrect: The database catalog is defined in the database system tables. B. Correct: Schemas group database objects and let you perform some administrative tasks, such as grant permissions, together. C. Incorrect: Schemas do not group databases. D. Incorrect: Schemas do not define the table catalog. Z01A62271X.fm Page 847 Friday, April 29, 2005 8:08 PM 848 Chapter 2: Lesson Review Answers 2. Correct Answers: B and D A. Incorrect: Although you can use the FROM clause to create database user Peter mapped to login Peter, you must specify the LOGIN clause as well. B. Correct: You can use FOR LOGIN or FROM to specify the mapped login. C. Incorrect: This capability does not exist in the SQL_LOGIN clause. D. Correct: You can create the database user without specifying the login name; the database engine will look for a login with the same name as the database user. 3. Correct Answers: A and C A. Correct. You can nest database roles inside other database roles. B. Incorrect: You can add user-defined database roles and grant permissions to them. C. Correct: All SQL Server databases have predefined database roles, but you can add new database roles to group users and grant permissions. D. Incorrect: The map between logins and users is a one-to-one relationship. You cannot map fixed server roles to database roles. Lesson 6 1. Correct Answer: C A. Incorrect: The database engine automatically creates the service master key. B. Incorrect: The service master key can be opened by the service user account. C. Correct: The service master key is generated automatically for each instal- lation and can be opened only by the SQL Server service account. D. Incorrect: The service master key is generated automatically. 2. Correct Answer: A A. Correct: This is the correct syntax to create a certificate secured with the database master key. B. Incorrect: Although the statement is the correct one, the syntax is not valid. C. Incorrect: The correct statement to use is CREATE CERTIFICATE, not CREATE CERT. D. Incorrect: The correct statement to use is CREATE CERTIFICATE, not CREATE CERT. Z01A62271X.fm Page 848 Friday, April 29, 2005 8:08 PM Chapter 2: Lesson Review Answers 849 3. Correct Answers: A and D A. Correct: The database master key is optional. You can create it if you want to use it to protect certificates and keys. B. Incorrect: The database master key is not mandatory. C. Incorrect: The database master key is created manually. D. Correct: You should create the database master key manually by using the CREATE MASTER KEY statement. Lesson 7 1. Correct Answer: B A. Incorrect: You can access objects of other databases in the same instance without creating an external data source. B. Correct: You need to create an external data source when you need to access a different instance. C. Incorrect: You can access objects of different schemas without creating an external data source. D. Incorrect: You can access objects of other owners without creating an external data source. 2. Correct Answers: A and D A. Correct: You need to define the OLE DB data source to connect to. B. Incorrect: You need an OLE DB data source so that you can configure a linked server to an external data source. C. Incorrect: You need an OLE DB Provider to configure a linked server to an external data source. D. Correct: You need an OLE DB provider that lets you connect to the exter- nal data source. 3. Correct Answers: B and D A. Incorrect: You can define the security mode for each linked server. B. Correct: The database engine creates a self-mapping security context when you create a linked server. You can change this behavior by configuring a security mapping. C. Incorrect: The default configuration is self-mapping. D. Correct: You can choose a different security mode for each linked server. Z01A62271X.fm Page 849 Friday, April 29, 2005 8:08 PM 850 Chapter 2: Case Scenario Answers Chapter 2: Case Scenario Answers Case Scenario 1: Configuring Security 1. Because you need to provide access to Macintosh clients, you need to configure Mixed Mode authentication. You can use Windows logins for the Windows XP users. 2. You should create two database roles: one for Sales users and another one for Marketing users. With this configuration, you need to manage permissions for only these two roles. 3. To configure the encryption architecture, you need to do the following: A. Create a database master key for the CRM database. B. Create a certificate in the CRM database and protect the certificate with the database master key. C. Create a symmetric key that is protected with the certificate, and use the key to encrypt the data. Case Scenario 2: Configuring a Heterogeneous Environment 1. You need to create a linked server to provide access from the SQL Server data- base to the Oracle server. You can then execute distributed queries on the Oracle server and return results to SQL Server data consumers. 2. Because the external data source is a non-SQL Server and does not support Win- dows authentication, the most secure solution for your connection is to map SQL Server logins to remote Oracle users. 3. To send e-mail to branch offices from your SQL Server application, you need to configure SQL Server Database Mail. Because Database Mail is a standard SMTP client, you do not need to change your infrastructure. You need only a valid SMTP account on the UNIX mail server to create a profile in Database Mail that lets you send e-mail using that SMTP account. Z01A62271X.fm Page 850 Friday, April 29, 2005 8:08 PM Chapter 3: Lesson Review Answers 851 Chapter 3: Lesson Review Answers Lesson 1 1. Correct Answer: C A. Incorrect: A text data type can store up to 2 GB of data but does not allow direct comparison of columns. B. Incorrect: A varbinary data type stores binary data. C. Correct: A varchar(max) column can store up to 2 GB of data while still enabling you to use all functions and comparison operators. D. Incorrect: A regular varchar column cannot store 2 GB of data. Lesson 2 1. Correct Answers: A and C A. Correct: You can use system functions that return a scalar value in a check constraint. B. Incorrect: Stored procedures cannot be called within a check constraint. C. Correct: UDFs that return a scalar value can be referenced in a check con- straint. D. Incorrect: Views cannot be referenced in check constraints. Lesson 3 1. Correct Answers: B and D A. Incorrect: You cannot enable the CLR on a database-by-database basis. B. Correct: You must enable the CLR by using the Surface Area Configuration utility. C. Incorrect: You must compile and load into SQL Server a class that con- forms to the UDT specification. However, class creation is not limited exclusively to .NET languages. D. Correct: You can use any CLR-compatible language, including C#, Visual Basic, and Cobol.NET to create a class for a CLR user-defined type. Z01A62271X.fm Page 851 Friday, April 29, 2005 8:08 PM 852 Chapter 3: Case Scenario Answers Chapter 3: Case Scenario Answers Case Scenario: Designing a Database 1. There are some core tables that are necessary for this database: Customer, Cus- tomerAddress, CustomerContact, Patient, PatientAddress, Doctor, DoctorAd- dress, and Claims. 2. You need to create each of these core tables with primary keys to ensure that each row can be uniquely identified. 3. You need to link each table together by using appropriate foreign key constraints to enforce rules such as the following: a claim cannot be entered that is not asso- ciated with a company, and a patient’s address cannot be created without having the patient in the database first. 4. You should implement additional supporting tables to enforce such things as valid lists of states. 5. You need to define check constraints to enforce specific formatting for data such as Social Security numbers, phone numbers, and e-mail addresses. 6. You need to carefully analyze the claims table to determine whether to store doc- uments in native format such as Word or PDF, or to transform them into a stan- dard exchange format and store them in a schema-enforced XML column. 7. All these choices require you to spend time defining all pieces of data that need to be stored and any business rules that need to be enforced. Chapter 4: Lesson Review Answers Lesson 1 1. Correct Answers: B and C A. Incorrect: An index has a single page at the root level that is called the root page. B. Correct: An intermediate level can contain zero or more pages, and an index can have multiple intermediate levels. C. Correct: The leaf level can contain one or more pages; there is only a single leaf level, which is at the bottom of the index. D. Incorrect: B-tree is the name for the structure of the index, not a level in the structure. Z01A62271X.fm Page 852 Friday, April 29, 2005 8:08 PM Chapter 4: Lesson Review Answers 853 Lesson 2 1. Correct Answer: B A. Incorrect: A unique index requires that the data value in each row for the index is not duplicated, but it does not affect the physical ordering of the table. B. Correct: A clustered index causes the rows in the table to be physically ordered based on the index definition. C. Incorrect: A nonclustered index does not enforce a physical structure. D. Incorrect: A foreign key enforces referential integrity between two tables. 2. Correct Answer: B A. Incorrect: PAD_INDEX leaves empty space on intermediate-level pages in the index. B. Correct: FILLFACTOR leaves empty space on the leaf level of an index. C. Incorrect: MAXDOP specifies the maximum degree of parallelism used during index creation. D. Incorrect: IGNORE_DUP_KEY causes duplicates to be ignored for unique indexes. Lesson 3 1. Correct Answer: A A. Correct: PAD_INDEX leaves empty space on intermediate-level pages in the index. B. Incorrect: FILLFACTOR leaves empty space on the leaf level of an index. C. Incorrect: MAXDOP specifies the maximum degree of parallelism used during index creation. D. Incorrect: IGNORE_DUP_KEY causes duplicates to be ignored for unique indexes. Z01A62271X.fm Page 853 Friday, April 29, 2005 8:08 PM 854 Chapter 4: Case Scenario Answers Chapter 4: Case Scenario Answers Case Scenario: Indexing a Database 1. The first step is to verify that each table in the database has a primary key to ensure that rows can be uniquely identified. You implement the primary keys as indexes, and they should be sufficient to satisfy the requirements of data entry. 2. After verifying that primary keys exist on all the tables, you ensure that each table has a clustered index. To simplify things at this point, until you have much more knowledge about the data-access patterns and the volume and pattern of changes, you decide to alter all the primary keys so that they are clustered indexes as well. 3. You then create additional nonclustered indexes that SQL Server can use to quickly satisfy the search criteria that employees are using to locate claims data. The initial stage of this process is to simply get nonclustered indexes in place for use with the most common queries. 4. In a secondary indexing round, you will take a closer look at the nonclustered indexes to determine whether columns can be included to make the indexes covering indexes for the most common queries. Chapter 5: Lesson Review Answers Lesson 1 1. Correct Answers: A, C, and D A. Correct: A full outer join returns nonmatching data from both the left and right tables. B. Incorrect: An inner join returns only matching data. C. Correct: A right outer join returns nonmatching data from the right table. D. Correct: A left outer join returns nonmatching data from the left table. 2. Correct Answer: D A. Incorrect: AVG returns the average value of the rows. B. Incorrect: COUNT_BIG returns the count of rows as a big integer. C. Incorrect: STDEV returns the standard deviation of the rows. D. Correct: COUNT returns the count of rows as an integer. Z01A62271X.fm Page 854 Friday, April 29, 2005 8:08 PM Chapter 5: Lesson Review Answers 855 3. Correct Answer: D A. Incorrect: This syntax would return only matches for “Book”. B. Incorrect: This syntax would return matches for “Book*” (exact string). C. Incorrect: This syntax would return only matches for “Book”. D. Correct: This syntax would return all words starting with “Book”. Lesson 2 1. Correct Answers: A, C, and D A. Correct: STR converts numbers into strings. B. Incorrect: STUFF inserts strings inside other strings. C. Correct: CAST converts between data types. D. Correct: CONVERT converts between data types. 2. Correct Answer: C A. Incorrect: This method does not exist by default. B. Incorrect: This method does not exist by default. C. Correct: ToString returns the string representation of the UDT. D. Incorrect: This method does not exist by default. 3. Correct Answer: B A. Incorrect: STR is a system function. B. Correct: The AS keyword is used to create a column alias. C. Incorrect: The FROM keyword is used to query a table. D. Incorrect: The COLUMN keyword is used when defining a table. Lesson 3 1. Correct Answers: A, C, and D A. Correct: Static cursors do not detect any changes to underlying data. B. Incorrect: A so-called firehose cursor is a name for a type of forward-only cursor supported by some clients; it is not a SQL Server feature. C. Correct: Dynamic cursors detect all changes to the underlying data. D. Correct: Keyset cursors detect some changes to the underlying data. Z01A62271X.fm Page 855 Friday, April 29, 2005 8:08 PM [...]... need permissions directly to the base tables within the database Z01A62271X.fm Page 870 Friday, April 29, 2005 8:08 PM 870 Chapter 10: Lesson Review Answers Chapter 10: Lesson Review Answers Lesson 1 1 Correct Answers: A and C A Correct: When the database recovery model is changed from Full to BulkLogged, point-in-time recovery capability is lost and is not reestablished until the recovery model is... as its first row, so bcp must start the import at the second row Z01A62271X.fm Page 871 Friday, April 29, 2005 8:08 PM Chapter 10: Lesson Review Answers 871 Lesson 3 1 Correct Answer: B A Incorrect: The SQL Server service user account cannot be used to verify permissions because the SQL Server 2005 instance is not running in Mixed Mode B Correct: File access is verified by using the account of the... a table in SQL Server 2000 that contains the history of all backups on the instance This table no longer exists in SQL Server 2005 C Correct: The msdb.dbo.backupset table is used to track each backup that is generated It used with the msdb.dbo.backupfile table to identify each file that was created during a backup operation D Correct: The same backup information that is written to the SQL Server error... machine than the database server D Incorrect: An updategram is the mechanism that compares the original and current views of the XML data to create the Transact -SQL commands that synchronize the changes from the XML data into relational data Z01A62271X.fm Page 865 Friday, April 29, 2005 8:08 PM Chapter 8: Lesson Review Answers 865 Lesson 4 1 Correct Answer: C A Incorrect: SQLXML-annotated XSD schemas... be in single-user mode for clustered indexes to be created C Correct: A table lock can prevent users from accessing the data in the table during the bulk load D Incorrect: bcp can be run at any time Lesson 2 1 Correct Answers: B and D A Incorrect: The -T argument specifies that the connection to SQL Server is a trusted connection Although you need to establish a connection with the SQL Server, it does... backup and restore to move the database, which would leave the original database on Server1 for reporting while enabling you to create a copy of the database on Server2 D Correct: You can use SMO to extract all the elements of the database on Server1 and re-create them on Server2 Z01A62271X.fm Page 875 Friday, April 29, 2005 8:08 PM Chapter 11: Case Scenario Answers 875 Chapter 11: Case Scenario Answers... statement does not issue the DBCC NEWALLOC statement during its execution because this statement has been discontinued in SQL Server 2005 D Incorrect: The DBCC CHECKDB statement does not issue the DBCC TEXTALLOC statement during its execution; this statement has been discontinued in SQL Server 2005 2 Correct Answer: C A Incorrect: Although you can use this option against large databases, the PHYSICAL_ONLY... Incorrect: An HTTP endpoint allows only the SOAP payload A TCP endpoint supports the TSQL payload D Incorrect: An HTTP endpoint supports Windows authentication or certification-based authentication 2 Correct Answers: B and D A Incorrect: Mixed Mode allows both Windows accounts and SQL Server logins to be used SQL Server logins do not require authentication to the domain B Correct: The Windows login... Answers: B and D A Incorrect: A job category is used to categorize a job B Correct: Transact -SQL job steps use the job owner to determine access to database objects For other types of job steps, the owner is used to determine access authority for proxy accounts that SQL Server Agent impersonates C Incorrect: SQL Server Agent executes jobs D Correct: Only the job owner or a member of the sysadmin role... schemas just declare a mapping between an XML schema and a relational schemSQLXML-annotated XSD schemas by themselves do not support updating the XML data; they must be used in conjunction with SQLXML updategrams B Incorrect: SQLXML updategrams allow modification of XML values but do not support modifying the XML structure SQLXML updategrams take the XML structure as declared on an annotated XSD schema . creating SQL Server logins in SQL Server 2005. C. Correct: Although you can create SQL Server logins by using the sp_addlogin stored procedure, this procedure is only for backward compat- ibility the operating system secu- rity features and can implement enterprise-wide policies. B. Incorrect: SQL Server 2005 lets you apply the local Windows Password Policy to SQL Server logins. C. Correct:. are database-level objects, not server- level prin- cipals. Z01A62271X.fm Page 846 Friday, April 29, 2005 8:08 PM Chapter 2: Lesson Review Answers 847 B. Correct: Fixed server roles are server principals

Ngày đăng: 09/08/2014, 09:21