Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2003
    Posts
    35

    Unhappy Unanswered: Question on device management

    Dear All Expert,

    We're using old sybase 11.5 in NT Environment. We would like to move a dump file from old machine to new machine(similar os).

    The sp_help db of our old db is

    device_fragments size usage free kbytes
    ------------------------------ ------------- -------------------- -----------
    old 100.0 MB data only 0
    old 100.0 MB data only 48
    old 200.0 MB data only 3696
    old 400.0 MB data only 238176
    oldlog 100.0 MB log only 51888
    oldlog2 50.0 MB log only 14992
    oldlog3 50.0 MB log only 51200
    oldlog4 50.0 MB log only 51200
    oldlog5 50.0 MB log only 51200
    oldlog6 100.0 MB log only 102400

    The data total is 800 M and log is 400 M


    We created new db with two device (new_data01 for data only and new_log01 for log only).The configuration is data 1464 M and log is 488 M.
    When i reload the dump file, the new_data01 consists of logsegment (400M) , so what i did was dump transaction db with no_log and drop that segment using sp_dropsegment "logsegment",.... from my new_data01 to separate the log from data segment.

    The output for the our new db is:

    device_fragments size usage free kbytes
    ------------------------------ ------------- -------------------- -----------
    new_data01 50.0 MB data only 51200
    new_data01 100.0 MB data only 0
    new_data01 100.0 MB data only 102400
    new_data01 100.0 MB data only 48
    new_data01 100.0 MB data only 102384
    new_data01 150.0 MB data only 153600
    new_data01 200.0 MB data only 3696
    new_data01 264.0 MB data only 270336
    new_data01 400.0 MB data only 240992
    new_log01 488.0 MB log only 499712


    Why sybase can not join them into one segment after i reload?
    What i expected is like as follows?

    new_data01 1464 Mb data only
    new_log01 488Mb log only

    As i use windows version, when i use sybase central,and go to properties->Usage i still see the log allocation on my data device:
    new_data01 1464MB data only
    new_data01 400Mb data only
    log_data01 488 log only.


    Is this normal? Did i do the correct way when i drop the logsement?

    Any feedback is really appreciated.

    Thank You very much.

    Mike.

  2. #2
    Join Date
    Nov 2002
    Posts
    833
    sybase dump utility is taking the devices in order its physical creation and then puts it into the dumpfile ... therefore, it is relatively fast
    therefor it is essential to create a database for load with the same layout as the source db

    if you want to redesign your devices layout and put devices together you have to use bcp out and in

  3. #3
    Join Date
    Jun 2003
    Posts
    35
    Originally posted by osy45
    sybase dump utility is taking the devices in order its physical creation and then puts it into the dumpfile ... therefore, it is relatively fast
    therefor it is essential to create a database for load with the same layout as the source db

    if you want to redesign your devices layout and put devices together you have to use bcp out and in

    If i use bcp, it means i have to move table by table, it means i have to recreate the table,stored procedure etc manually first and then bcp in table by table. Which is prone to error because the object might be missed out,

    Do you know how to do this in an easy way? Is it all right if i am deleting the logsegment manually from my new_data01 ?

    Thanks.

  4. #4
    Join Date
    Nov 2002
    Posts
    833
    Originally posted by msetjadi
    If i use bcp, it means i have to move table by table, it means i have to recreate the table,stored procedure etc manually first and then bcp in table by table. Which is prone to error because the object might be missed out,

    Do you know how to do this in an easy way? Is it all right if i am deleting the logsegment manually from my new_data01 ?

    Thanks.
    Ed Barlow provides some rev engineering scripts of his website which you might find helpful

    http://www.edbarlow.com/document/bin/index.htm

Posting Permissions

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