Cross-database transactions

A single transaction can affect tables from different databases. Modifications to tables located in a different database are logged in the databases that hold the tables. The Sybase Mirror Replication Agent configured for the database sends the Replication Server information stored in its transaction log.

In this example, db1 and db2 are replicated databases with configured Sybase Mirror Replication Agents. Database db1 is configured to use SQL statement replication:

use db2
go
begin tran
go
delete t1 where c between 1 and 10000000
delete db1..t1 where c between 1 and 1000000
commit tran
go

The second delete (on database db1) uses SQL statement replication, whereas the first delete (on database db2) uses traditional replication. The Sybase Mirror Replication Agent running on db1 replicates the statement.