Extending the database space on Sybase ASE

You notice in DBACOCKPIT that you are running out of space on your data/log files of Sybase ASE database.

Below procedure explains the procedure to extend the space on the data/log volume.

Login to dbsql using SA or SAPSA user:

In Sybase data and log files are organize in the form of Devices. Search for the device you should be extending first before allocating the space the data or log file using below command:

use master

sp_helpdb <DBID>

go

Ex:   sp_helpdb ERP

In the Result Set 2, you can find the related devices.

find_device

Next find the device location using the below command:

use master

sp_helpdevice <data_file_device/log_file_device>

go

device_name

Now resize the device using the below command:

use master

disk resize

name = “<device_name>”,

size = “<size>”

go 

Now assign the extended device to the database:

For data files:

user master

alter database <DBSID> on <device_name> = <Size>

go

For log file:

use master

alter database <DBSID> log on <device_name> = <Size>

go

 

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s