INF: Change in Behavior of ALTER DATABASE in SQL Server 4.2Last reviewed: April 3, 1997Article ID: Q83265 |
The information in this article applies to:
- Microsoft SQL Server version 4.2 for OS/2
SUMMARYALTER DATABASE works differently in SQL Server versions 1.1 and 1.11 than it does in version 4.2 when it is used to allocate space on the same device that the database currently resides on.
MORE INFORMATIONConsider a 2 megabyte (MB) database test on device testdev.
SQL Server 1.1xThe following code marks the new fragment as data only:
alter database test on testdev = 1The output from sp_helpdb is as follows:
Device Size Usage ------ ---- ----- testdev 1 MB data only testdev 2 MB data and logNOTE: As a consequence of the second fragment being marked "data only," if the user is running out of log space, new space allocations will be marked "data only," and thus cannot contain transaction log pages until sp_logdevice() is subsequently used to mark the new fragment "log only." Also note that on the target device, sp_logdevice marks all fragments except the fragment containing the first logical page of the database "log only."
SQL Server 4.2The new fragment is marked "data and log," as revealed by the output from sp_helpdb:
Device Size Usage ------ ---- ----- testdev 1 MB data and log testdev 2 MB data and logIn SQL Server 4.2, sp_MSlogdevice can be used to mark only the most recently allocated fragment "log only," as opposed to the situation described above.
|
Additional query words: 1.10 4.20 Transact-SQL
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |