![]() | ![]() |
Home |
|
|
Troubleshooting and Error Messages Guide |
|
| Chapter 3 Error Message Writeups |
|
| alter database Errors |
|
| Error 5034 |
16
ALTER DATABASE was successful. Cannot modify the last-chance threshold because the database '%.*s' is in read-only mode.
Each database that stores its transaction log on a separate segment has a last-chance threshold (LCT). This is an estimate of the number of free log pages that would be required to back up the transaction log.
Error 5034 is raised when you use alter database to extend log space on a read-only database. The database is altered and log space added, but the LCT cannot be modified because this requires an update to systhresholds, which is not possible in a read-only database.
Error 5034 is followed immediately by Error 5035 ("Remember to execute SELECT LCT_ADMIN('LASTCHANCE', %d), when the database is made writable.").
Version 11.0.3.2 and earlier raise Error 3906 ("Attempt to BEGIN TRANsaction in database '%.*s' failed because database is READ ONLY.") when alter database is used to extend log space. The database is altered and log space added, but the LCT cannot be modified. See the writeup of Error 3906 for details.
Re-establish the LCT after the database is available for updates using the following steps:
Use the following command to determine the new last-chance threshold:
1> use <database name>
2> go
1> select lct_admin("reserve", <log size in pages>)
2> goFor example, on a 20MB transaction log (containing 10240 2KB pages):
1> select lct_admin("reserve", 10240)
2> go----------- 616
The resulting value is the amount of space required to dump the transaction log.
Modify the LCT using
1> select lct_admin('lastchance', <new threshold>)
2> goRefer to Creating a Free-Space Threshold for the Log Segment in the System Administration Guide for additional information on setting thresholds.
For databases normally operated in read-only mode, no updates occur on the database and so there is no need to update the LCT.
All versions
|
|