We know that DBMS harness many technique to ensure the data integrity and satisfying the ACID properties when there are many transactions running simultaneously in a concurrency environment. Apart from setting Isolation Level, what other means taken by DBMS to ensure data integrity? what is the relationship between these technique? Could...
Our application needs a simple scheduling mechanism - we can schedule only one visit per room for the same time interval (but one visit can be using one or more rooms). Using SQL Server 2005, sample procedure could look like this:
CREATE PROCEDURE CreateVisit
@start datetime, @end datetime, @roomID int
AS
BEGIN
DECLARE @isFreeRoom I...
Does the inserts are finished with the transaction commit? Or they can be finished later?
...
Hi. I have a j2ee application running on spring framework. I am trying to apply transaction management using aop but apparently it won't work. I am trying to apply transaction to a function from a class named RegisterBLogic with function name execute(ParamObject obj). My function inserts into a database. I also put a throw ne Exception m...
Hello,
for some reason I'm experiencing the Operational Error with "can't rollback" message when I attempt to roll back my transaction in the following context:
try:
cursors[instance].execute("lock revision, app, timeout IN SHARE MODE")
cursors[instance].execute("insert into app (type, active, active_revision, contents, z) valu...
I store file’s attributes (size, update time…) in database. So the problem is how to manage transaction for database and file.
In jee environment, JTA is just able to manage database transaction.
In case, updating database is successful but file operation fails, should I write file-rollback method for this? Moreover, file operation in ...
Hello,
Should I initialize the database cursor once per each Apache thread, or should I initialize one in every function available to HTTP clients?
What happens when the client terminates the connection (i.e. user closes the browser tab)? Does the server-side function that was processing the request continue normally until it returns, ...
I am going through this tutorial about PDO and have come to the point about transactions. Skipping the connection parts, I have this php code:
try
{
$db->beginTransaction();
$db->exec('DROP TABLE IF EXISTS animals');
$db->exec('CREATE TABLE animals ('
.'animal_id MEDIUMINT(8) NOT NULL AUTO_INCREMENT PRIMARY KEY,'
...
Hi,
I'm implementing a simple update mechanism for an application I'm writing the last part of the update process consist in renaming the current application executable file from something like myApp.exe to myApp.old.exe and then renaming the freshly downloaded and updated file from myApp.new.exe to myApp.exe.
I'd like to find a way fo...
I'm looking to add transactional support to my DB engine and providing to Abstract Transaction Handling down to passing in Guids with the DB Action Command. The DB engine would run similar to:
private static Database DB;
public static Dictionary<Guid,DBTransaction> Transactions = new ...()
public static void DoDBAction(string cmdstring...
I have an issue with SQLAlchemy apparently committing. A rough sketch of my code:
trans = self.conn.begin()
try:
assert not self.conn.execute(my_obj.__table__.select(my_obj.id == id)).first()
self.conn.execute(my_obj.__table__.insert().values(id=id))
assert not self.conn.execute(my_obj.__table__.select(my_obj.id...
Hi everybody, I really hope you can help!
I use the following function to send a message in my PHP/MySql application:
public function sendMail($sender_id, $recipient_id, $subject, $message) {
$q = "INSERT INTO MAIL_MESSAGE (subject, message, date) VALUES ('$subject', '$message', NOW() )";
$s = mysql_query($q);
i...
If I passed a list of key ids as an argument in a transaction, would the change associated with the first key in the list happen first? And if not, how do I specify the order that I want the changes to happen in?
As a concrete example, consider this code below from Google Docs Transactions--would changes to the first item in acc.key() h...
Given the following:
select * from a;
select * from b;
Are these two statements run in an implicit transaction?
...
I'm looking for a key -> value dictionary library written in C that supports a theoretically unlimited number of cheap transactions.
I'd like to have one dictionary in memory, with hundreds of threads starting transactions, possibly modifying the dictionary, ending (completing) the transaction or potentially aborting the transaction. On...
We are using jboss cache as second level hibernate cache. It is configured to evict changed entities asyncronously. But this feature does not work for us. Some debugging revealed the root of the problem.
When treecache accessed, it adds itself as transaction listener. This is done by adding Synchronization to active transaction inside o...
How can I reliably check that MSDTC has promoted a transaction to a distributed transaction?
This is when using TransactionScope in .net.
Currently a co-worker is testing this by shutting down the coordinator on his machine - if an exception is thrown this is taken as evidence that an attempt to promote the transaction has occurred. Is...
In essence this is a followup of this question. I'm beginning to feel that I should give up the whole idea, but I'll give it one more shot.
What I want is pretty much like a DB transaction. It should track my changes to the DB and then in the end allow me to either commit or rollback them. If I insert an object, I should get it back in ...
I'm encountering a hang when the program tries to access the fruit database. I've already enabled network access MSDTC on both my development computer and the SQL Server server.
Code:
(pardon the code coloring...SO's misinterpreting my VB .NET)
Using ts As New TransactionScope
Dim fruit As New FruitDataContext
D...
i have a table of resources (lets say cars) which i want to claim atomically. I then want information about which resource I just claimed.
If there's a limit of one resource per one user, i can do the following trick:
UPDATE cars SET user = 'bob' WHERE user IS NULL LIMIT 1
SELECT * FROM cars WHERE user = 'bob'
This way, I claim the ...