Close

Sybase ASE: Extending an Existing Database Device

When the free space in the device where the DB is hosted is exhausted Sybase ASE gives following errors:

Msg 1105, Level 17, State 2<br> Server '', Procedure '', Line 15<br> Can't allocate space for object '' in database '' because 'default' segment is full/has no free extents. If you ran out of space in syslogs, dump the transaction log. Otherwise, use ALTER DATABASE to increase the size of the segment.<br> (return status = -7) 
Could not execute statement.<br> Can't allocate space for object 'xxxxxx' in database 'xxx' because 'default' segment is full/has no free extents. If you ran out of space in syslogs, dump the transaction log. Otherwise, use ALTER DATABASE to increase the size of the segment.<br> Sybase error code=1105<br> Severity Level=17, State=16, Transaction State=0<br> Line 2

In such cases sometimes we need to extend the Database device, for which first we’ll identify the devices mapped to the database by executing following command:

1> sp_helpdb <DB Name>
2> go

Once the device is identified we would use following command to identify the free space in the device and the physical path of the device:

1> sp_helpdevice <Device Name>
2> go

If the mount point has sufficient space, use following command to extend the device:

1> disk resize name='<Device Name>', size='Amount of space you want to add'
2> go

Once space is added to the device we need to allocate that added space to the database by using following command:

1> alter database <DB Name>
2> on  <Data Device> = 'Amount of space you want to add' 
3> log on  <Log Device> = 'Amount of space you want to add'
4> go





scroll to top