Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2007

    Unanswered: decreasing the size of database

    Can any one tell me about how do i decrease database size ?
    i have requirement like this
    I have to refresh the database but my target database is less in size.
    Can any body tell me the steps have to follow?

    Thanks in adv.,

  2. #2
    Join Date
    May 2005
    South Africa
    Provided Answers: 1
    create a view to select the data (including only e.g. current month)
    bcp out the view to refresh the selected data.

  3. #3
    Join Date
    Jun 2007
    Isn't it just an issue with the database size definition (I'm not good at DBA stuff ) so couldn't you just BCP in each table individually? you'd need to create the tables etc first.


  4. #4
    Join Date
    Aug 2007
    Calculate the estimated size of db.
    create new db
    bcp all tables to new db but it will not create constrants, triggers, procedures. U have to run the script for it if u have.
    or you can use data pipeline in PB but you have to scripts for triggers and procedures
    or u can use 'select * into' .


  5. #5
    Join Date
    Mar 2007
    It is possible to shrink a database by dropping the last allocated UNPOPULATED disk fragment from sysusages .. that is ONLY if it isn't populated with any data ..

    If it is populated with data, it's possible you can free it with defragging the tables residing on it .. after you can drop the fragment ..

    I've done this a few times. I wouldn't suggest doing it on a prod server unless you are adept at this kind of "brain surgery", and be sure to have a master backup and a good knowledge on how to recover master if you muck it up.

    or as a prior poster sida .. use "fast" BCP to offload-load .. and hope your target db houses the size of the resulting data, indexes etc.

    -- you can bcp from view .. this is usefull for subsets of data ..

    good luck.

  6. #6
    Join Date
    Aug 2002
    Madrid, Spain
    From v12.5 on, sybmigrate is a nice utility to copy
    a database to a smaller target. Depending on the
    version, sybmigrate might have some senseless
    limitations, and you'll have to find a way to work around

    Mariano Corral

  7. #7
    Join Date
    Sep 2006
    Czech Republic
    But it seems that sybmigrate cannot migrate databases on same server (Error the source and target ASE servers cannot be the same...)

    What about a backup database from Sybase Central? Dump to file. Than drop database delete devices, create new one and new database and from Sybase Central Restore?


    I have 1500 Mbyte devices... Dumped database to file (size of file 50 Mbyte)... Created data devices 500 Mbyte....

    But during restoreing .. I ve got message: "Backup Server session id is: 11. Use this value when executing the 'sp_volchanged' system stored procedure after fulfilling any volume change request from the Backup Server.
    Backup Server: Dumpfile name 'my_db072820796C ' section number 1 mounted on disk file 'c:\database_dump'
    Data on dump will not fit into current database. Need 1500 Mbyte database."

    Data cannot fit? Why? Data are 50 Mb and device is 500 Mb... Why I need 1500 Mb????

    Any thoughts? Did someone tried it?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts