Displays information about all the devices on Adaptive Server:
> sp_helpdevice
> go
> sp_helpdevice [device name]
> go
New Data file addition command :-
> use master
> go
> disk init name='SID_data_XX', phyname="Location\file name', szie = "Size in mb', directio='true'
> go
after added the datafile, allocating the space for the device using below commands
> ALTER database SID on SID_data_002 = 'Size in mb'
> go
example :-
> use master
> go
> disk init name='ER2_data_002', phyname="E:\sybase\ER2\sapdata_2\ER2_data_002.data', size = "130740M', directio='true'
> go
> ALTER database ER2 on ER2_data_002 = '80720M'
> go
We can use the same commands for adding log devices also
Increasing the size of datafile (any device)
> use master
> go
> disk resize name='SID_data_XX', phyname="Location\file name', size = "Size in mb', directio='true'
> go
example :-
> use master
> go
> disk init name='ER2_data_002', phyname="E:\sybase\ER2\sapdata_2\ER2_data_002.data', size = "10240M', directio='true'
> go
We can use the same commands for resizing any devices
> use master
> go
> disk resize name='Device Name', phyname="Location\file name', size = "Size in mb', directio='true'
> go
Thanks for reading, Please share your valuable feedback.
small correction in the command for phyname
ReplyDeletephysname