You can use below two choicesUse trace flag 272 o This will cause a log record to be generated for each generated identity value. The performance of identity generation may be impacted by turning on this trace flag. Use a sequence generator with the NO CACHE settingSetting Trace Flag 272 on SQL Server 2012 that you are expecting hereOpen "SQL Server Configuration Manager"Click "SQL Server Services" on the left pane Right-click on your SQL Server instance name on the right pane ->Default: SQL Server(MSSQLSERVER) Click "Properties" Click "Startup Parameters" On the "specify a startup parameter" textbox type "-T272" Click "Add" Confirm the changes
哎!用的是ADO.NET Entity Framework
由于ADO.NET Entity Framework每次操作SaveChanges都是事务性导致的吧?
EF5+CodeFirst先关注一下,有时间搞搞
由于ADO.NET Entity Framework每次操作SaveChanges都是事务性导致的吧?
可能你程序里
经常太多了rollback transaction
Use a sequence generator with the NO CACHE settingSetting Trace Flag 272 on SQL Server 2012 that you are expecting hereOpen "SQL Server Configuration Manager"Click "SQL Server Services" on the left pane
Right-click on your SQL Server instance name on the right pane ->Default: SQL Server(MSSQLSERVER)
Click "Properties"
Click "Startup Parameters"
On the "specify a startup parameter" textbox type "-T272"
Click "Add"
Confirm the changes
我暂时先不管吧 先观察观察