首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
You are the database administrator for a retail company. The company owns 270 stores. Every month, each store submits approximat
You are the database administrator for a retail company. The company owns 270 stores. Every month, each store submits approximat
admin
2009-05-19
20
问题
You are the database administrator for a retail company. The company owns 270 stores. Every month, each store submits approximately 2,000 sales records, which are loaded into a SQL Server 2000 database at the corporate headquarters.
A Data Transformation Services (DTS) package transforms the sales records, as they are loaded. The package writes the transformed sales records to the Sales table, which has a column for integer primary key values. The IDENTITY property automatically assigns a key value to each transformed sales record.
After loading this month’s sales data, you discover that a portion of the data contains errors. You stop loading data, identify the problem records, and delete those records from the database.
You want to reuse the key values that were assigned to the records that you deleted. You want to assign the deleted key values to the next sales records you load. You also want to disrupt users’ work as little as possible.
What should you do?
选项
A、Export all records from the Sales table to a temporary table. Truncate the Sales table, and then reload the records from the temporary table.
B、Export all records from the Sales table to a text file. Drop the Sales table, and then reload the records from the text file.
C、Use the DBCC CHECKIDENT statement to reseed the Sales table’s IDENTITY property.
D、Set the Sales table’s IDENTITY_INSERT property to ON. Add new sales records that have the desired key values.
答案
C
解析
Explanation: DBCC CHECKIDENT is used to check the current identity value for the specified table. It can be set to correct the identity value by specifying the RESEED option with DBCC CHECKIDENT.
Note: Example:
Assume that we have a table called test with an identity column with seed (1,1) and 1000 rows and that we delete row 901 to 950. We could then issue the command
DBCC CHECKIDENT (test, reseed, 900)
And load the 50 missing rows. These rows would get the values 901, 902, …,950 in the identity column.
We should then set the identity value to 1000 again:
DBCC CHECKIDENT (test, reseed, 1000)
So that the next new row will have identity 1001.
Incorrect Answers:
A: Exporting the data from the Sales table and then reloading the data will not correct errors contained in the table as these errors will also be exported as they are part of the data already in the table.
B: Exporting the data from the Sales table and then reloading the data will not correct errors contained in the table as these errors will also be exported as they are part of the data already in the table.
D: The SET IDENTITY_INSERT command allows explicit values to be inserted into the identity column of a table. To reuse the old key values from the rows that was deleted would require manual commands and would be awkward. This is not the best solution.
转载请注明原文地址:https://jikaoti.com/ti/9wO7FFFM
本试题收录于:
微软70228题库微软认证分类
0
微软70228
微软认证
相关试题推荐
Severaltypesoffinancialriskareencounteredininternationalmarketing;themajorproblemsincludecommercial,political,an
Ofallthegoodsandservicestradedinthemarketeconomy,pharmaceuticalsareperhapsthemostcontentious.Thoughproducedby
Writeanessayof160-200wordsbasedonthefollowingtable.Youressayshould1.describethechangesintheaveragefamilyex
EricHansenwritesabouttravelasaparticipatingenthusiastratherthanamereobserver.【T1】Itgivesthesenineessays,based
EricHansenwritesabouttravelasaparticipatingenthusiastratherthanamereobserver.【T1】Itgivesthesenineessays,based
Herearesomemanagementtoolsthatcanbeusedtohelpyouleadapurposefullife.1.UseYourResourcesWisely.Yourdecisi
Herearesomemanagementtoolsthatcanbeusedtohelpyouleadapurposefullife.1.UseYourResourcesWisely.Yourdecisi
InParagraphs1and2,thetextshowsPTK’s______.Skepticalobserversbelievethatancestrytestingfailsto______.
Writealettertorecommendyourstudent,LiXu,forapositionofadministratorinacompany.Youshouldincludethedetailsyo
随机试题
中国古代建筑在布局上的显著特点是()
A.丘脑的感觉接替核与联络核B.丘脑的髓板内核群C.下丘脑外侧D.下丘脑视交叉上核神经元与摄水有关的中枢位于
中药注射剂使用禁忌人群包括()。
“乌坎选举”成为2012年度热词。2012年2月1日,乌坎村7688名具有推选资格的18岁以上村民亲临或委托投票,推选l1名委员组成村民选举委员会。关于村民选举委员会说法正确的是哪些项?()
某一工作的自由时差等于()。
某承包商通过竞标取得某标段公路建设项目后,立即组织施工队伍进场施工。为保证工期和控制成本,同时考虑到自身特点及业主和监理工程师要求,承包商决定将一部分防护工程和部分通道与涵洞工程分包给另外承包商施工,报业主或监理工程师审查后,该承包商与分包商签订了分包合同
基金托管人资金清算的风险控制措施包括()。
行政法基本原则中的行政合理性原则产生的主要原因是()的存在和扩大。
科学选择新兴战略性产业非常重要,选对了就能跨越发展,选错了将会_________时机。 填入划横线部分最恰当的一项是()。
GoldRushinCaliforniaVocabularyandExpressionsnuggetsawmillfinancierJamesMarshallwasthepersonwhofoundthe
最新回复
(
0
)