Giulio Petrucci said:
AFAIK (as I'm not so "skilled" in db administration), transaction must be
explicitly enabled on a Sql Server DMBS, right?
Every Database Management System worthy of that name (including, of
course, Microsoft SQL Server) ALWAYS uses transactions, even if they are
implicit.
For instance, if you execute an "Update MyTable Set col=value where...",
then the server will treat that command as a transaction all by itself. It
will lock all the records that are updated and then release the locks when
its work is done (or roll back all the changes if an error is encountered
when updating one of the rows). Other processes will automatically be
prevented from accessing the modified rows until the query (or rather, the
implicit transaction started by this query) is finished.
The only instance when you need to explicitly script a transaction is the
case when you are doing a sequence of several changes (several UPDATEs,
INSERTs and DELETEs), and you want to "group" them so that they all succeed
or they all fail (and meanwhile, you don't want any other process
interferring or reading data that are not yet committed, so everything needs
to be locked).
This does not need to be "enabled" in your environment, at least in MS
Sql Server. The server _always_ supports starting a transaction, executing
queries, and committing the transaction. Concurrent writings are
automatically blocked while the transaction is being done.