首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
27
问题
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://kaotiyun.com/show/vuhZ777K
本试题收录于:
微软70228题库微软认证分类
0
微软70228
微软认证
相关试题推荐
Severaltypesoffinancialriskareencounteredininternationalmarketing;themajorproblemsincludecommercial,political,an
AlmosteveryyearsincetheendofthefinancialcrisishasstartedwithrosyexpectationsamongAmericanforecasters,andthis
WhentheresidentsofBuenosAireswanttochangethepesostheydonottrustintothedollarstheydo,theygotoacueva,or"
Supposeyouarethepersonnelmanagerofacompanyandyou’vedecidedtheapplicantnamedZhangWeiisthebestcandidateforth
BarackObamaspentmuchtimeonthecampaigntrailproposingadramaticvisiontochangenotonlytheUnitedStatesforthebett
In2016,manyshoppersoptedtoavoidthefreneticcrowdsanddotheirholidayshoppingfromthecomfortoftheircomputer.But
In2016,manyshoppersoptedtoavoidthefreneticcrowdsanddotheirholidayshoppingfromthecomfortoftheircomputer.But
In2016,manyshoppersoptedtoavoidthefreneticcrowdsanddotheirholidayshoppingfromthecomfortoftheircomputer.But
Herearesomemanagementtoolsthatcanbeusedtohelpyouleadapurposefullife.1.UseYourResourcesWisely.Yourdecisi
MireilleGuiliano,achampagnecompanyexecutive,capturedtheattentionoffrustrateddieterswithherjoyoflifeinthe2005
随机试题
中国魏晋时期的______哲学流派对这个时期的诗歌、书法作品创作中深层的意蕴具有重要影响。()
A.含挥发油,油中主成分为桂皮酸B.含挥发油,油中主成分是α、β-桉油醇C.七叶树素、七叶树苷D.东莨菪碱、莨菪碱E.黄酮类化合物、绿原酸、异绿原酸
A.对工作极端负责,对技术精益求精B.树立正确的经营道德观C.为病患者提供质量保证的药品和安全、有效、经济、合理的药学服务D.互相关心,维护集体荣誉E.开展用药调查及药品利用评价药品流通领域的道德责任之一是()
案情:2009年1月,甲、乙、丙、丁、戊共同投资设立鑫荣新材料有限公司(以下简称鑫荣公司),从事保温隔热高新建材的研发与生产。该公司注册资本2000万元,各股东认缴的出资比例分别为44%、32%、13%、6%、5%。其中,丙将其对大都房地产开发有限公司所持
美国对失职或在执业中出现问题的房地产经纪人采取的主要措施有()。
当量子能量达到()eV以上时,对物体有电离作用,能导致机体的严重损伤,这类辐射称为电离辐射。
下列选项中,不属于全国人大常委会的预算管理职权的是()。
2019年2月,农业农村部等七部门联合印发《国家质量兴农战略规划(2018—2022年)》。下列关于实施质量兴农战略的说法,正确的是:
“杵臼之交”多用来指不计身份而结交的朋友。这里的“杵臼”在古代是用来做什么的?()
PeoplewhogrewupinAmericaandWesternEuropehavebecomeusedtotheideathattheWestdominatestheworldeconomy.Infact
最新回复
(
0
)