Exhibit:BULK INSERT Ezonexam.dbo.employeesFROM ‘tk\africe\fubar512.txt’WITH DATAFILETYPE = ‘char’,FIELD/TERMINATOR = ‘\t’,ROWTERMINATOR = ‘\n,’TABLOCKYou work as database administrator at Ezonexam.com. You handle one SQL Server 2000 computer.How should yo

题目

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.
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

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.

第2题:

You are a professional level SQL Server 2005 database administrator in an international corporation named Wiikigo. You are experienced in implementing high-availability solutions, monitoring the database server, and design deployment. In the company, you major job is the deployment, maintenance and support of Microsoft SQL Server 2005.You work as a database administrator for your company. Your job is to manage a SQL Server 2005 database, and there are several indexes in the SQL Server 2005. A stored procedure should be written, and the procedure should be utilized to check the indexes for fragmentation.  From the following four Transact-SQL statements, which one should be utilized achieve the goal?()

  • A、To achieve the goal, DBCC DBREINDEX should be utilized.
  • B、To achieve the goal, SELECT * FROM sys.indexes should be utilized.
  • C、To achieve the goal, SELECT * FROM sys.dm_db_index_physical_stats should be utilized.
  • D、To achieve the goal, DBCC INDEXDEFRAG should be utilized.

正确答案:C

第3题:

You are the database administrator for a financial services company. Employees enter data 24 hours a day into a SQL Server 2000 database. These employees report slower response times when new account information is gathered from branch offices and added to the database. You currently use the following BULK INSERT statement to add the account information:

BULK INSERT finance.dbo.customers

FROM ‘di\bulk\accts143_10141000.txt’

WITH DATAFILETYPE = ‘char’,

FIELD/TERMINATOR = ‘\t’,

ROWTERMINATOR = ‘\n,’

TABLOCK

You want to ensure that response times do not slow when new account information is added to the database. What should you do?

A.Drop the indexes for the customers table before the data load, and then re-create the indexes after the data load is complete.

B.Remove the TABLOCK option from the BULK INSERT statement.

C.Add the BATCHSIZE option to the BULK INSERT statement and then set the option equal to 10 percent of the number of rows to be loaded.

D.Add the ROWS_PER_BATCH option to the BULK INSERT statement and then set the option equal to 10 percent of the number of rows to be loaded.


正确答案:B
解析: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: The recommendation to perform. the bulk copy operation with the indexes in place depends on the amount of data to be copied into the table compared to the amount of existing data already in the table. The large the amount of data to be loaded into a table, relative to the amount of data already in the table, the more efficient it is to drop all indexes on the table, perform. the bulk copy operation, and then re-create the indexes after the data is loaded

C: The BATCHSIZE option of the BULK INSERT statement is used to specify that SQL Server 2000 must treat each batch of rows inserted into the table as a separate transaction. This is useful when errors occur in the bulk copy operation, which would cause the transaction to be rolled back. By specifying the BATCHSIZE option, only the current transaction will be rolled back if an error occurs and the destination table still contains the other batches of rows that were successfully inserted.

D: The ROWS_PER_BATCH option of the BULK INSERT statement SQL Server can be used to
indicate the approximate number of rows in a batch. SQL Server 2000 then optimizes the load automatically, according to the batch size value, which may result in better performance. Although accuracy in the clause is not critical, the larger the batch size is, the better the performance of the bulk copy operation.

第4题:

You work in a company which is named Wiikigo Corp. The company uses SQL Server 2008. You are the administrator of the company database. Now you are in charge of a SQL Server 2008 instance. There is a SQL Server 7.0 database. You upgrade the database to the SQL Server instance. According to the company requirement, you must make sure that suspect pages can be detected in the database. So what action should you perform to achieve this goal?()

  • A、For the database, you should turn on the TRUSTWORTHY database option
  • B、For the database, the PAGE_VERIFY database option should be set to CHECKSUM
  • C、For the database, the database compatibility level option should be set to 10
  • D、For the model database, the PAGE_VERIFY database option should be set to TORN_PAGE_DETECTION. 

正确答案:B

第5题:

You work in a company which is named Wiikigo Corp. The company uses SQL Server 2008. You are the administrator of the company database. Now you are in charge of a SQL Server 2008 instance. There is a database named Dworks in the instance. The Dworks database has a table named Orderthings. According to the company requirement, you have to export all data from the Orderthings table to a file. During the export, you must make sure that the data export process is saved for reuse and a Microsoft Office Open XML document format is used. What should you do?()  

  • A、You should run the bulk copy program utility along with an output file and no format file
  • B、You should run the SQLCmd utility and save the output to a file
  • C、You should run the SQL Import and Export Data Wizard and save the output to a file.
  • D、You should run the bulk copy program utility along with a format file and an output file.

正确答案:C

第6题:

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.


正确答案:C
解析:Explanation:SQLServer2000usesINSTEADOFtriggersandpartitionedviewstoenhancetheclassofupdateableviews.INSTEADOFtriggerscanbecreatedonaviewinordertomakeaviewupdateable.TheINSTEADOFtriggerisexecutedinsteadofthedatamodificationstatementonwhichthetriggerisdefined.Thistriggerallowstheusertospecifythesetofactionsthatneedtotakeplaceinordertoprocessthedatamodificationstatement.Thus,ifanINSTEADOFtriggerexistsforaviewonagivendatamodificationstatement,thecorrespondingviewisupdateablethroughthatstatement.Iftheviewisapartitionedview,theviewisupdateable,subjecttocertainrestrictions.IncorrectAnswers:A:Creatingatablethatcombinesthecompositetablesthattheviewisbasedonwoulddenyustheabilitytousetheviewtoreturnaggregatedcolumnvalues.B:Theerrormessageisnotrelatedtopermissionsbuttotheupdateableofthetable.D:CascadingreferentialintegrityconstraintsmakesitpossibletodefinetheactionsSQLServer2000takeswhenauserattemptstodeleteorupdateakeytowhichexistingforeignkeyspoint.CascadingreferentialintegrityconstraintsfireAFTERtriggersafterallofthecascadingreferentialactionsdirectlycausedbytheoriginalDELETEorUPDATEareperformed.

第7题:

You work in a company which uses SQL Server 2008. You are the administrator of the company database. Now you are in charge of a SQL Server 2008 instance which contains a database. According to the company requirement, you have to move the application from Microsoft SQL Server 2000 to Microsoft SQL Server 2008. You have to monitor the SQL Server instance to record the use of features.  These features will be discontinued. What should you do? ()

  • A、The SQL Server 2008 Upgrade Advisor should be used. 
  • B、The SQL Server Profiler which captures the SQL:BatchCompleted and Exception event classes should be used. 
  • C、A SQL server-side trace that captures the Deprecation Announcement and Deprecation Final Support event classes should be used 
  • D、A SQL server-side trace that captures the SQL:BatchCompleted and Exception event classes should be used.

正确答案:C

第8题:

You are the administrator of two Microsoft Windows 2000 advanced server computers. On these servers, you are configuring a database that will store accounting information for your company.

The data must be available at all times. Interruptions in data connectivity should not last longer than five minutes. Any changes to the database should not require you to reconfigure the client computers.

How should you configure the database?

A.Configure the database on the two servers as a SQL Server 2000 cluster.

B.Configure the database on one server, and then configure a standby database on the second server.

C.Configure the database on each server. Use Microsoft Distributed Transaction Coordinator to keep the two servers perfectly synchronized.

D.Configure the database as a federated database, and then partition half the data on each server.


正确答案:A
解析:Explanation: SQL Server 2000 failover clustering provides high availability support by allowing us to configure one failover cluster to automatically, with no manual configuration, fail over to any other node in the failover cluster configuration. In this way, we minimize system downtime and provide high server availability during an operating system failure or a planned upgrade. Before SQL Server 2000 failover clustering can be set up, we must install Windows NT 4.0, Enterprise Edition, Windows 2000 Advanced Server or Windows 2000 Datacenter Server, and the Microsoft Cluster Service (MSCS).

In this scenario a cluster would be preferred to a standby server because it would be available immediately. A standby server on the other would require manual configuration and more time to become online.

Incorrect Answers:
B: A standby server would require you to reconfigure clients to allow it to connect to the standby server when the main server goes down. It would require at least several minutes of manual administration before the standby server would be operational. But the scenario requires that no reconfiguration of the client computers should be necessary. Therefore we should use a SQL Server 2000 cluster not a standby server.

Note: A standby server is a second server that contains a copy of the databases on the primary server and that can be brought online in the event of a primary server failure or due to scheduled maintenance on the primary server. This allows users to continue working with databases when the primary server becomes unavailable. When the primary server becomes available again, any changes to the standby server's copies of databases must be restored back to the primary server.

C: The Microsoft Distributed Transaction Coordinator coordinates distributed transactions, but would not increase availability.

Note: The Microsoft Distributed Transaction Coordinator (MS DTC) is a transaction manager that allows client applications to include several different sources of data in one transaction. MS DTC coordinates committing the distributed transaction across all the servers enlisted in the transaction.

An installation of SQL Server 2000 can participate in a distributed transaction by calling stored procedures on remote servers running SQL Server, automatically or explicitly promoting the local transaction to a distributed transaction and enlist remote servers in the transaction, and making distributed updates that update data on multiple OLE DB data sources. If these OLE DB data sources support the OLE DB distributed transaction interface, SQL Server 2000 can also enlist them in the distributed transaction. The MS DTC service coordinates the proper completion of the distributed transaction to ensure that either all of the updates on all the servers are made permanent, or, in the case of errors, all erased.

D: With Federated SQL Server 2000 servers, SQL Server 2000 databases can be spread across a group of autonomous database servers. These are capable of supporting the processing growth requirements of the largest Web sites and enterprise data-processing systems built with Microsoft Windows DNA, which divides the processing units of a data processing system into logical tiers. This however does not improve availability.

第9题:

You work in a company which is named Wiikigo Corp. The company uses SQL Server 2008. You are the administrator of the company database. Now you are in charge of a SQL Server 2008 instance. There is a database named Dworks in the instance. Now you get a report from users saying that DB1 meets deadlock problems. As the technical support, you have to capture the deadlock information to the SQL Server error log. What should you do?()  

  • A、For the AdventureWorks database, enable Server Auditing 
  • B、First you should set the appropriate trace flags as a startup parameter, and then restart the SQL Server instance 
  • C、You should configure the data collector and make it capture the deadlock graphs
  • D、You should configure a SQL Profiler trace, and make it capture the deadlock graphs

正确答案:B

第10题:

You are a professional level SQL Server 2005 database administrator in an international corporation named Wiikigo. You are experienced in implementing high-availability solutions, monitoring the database server, and design deployment. In the company, you major job is the deployment, maintenance and support of Microsoft SQL Server 2005. You work as a database administrator for your company. A user database named Products is included by your SQL Server 2005 computer. SQL Server Integration Services (SSIS) packages are utilized to export data from the Products database to a text file. You deliver the text file to your company’s trading partners by utilizing FTP. You are required to make sure that your SSIS packages can be recovered from the occurrence of a disaster.  Which action should be performed to finish the task?()

  • A、To finish the task,the Products database should be backed up.
  • B、To finish the task,your server should be set to utilize the full recovery model.
  • C、To finish the task,your server should be set to utilize the bulk-logged recovery model.
  • D、To finish the task, the msdb database should be backed up.

正确答案:D

更多相关问题