motioneye
asked on
sybase, How to shrink database files
Hi,
In sybase, does anyone know how to shrink database files? will that be as easy as sql server ?
In sybase, does anyone know how to shrink database files? will that be as easy as sql server ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi IncisiveOne,
Yes thanks for your explanation, yes a storage device in sybase can be share between database unlike Mcsft sql where one file per database.
Yes thanks for your explanation, yes a storage device in sybase can be share between database unlike Mcsft sql where one file per database.
ASKER
Hi,
How about if I want to shrink storage device, will that be possible? Here you see that I'm having plenty of free spae
device_name physical_name
description
status cntrltype vdevno vpn_low vpn_high
----------- ----------------------
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ----
------ --------- ------ ------- --------
TestLog G:\sybase\data\TestLog
file system device, special, dsync on, directio off, physical disk, 12000
.00 MB, Free: 11500.00 MB
(1 row affected)
dbname size allocated vstart lstart
------ ------------- ------------------- ------ ------
Test 7.00 MB Apr 18 2009 6:19PM 0 4096
XFDS 3.00 MB May 12 2009 11:47PM 3584 1024
(1 row affected)
(return status = 0)
How about if I want to shrink storage device, will that be possible? Here you see that I'm having plenty of free spae
device_name physical_name
description
status cntrltype vdevno vpn_low vpn_high
----------- ----------------------
--------------------------
------ --------- ------ ------- --------
TestLog G:\sybase\data\TestLog
file system device, special, dsync on, directio off, physical disk, 12000
.00 MB, Free: 11500.00 MB
(1 row affected)
dbname size allocated vstart lstart
------ ------------- ------------------- ------ ------
Test 7.00 MB Apr 18 2009 6:19PM 0 4096
XFDS 3.00 MB May 12 2009 11:47PM 3584 1024
(1 row affected)
(return status = 0)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
Not so practical when huge db, but will work on such small db, btw good to know how to manage space with sybase.
Not so practical when huge db, but will work on such small db, btw good to know how to manage space with sybase.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
dbcc shrinkfile('databasefilena
so,
dbcc shrinkfile('mydbname_data'
or
dbcc shrinkfile('mydb_log', 0) --//would need to be done after the log was truncated (backed up)
you can also do it in ssms, right click the db, go to tasks, then shrink files
HTH,
Tim