Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2008
    Posts
    14

    Unanswered: resize/compress segments

    Hi,

    I need help on how to resolve my problem with Sybase version 12.
    I have segments on the database that needs to be compressed or resized. Can anyone please send me the procedure on how to deal with this concern.

    device_fragments size usage created free kbytes
    ------------------------------ ------------- -------------------- ------------------------- ----------------
    kplustp_data 3000.0 MB data only Nov 2 2006 8:40PM 4298
    kplustp_log 1000.0 MB log only Nov 2 2006 8:40PM not applicable
    kplustp_data2 2.0 MB data only Jun 15 2008 1:14PM 0
    kplustp_data2 8.0 MB data only Jun 15 2008 1:16PM 0
    kplustp_data2 10.0 MB data only Jun 15 2008 1:17PM 0
    kplustp_data2 20.0 MB data only Jun 15 2008 1:17PM 0
    kplustp_data2 20.0 MB data only Jun 15 2008 1:18PM 0
    kplustp_data2 40.0 MB data only Jun 15 2008 1:18PM 0
    kplustp_data2 100.0 MB data only Jun 15 2008 1:20PM 0
    kplustp_data2 100.0 MB data only Jun 15 2008 1:22PM 0
    kplustp_data2 100.0 MB data only Jun 15 2008 1:23PM 0
    kplustp_data2 100.0 MB data only Jun 15 2008 1:25PM 0
    kplustp_data2 100.0 MB data only Jun 15 2008 1:27PM 0
    kplustp_data2 100.0 MB data only Jun 16 2008 9:38AM 0
    kplustp_data2 300.0 MB data only Jun 20 2008 9:42AM 0
    kplustp_data2 1000.0 MB data only Jul 10 2008 11:30AM 0
    kplustp_data2 1000.0 MB data only Aug 8 2008 4:36PM 0
    kplustp_data3 1000.0 MB data only Sep 14 2008 1:08AM 967486

    I need all the "kplustp_data2" to be compressed into a single segment with a size of 3GB.

    Thanks and regards,
    mHike

  2. #2
    Join Date
    Jan 2004
    Posts
    545
    Provided Answers: 4
    * Create an empty database on 2x 3Gb data and 1 Gb log (or 1 6Gb-data and 1Gb log)
    * use select * from <table> into <copydb>..<table> to copy all data to the new database
    * check and if neccesary (re)create) indexes, triggers, etc on tables in the copydb
    * dump the copydb to a file
    * drop the original db
    * create the original db with the same structure of the copydb
    * load the dump of the copydb in the newly created copydb
    This is how I did it some time ago, and it worked.
    I'm not crazy, I'm an aeroplane!

  3. #3
    Join Date
    Sep 2008
    Posts
    40

    resize

    hi,

    Just dump the existing database to a file.
    create a new db with segment of size 3 gb and log of size what you required,
    load the dump file to the new database.
    it will work
    make sure that the segments size is geater than or equal to the total size of the old database segments

Posting Permissions

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