2014 OLTP Memory Database lock 测试
根据微软的说法,由于内存数据库使用了乐观并发控制,所以事务不需要锁来锁定资源保证一致性。微软认为在内存数据库的事务中冲突和失败是非常少的情况,所以假定
NAME size
name size dbo20480 ix_Int_Val10240
[Description]
request_session_id dm_db_xtp_transactions
request_session_id dm_db_xtp_transactions
dbo
request_session_id dm_db_xtp_transactions
WHERE Id_tb1 = 1
Session2和session3 直接报错,没有等待时间。错误如下:
Msg 41302, Level 16, State 110, Line 15
The current transaction attempted to update a record that has been updatedsince this transaction started. The transaction was aborted.
Msg 3998, Level 16, State 1, Line 12
Uncommittable transaction is detected at the end of the batch. Thetransaction is rolled back.
The statement has been terminated.
这跟普通的数据库是不一样的,在普通数据库中由于session1锁定资源,所以session2和session3都会被block. 所以针对于前面的情况需要有重试机制:
Guidelinesfor Retry Logic for Transactions on Memory-Optimized Tables
OLTP数据库如何做冲突检测可以参考:Transactionsin Memory-Optimized Tables
因为2014数据库研究的还不是太多,自己的理解可能有问题,欢迎大家指正。
本文出自 “关注SQL Server技术” 博客,,请务必保留此出处

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

For objects with the same name that already exist in the SQL Server database, the following steps need to be taken: Confirm the object type (table, view, stored procedure). IF NOT EXISTS can be used to skip creation if the object is empty. If the object has data, use a different name or modify the structure. Use DROP to delete existing objects (use caution, backup recommended). Check for schema changes to make sure there are no references to deleted or renamed objects.

The import steps are as follows: Copy the MDF file to SQL Server's data directory (usually C:\Program Files\Microsoft SQL Server\MSSQL\DATA). In SQL Server Management Studio (SSMS), open the database and select Attach. Click the Add button and select the MDF file. Confirm the database name and click the OK button.

When the SQL Server service fails to start, here are some steps to resolve: Check the error log to determine the root cause. Make sure the service account has permission to start the service. Check whether dependency services are running. Disable antivirus software. Repair SQL Server installation. If the repair does not work, reinstall SQL Server.

To view the SQL Server port number: Open SSMS and connect to the server. Find the server name in Object Explorer, right-click it and select Properties. In the Connection tab, view the TCP Port field.

If you accidentally delete a SQL Server database, you can take the following steps to recover: stop database activity; back up log files; check database logs; recovery options: restore from backup; restore from transaction log; use DBCC CHECKDB; use third-party tools. Please back up your database regularly and enable transaction logging to prevent data loss.

SQL Server database files are usually stored in the following default location: Windows: C:\Program Files\Microsoft SQL Server\MSSQL\DATALinux: /var/opt/mssql/data The database file location can be customized by modifying the database file path setting.

Deleting dat files has no effect; dat files can be seen as DATA according to the extension, that is, data files. This type of file does not have an absolute definition; ".dat" is not a standard file, and many files use this extension, but the meaning of the file is different, and many data analysis software also use this extension to save data, so it depends on the specific software situation.

The problem was found that this time I was using the SqlServer database, which I had not used before, but the problem was not serious. After I connected the SqlServer according to the steps in the requirements document, I started the SpringBoot project and found an error, as follows: At first I thought it was a SqlServer connection. There was a problem, so I went to check the database and found that everything was normal. I first asked my colleagues if they had such a problem, and found that they did not, so I started my best part, facing Baidu. programming. The specific error message I started to solve was this, so I started Baidu error reporting: ERRORc.a.d.p.DruidDataSource$CreateCo
