Returns a true/false indication of whether dump transaction is allowed.
tran_dumpable_status("database_name")
is the name of the target database.
Checks to see if the pubs2 database can be dumped:
1> select tran_dumpable_status("pubs2") 2> go
----------- 106 (1 row affected)
In this example, you cannot dump pubs2. The return code of 106 is a sum of all the conditions met (2, 8, 32, 64). See the Usage section for a description of the return codes.
tran_dumpable_status allows you to determine if dump transaction is allowed on a database without having to run the command. tran_dumpable_status performs all of the checks that Adaptive Server performs when dump transaction is issued.
If tran_dumpable_status returns 0, you can perform the dump transaction command on the database. If it returns any other value, it cannot. The non-0 values are:
1 – A database with the name you specified does not exist.
2 – A log does not exist on a separate device.
4 – The log first page is in the bounds of a data-only disk fragment.
8 – the trunc log on chkpt option is set for the database.
16 – Non-logged writes have occurred on the database.
32 – Truncate-only dump tran has interrupted any coherent sequence of dumps to dump devices.
64 – Database is newly created or upgraded. Transaction log may not be dumped until a dump database has been performed.
128 – Database durability does not allow transaction dumps.
256 – Database is read-only. dump transaction started a transaction, which is not allowed on read-only databases.
512 – Database is online for standby access. dump transaction started a transaction, which is not allowed on databases in standby access because the transactoin would disturb the load sequence.
1024 – Database is an archive database, which do not support dump transaction.
ANSI SQL – Compliance level: Transact-SQL extension.
Any user can execute this function.
Command dump transaction