How to alter database size in Sybase

If you want to increase the database size, we can do that using the alter database command. With alter database command, we can increase either the data segment size or log segment size by adding data devices to the existing data devices or log devices’. In this article, we are going to


alter database database_name
on database_device=”size in M or G”
log on log_device=”size in M or G”

Full Syntax:

alter database database_name
[on {default | database_device} [= size]
[, database_device [= size]]…]
[log on {default | database_device} [= size]
[, database_device [= size]]…]
set { [durability = { no_recovery | at_shutdown | full}]
[[,] dml_logging = {full | minimal} ]
[[,] template = { database_name | NULL}]
[, compression = {none | row | page}]
[, lob_compression = {compression_level | off}]
[,] inrow_lob_length = value [log off database_device
[= size | [from logical_page_number] [to logical_page_number]]
[, database_device
[= size | [from logical_page_number] [to logical_page_number]]
[with override]
[for load]
[for proxy_update]


1) Add space to 200MB space to the database pubs2 on the data_device1 device.

alter database pubs on data_device1=”200M”

2) Add 100MB space to data segment on datadevice2 and 50MB space to log segment on logdevice2 to the database pubs

alter database pubs
on data_device1=”100M”
log on logdevice2=”50M”

1) Add space to 2000GB space to the database pubs2 on the data_device2 device.

alter database pubs on data_device2=”2000G”

Related Posts

You can leave a response, or trackback from your own site.

Leave a Reply

Powered by k2schools
%d bloggers like this: