微软认证

Exhibit:UPDATE EzonexamConsolidatedSET District = ‘Mexico’WHERE RtvID = 45You work as database administrator at Ezonexam.com. You handle one SQL Server 2000 computer and one database.When users run the query in the exhibit above the receive the following

题目

Exhibit:

UPDATE EzonexamConsolidated

SET District = ‘Mexico’

WHERE RtvID = 45

You work as database administrator at Ezonexam.com. You handle one SQL Server 2000 computer and one database.

When users run the query in the exhibit above the receive the following error message:

Server: Mrh3612, Level 16, Stats 1, Line 1

View or function ‘EzonexamConsolidated’ is not updateable because it

contains aggregates:

How should you enable the query to run?

A.Create a non-normalized EzonexamConsolidated table and populate the table with data from the base tables.

B.The appropriate users should be granted UPDATE permissions on each base table.

C.To enable updates on the composite tables create an INSTEAD OF trigger on the view.

D.On each base table add a cascading update trigger.

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

You are the administrator of a SQL Server 2000 computer. The server contains confidential information about contracts on which your company has placed bids.

Company policy requires that bid information be removed permanently from the database one year after the bid closes. You need to comply with this policy and minimize server overhead.

What should you do?

A.Create a Data Transformation Services (DTS) package to remove bids that have a closing data older than one year.

B.Create a trigger to delete any bids that have a closing data older than one year. Bind the trigger to the bids table for all INSERT, UPDATE, and DELETE events.

C.Create a stored procedure to delete any bids that have a closing data order than one year. Use SQL server agent to schedule the stored procedure to run every night.

D.Create a view that contains a WHERE clause to exclude bids that have a closing date older than one year.


正确答案:C
解析:Explanation:Thisscenariorequiresustoremoveoldinformationonaregularbasis.Firstwecreateastoredprocedurewhichremovesallrowswherethebidinformationdateisolderthanthecurrentdateminusoneyear.Thenweschedulethisproceduretoruneveryday.Wewouldthenbesuretoneverhaveanyrowsolderthanayearinthetable.Note:Storedproceduresalsoimproveperformanceasthestoredprocedureiscachedafteritisrun.ThisresultsinareductionofphysicalI/O.WecanfurtherreduceServeroverheadbyschedulingthestoredproceduretorunduringoff-peakhours.IncorrectAnswers:A:ADataTransformationServices(DTS)packageprovidesasetoftoolsthatallowsustoextract,transform,andconsolidatedatastoredinavarietyofformatsandindifferentlocationsintosingleormultipledestinationssupportedbyDTSconnectivity.Thissolutionisinappropriate,asthedataexistsontheserverandnotinnumerouslocationsandwouldthusbecorrectlyformattedforuseonaninstanceSQLServer2000.B:TriggersareaspecialtypeofstoredprocedurethatexecutesautomaticallywhenanUPDATE,INSERT,orDELETEstatementisrunagainstatableorview.Inthisscenariohowever,thedatestampofthedatainthedatabasemustbecheckedandthedatadeletedoneyearafterthebidhasclosed.Thiscannotbeaccomplishedthroughtheuseofconstraintsortriggers.D:Creatingaviewthatexcludesthebidsthathaveaclosingdateolderthanoneyeardoesnotaddressthecompanypolicythatrequiresthatbidinformationberemovedpermanentlyfromthedatabaseoneyearafterthebidcloses.Thisdatawillstillexistinthebasetables.

第2题:

You are the administrator of three SQL Server 2000 computers at Five Lakes Publishing. One server, FLPSQL01, stores order data. You want to be able to use the other two servers, FLPSQL02 and FLPSQL03, to answer queries and run report. The planned network configuration is shown in the exhibit.

You want to use the database Maintenance Plan wizard to configure log shipping from FLPSQL01 to FLPSQL02 and FLPSQL03. You do not want users to add any new data on FLPSQL02 and FLPSQL03, but they must be able to run queries and reports.

Which two actions should you take? (Each correct answer presents part of the solution. Choose two)

A.Set the database load state for each destination server to No recovery mode.

B.Set the database load state for each destination server to standby mode.

C.Enable the allow database to assume primary role option for both destination servers.

D.Enable the allow database to assume primary role option for one destination server and then disable this option for other destination server.

E.Disable the allow database to assume primary role option for both destination servers.


正确答案:BE
解析:Explanation:B:Astandbyservercanbemaintainedtotaketheplaceoftheprimaryproductionserver,ifneeded.AstandbyserverisasecondarySQLServerinstallationthatiskeptup-to-datewithaprimarySQLServerinstallationthroughtheapplicationoftransactionlogbackupfiles.Youcanautomatetheprocessofmaintainingastandbyserverbycreatingbackup,copy,andrestorejobsthatareperiodicallyexecutedbySQLServerAgentontheprimaryserverandonthestandbyserver.Thisautomatedprocessiscalledlogshipping.Ifyouwantthedestinationdatabasetobeviewableforread-onlyqueries,youmustselecttheStandbyModeoption,thedefaultistheNoRecoveryModeoption.TheStandbymodespecifiesthatthesecondarydatabasebemadeavailableforuse,butinread-onlymode.E:Wedon'twantuserstoaddanydataonFLPSQL02orFLPSQL03.Thereforeweshoulddisabletheallowdatabasetoassumeprimaryroleoptionforthem.IfthisoptionwereenabledFLPSQL02andFLPSQL03wouldbeabletobeusedassourceservers.IncorrectAnswers:A:Thenorecoverymodespecifiesthatthesecondarydatabasebemadeunavailableforuse.WeneedstandbymodesincewewantFLPSQL02andFLPSQL03usedforqueriesandreports.Note:TheactiveportionofthetransactionlogontheprimaryservercanbebackedupusingtheNORECOVERYbackupoption.Thisoptionleavestheprimarydatabaseinrecoverymode.Whentheprimaryserverisreadytobebroughtbackonline,thetransactionlogsfromthestandbyserver(fortheperiodthatuserswereusingthestandbyserverastheprimaryserver)canbeappliedtotheprimaryserver.Thisavoidsthenecessityofapplyingacompletedatabasebackupandallapplicabletransactionlogstorestoretheprimaryserver.Theresultisasignificantdecreaseinthetimerequiredtobringtheprimaryserverbackonline.C:Theprimaryroleoptionmustbedisabledforbothdestinationservers.Ifnottheywouldbeabletochangeandupdatedata.D:Theprimaryroleoptionmustbedisabledforbothdestinationservers.Ifnottheywouldbeabletochangeandupdatedata.

第3题:

Exhibit:

BULK INSERT Ezonexam.dbo.employees

FROM ‘tk\africe\fubar512.txt’

WITH DATAFILETYPE = ‘char’,

FIELD/TERMINATOR = ‘\t’,

ROWTERMINATOR = ‘\n,’

TABLOCK

You work as database administrator at Ezonexam.com. You handle one SQL Server 2000 computer.

How should you improve the performance of the query in the exhibit above?

A. Extend the BULK INSERT statement with the BATCHSIZE option set it to equal to 5 percent of the number of rows to be loaded.

B. Extend the BULK INSERT statement with the BATCHSIZE option set it to equal to 10 percent of the number of rows to be loaded.

C. Extend the BULK INSERT statement with the ROWS_PER_BATCH option set it to equal to 5 percent of the number of rows to be loaded.

D. Extend the BULK INSERT statement with the ROWS_PER_BATCH option set it to equal to 10 percent of the number of rows to be loaded.

E. Insert a line before the BULK INSERT statement that drops the indexes for the customers table. Insert a line after the BULK INSERT statement that recreates the indexes for the customers table.

F. The TABLOCK option should be removed.

G. The ROWTERMINATOR line should be removed.


正确答案:F
F 解析:Explanation: The TABLOCK hint increases the number of locks during the adding process. This is the reason why response time are slows down during this process. By removing the TABLOCK hint the default more granular row-level lock will be used. This would decrease the scope of the locks which would result in less waiting jobs and performance would improve.

Note: The BULK INSERT statement is used to copy a data file into a database table or view in a format specified by the user. The BULK INSERT statement accepts the TABLOCK hint, which allows the user to specify the locking behavior. that the BULK INSERT statement should use. TABLOCK specifies that a bulk update table-level lock is taken for the duration of the bulk copy. If TABLOCK is not specified, the default uses row-level locks.

Incorrect Answers:
A, B, C, D: Effect would not be large
E: Some improvement, but not the best answer.
G: Would make the batch to stop working.

第4题:

You are the administrator of a SQL Server 2000 computer. The server is configured as shown in the Database Server Configuration exhibit.

You need to create a new database named Inventory. Employees in your company will use the Inventory database to track inventory data. Users will require immediate responses to queries that help them locate where parts are stored. The tables in the database will be configured as shown in the Database Schema exhibit.

The database will consume 14 GB of disk space. You must configure the data files and transaction log to accelerate query response time.

Which two courses of action should you take? (Each correct answer represents part of the solution. Choose two.)

A. On drive C, create a transaction log.

On drive D, create a data file in the PRIMARY filegroup.

On drive E, create a data file in the SECONDARY filegroup.

B. On each drive, create a transaction log.

On each drive, create a data file in the PRIMARY filegroup.

C. On drive D, create a transaction log.

On drive E, create a data file in the PRIMARY filegroup.

D. On the PRIMARY filegroup, create all tables and all indexes.

E. On the PRIMARY filegroup, create all tables. On the SECONDARY filegroup, create all indexes.

F. On the PRIMARY filegroup, create the Parts table and its indexes.

On the SECONDARY filegroup, create all other tables and their indexes.


正确答案:AE
A,E 解析:Explanation:
A: The transaction log should be placed on a separate disk. A transaction log would not benefit of two or more disks since it is sequential. Create two data files on two separate physical disks would improve performance.

E: Separating the tables and the indexes improve performance for in particular joins.

Note: With SQL Server 2000 it is possible to create tables or indexes on specific filegroups. This allows us to control where the database's tables and indexes are physically located as filegroups can be placed on different hard drives. Placing tables in one filegroup and the table's nonclustered indexes in another filegroup on different physical disk can improve database performance because it will allow separate threads to access the tables and indexes.

However, a table and its clustered index cannot be separated into different filegroups as the clustered index determines the physical order of the data in the table. Furthermore, the transaction log should be placed on a physically separate disk. The transaction log file is written serially; therefore, using a separate, dedicated disk allows the disk heads to stay in place for the next write operation. This will further improve performance.

Incorrect Answers:
B: To improve performance, the transaction log should not be placed on the same physical disk that the tables or indexes are placed on. The transaction log file is written serially; therefore, placing it on a separate, dedicated disk allows the disk heads to stay in place for the next write operation and thus improves performance.

Furthermore, placing tables in one filegroup and the table's nonclustered indexes in another filegroup on different physical disk can improve database performance because it will allow separate threads to access the tables and indexes. However, a table and its clustered index cannot be separated into different filegroups as the clustered index determines the physical order of the data in the table.

C: The transaction log should be placed on a physically separate disk. The transaction log file is written serially; therefore, using a separate, dedicated disk allows the disk heads to stay in place for the next write operation. This will further improve performance. In this solution, the tables and their indexes are placed on the same disk. This solution thus does not take advantage of the performance improvements that can be realised through the correct utlization of the available hardware.

D: In this solution, the tables and their indexes are placed on the same disk. This solution thus does not take advantage of the performance improvements that can be realised through the correct utlization of the available hardware.

F: Greater performance gains can be realized by placing tables in one filegroup and the table’s nonclustered indexes in another filegroup on different physical disk. This will allow separate threads to access the tables and indexes.

第5题:

You are the administrator of a SQL Server 2000 computer. You create a Data Transformation Services (DTS) package. The package is stored as a local package on the server. The package exports data from an online transaction processing (OLTP) database system to an online analytical processing (OLAP) database system that is located on a second SQL Server 2000 computer.

You want the package to execute automatically each evening at 8:00 P.M. What should you do?

A.Use SQL Server Enterprise Manager to create a new job Create a CmdExec job step that runs the dtsrun utility Schedule the job to run each night at 8:00 P.M.

B.Use SQL Server Enterprise Manager to create a new job Create a Transact-SQL job step to query data from the OLTP database Create a second Transact-SQL job step to launch the DTS package Schedule the job to run each night at 8:00 P.M.

C.Create a batch file that runs the dtsrun utility Use the Microsoft Windows Task Scheduler to run the job each night at 8:00 P.M. Configure the Windows Task Scheduler to use the local system account

D.Move the DTS package to the repository Configure the SQLServerAgent service on the OLAP database server to update the package each night at 8:00 P.M.


正确答案:A
解析:Explanation: Transfers can be defined and stored in a DTS package, which can then be run from a command line using the dtsrun utility (DTSRUN.EXE). CmdExec job steps are operating system commands or executable programs ending with .bat, .cmd, .com, or .exe. In this scenario we create a job consisting of a single cmdexec job step which runs the DTS package using the dtsrun utility.

Incorrect answers:
B: Only one job, not two, has to be created at the OLTP database server.

C: If the Task Scheduler is running as the local system account it wouldn’t be able to access the remote OLAP database server.

D: The DTS export package should be run at the OLTP database server, not at the OLAP database server. The DTS package is exported from the OLTP server to the OLAP server.

第6题:

You are the administrator of a SQL server computer. The server is running SQL Server 6.5 and SQL Server 7.0.

You install a named instance of SQL Server 2000, and then run the SQL server upgrade wizard. On the database selection screen, some of the SQL Server 6.5 databases are not listed.

You cancel the SQL Server upgrade wizard.

You need to ensure that the SQL Server 6.5 databases are listed in the wizard. What should you do?

A.Uninstall SQL Server 7.0, and then rerun the SQL Server upgrade wizard.

B.Run the Microsoft SQL Server-switch application, and then rerun the SQL Server upgrade wizard.

C.Create a data transformation services package that imports the databases from SQL Server 6.5 to SQL Server 2000, and then execute the package.

D.Uninstall SQL Server 2000, and then reinstall SQL Server 2000 as the default instance.


正确答案:D
解析:Explanation:ToruntheSQLServerUpgradeWizard,youmusthaveadefaultinstanceofMicrosoftSQLServer2000installedonyourcomputer.IncorrectAnswers:A:ItisnotnecessarytouninstallSQLServer7.0.JustinstallSQLServer2000asthedefaultinstance.WecannotruntheSQLServerupgradewizardunlessSQLServer2000isinstalled.B:ToruntheSQLServerUpgradeWizard,youmusthaveadefaultinstanceofMicrosoftSQLServer2000installedonyourcomputer.C:WewanttoensurethattheSQLServer6.5databasesarelistedintheSQLServer2000installationwizard.TocreateDTStransformationpackagesthatupgradeSQLServer6.5databaseestoSQLServer2000databaseswemustinstallSQLServer2000first.

第7题:

You are the administrator of a SQL server 2000 computer that contains a database named Acct. The database contains 1.5 GB of data. The server has one 9-GB hard disk that is configured as shown in the Exhibit.

You need to import data into the database without adversely affecting database performance. The data will require an additional 2GB of storage space.

What should you do?

A.Add another data file on drive E, and then add the file to the PRIMARY filegroup.

B.Move the transaction log file to drive E, and set the file growth of Acc_Data.mdf by selecting the Unrestricted file growth option.

C.Rebuild all clustered indexes so that they have a fill factor of 100.

D.Compress drive D.


正确答案:A
解析:Explanation: We must take precautions so that the import process of 2 GB data will run. We add a new file to drive E, which has 3 GB free disk space. By placing the new file in the primary file group we ensure that new data added to the database will be added to new data file. The primary file group is the default file group and new data is automatically added to it.

Incorrect Answers:
B: Moving the transaction log from Drive D to Drive would free up 800MB. This would leave 1.3GB of free disk space on drive D. But the import process will require another 2GB so we will not have enough free disk space.

C: Rebuilding the clustered indexes with a fill factor of 100 makes that the index pages full. This would degrade performance during the import process due to page splits.

D: Compressing a partition which is used by SQL Server is not a good idea. It would, if at all possible, degrade performance.

第8题:

You have an SQL query that takes one minute to execute. You use the following code segment to execute theSQL query asynchronously.Dim ar As IAsyncResult = cmd.BeginExecuteReader()You need to execute a method named DoWork() that takes one second to run while the SQL query is executing.DoWork() must run as many times as possible while the SQL query is executing.Which code segment should you use?()

A.

B.

C.

D.


参考答案:B

第9题:

You are the administrator of a SQL Server 2000 computer. The server contains database named Sales. Users report that they cannot add new data to the database. You examine the properties of the database. The database is configured as shown in the Sales Properties exhibit.

You examine drive E. The hard disk is configured as shown in the Local Disk Properties exhibit.

You want the users to be able to add data, and you want to minimize administrative overhead. What should you do?

A.Increase the maximum file size of Sales_Data to 1,500MB.

B.Use the DBCC SHRINKDATABASE statement.

C.Set automatic file growth to 10 percent.

D.Create another data file named Sales_Data2 in a new SECONDARY filegroup.


正确答案:A
解析:Explanation: By examining the first exhibit we see that the database has reached its maximum size of 1001 MB. The data file is located on drive E and the second exhibit shows us that there is enough free space on that disk to increase the maximum size of the data file to 1,500 MB.

Incorrect Answers:
B: DBCC SHRINKDATABASE could possibly shrink the database and new records could be added for a while, but it would just be a temporary solution.

C: The database is already set to automatic file growth, but it has reached the maximum size.

D: The primary file has reached it maximum size. A secondary filegroup would help if it was set to the default file group. New data would still be added to the primary filegroup which is at its maximum size.

第10题:

You are the administrator of SQL server 2000 computer. The server contains a database named MedicalRecords. Users access medical records by using the PatientID field. This field is the clustered primary key for the Patients table. When users try to access medical records, the database responds slowly. You examine the database options as shown in the exhibit.

You want to accelerate query response time and minimize administrative overhead. How should you reconfigure the database?

A.Create a SQL Server Agent job to execute the UPDATE STATISTICS statement, and schedule the job to run weekly.

B.Select the Auto Update Statistics check box.

C.Run the database maintenance plan wizard, and accept the default settings.

D.Rebuild the primary key as a nonclustered primary key.

E.Clear the Auto Create Statistics check box.


正确答案:B
解析:Explanation:TheAutoUpdateStatisticsoptionisselectedbydefaultbutintheExhibitithasbeendisabled.Apparentlythestatisticsareout-of-dateandthequeriesarerunningslowly.TheAutoUpdateStatisticsoptionshouldbeenabledtoincreaseperformanceandminimizeadministrativeoverhead.Note:SQLServerkeepsstatisticsaboutthedistributionofthekeyvaluesineachindexandusesthesestatisticstodeterminewhichindexwouldbethebestindextouseforaparticularqueryprocess.Asthedatainacolumnchanges,indexandcolumnstatisticscanbecomeout-of-date.Thiscanhinderthequeryoptimizer’sabilitytomakeoptimaldecisionsonhowtoprocessaquery.Asaresultqueryperformancewilldeteriorate.Whenstatisticsbecomeout-of-datetheycanbeupdatedautomaticallyiftheAutoUpdateStatisticscheckboxonthetablepropertydialogboxischecked.IncorrectAnswers:A:Itwouldrequiresomeadministrativeefforttosetupjobthatupdatethestatistics.JustselectingtheAutoUpdateStatisticscheckisabettersolution.C:TheDatabaseMaintenancePlanWizardcannotbeusedtorecreatethestatistics,whicharethemainproblematthemoment.Note:TheDatabaseMaintenancePlanWizardcanbeusedtosetupthecoremaintenancetasksnecessarytoensurethatadatabaseperformswell,isregularlybackedup,andischeckedforinconsistencies.TheDatabaseMaintenancePlanWizardcreatesaSQLServer2000jobthatperformsthesemaintenancetasksautomaticallyatscheduledintervalsandcanbeusedtoreorganizethedataonthedataandindexpagesbyrebuildingindexeswithanewfillfactor;compressdatafilesbyremovingemptydatabasepages;updateindexstatisticstoensurethequeryoptimizerhasup-todateinformationaboutthedistributionofdatavaluesinthetables;perform.internalconsistencychecksofthedataanddatapageswithinthedatabasetoensurethatasystemorsoftwareproblemhasnotdamageddata;backupthedatabaseandtransactionlogfiles;andtosetuplogshipping.D:Lookingattheexhibitweseethatthisisastatisticsproblem,notaindexproblem.Note:Anonclusteredindexissimilartoanindexinatextbook.Withthistypeofindex,thedataisstoredinoneplaceandtheindexinanother.Theseindexes,however,pointtothestoragelocationofthedata.Nonclusteredindexesshouldbeusedoncolumnsthatcontainalargenumberofdistinctvalues;forqueriesthatdonotreturnlargeresultsets;andforcolumnsthatarefrequentlyinvolvedinsearchconditionsofaquerythatreturnexactmatches.Aclusteredindex,ontheotherhand,determinesthephysicalorderofdatainatable.ThePRIMARYKEYindexautomaticallycreatesaclusteredindexasitisusedtoidentifyarowunlessanonclusteredindexisspecified.E:WhensettheAutoCreateStatisticscheckboxischecked,statisticsareautomaticallycreatedoncolumnsthatareusedinapredicate.AddingstatisticsimprovesqueryperformancebecausetheSQLServerqueryoptimizercanbetterdeterminehowtoevaluateaquery.Ifthestatisticsarenotused,SQLServerautomaticallydeletesthem.Whenthischeckboxiscleared,statisticsarenotautomaticallycreated.

更多相关问题