Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2003
    Posts
    54

    Unhappy Unanswered: Moving devices across drives

    Hi,
    I have an issue with my ASE 11.9.2 installation and I want some advice.
    My database is spread across four drives with one drive having tempdb devices. Now, I had created the db with 18 data dev. and 5 log dev's. But after loading it I found that one of the log device i.e sub_log05 has been added as a data dev and one of the data device sub_dat18 has been added as a log device. Now, the first problem is as I have said earlier that I have divided the data devices across two drives to get better I/O and have placed all the log dev on one drive. The layout is as follows --
    /sda -- sub_dat01 to sub_dat08-- All these devices are in default segment
    /sdb -- sub_dat09 to sub_dat18 -- All these devices are placed in xref_seg segment
    /sdg -- tempdb devices
    /sdf -- log devices

    Now, sub_log05 being a data device has been placed in a wrong drive and the log device sub_dat18 being a log device has been placed on a drive exclusively meant for data devices. I don't think it will cause any problems as long as the drives donot get corrupted. How do I change the device names and move them to the proper drive. I was thinking of mirroring for eg. mirror sub_dat18 which is now located in /sdb to /sdf and then unmirror the primary side so that the permanent location after unmirroring it remains as /sdf. and doing the same thing with sub_log05. Will this help??? Am I going to lose any data because of this??? Also, how do I rename these devices????

    Please help.

    Thanks

    Subhas

  2. #2
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443

    Re: Moving devices across drives

    Can you afford to do a dump and load (into a new database)?

  3. #3
    Join Date
    Apr 2003
    Posts
    54
    Thanks for responding.....
    No this is my production system and cannot bring it down. Can you please explain how would it help by dumpng and loading???

    Regards

    Subhas

  4. #4
    Join Date
    Apr 2003
    Posts
    54

    Re: Moving devices across drives

    Originally posted by trvishi
    Can you afford to do a dump and load (into a new database)?
    Trvishi,
    I am posting my sp_helpdb output:

    1>sp_helpdb obs_prod
    2> go
    name db_size owner dbid
    created
    status
    ------------------------ ------------- ------------------------ ------
    --------------

    ------------------------------------------------------------------------------------------------------
    sub_prod 41000.0 MB sa 6
    Jan 02, 2004
    no options set

    (1 row affected)
    device_fragments size usage free
    kbytes
    ------------------------------ ------------- --------------------
    -----------
    sub_dat01 1000.0 MB data only
    480
    sub_dat02 1000.0 MB data only
    0
    sub_dat03 1000.0 MB data only
    0
    sub_dat04 1000.0 MB data only
    315680
    sub_dat05 2000.0 MB data only
    494768
    sub_dat06 2000.0 MB data only
    599296
    sub_dat07 2000.0 MB data only
    54064
    sub_dat08 2000.0 MB data only
    36656
    sub_dat09 2000.0 MB data only
    34672
    sub_dat10 2000.0 MB data only
    63120
    sub_dat11 2000.0 MB data only
    62736
    sub_dat12 2000.0 MB data only
    62608
    sub_dat13 2000.0 MB data only
    1816032
    sub_dat14 2000.0 MB data only
    2048000
    sub_dat15 2000.0 MB data only
    2005376
    sub_dat16 2000.0 MB data only
    2048000
    sub_dat17 2000.0 MB data only
    2048000
    sub_dat18 2000.0 MB log only
    2048000
    sub_log01 1000.0 MB log only
    1024000
    sub_log02 2000.0 MB log only
    2048000
    sub_log03 2000.0 MB log only
    2047952
    sub_log04 2000.0 MB log only
    2048000
    sub_log05 2000.0 MB data only
    7536
    device
    segment
    ------------------------------

    ------------------------------------------------------------------------------------------
    sub_dat01
    default
    sub_dat01
    system
    sub_dat02
    default
    sub_dat02
    system
    sub_dat03
    default
    sub_dat03
    system
    sub_dat04
    default
    sub_dat04
    system
    sub_dat05
    default
    sub_dat05
    system
    sub_dat06
    default
    sub_dat06
    system
    sub_dat07
    seq_xref_seg
    sub_dat08
    seq_xref_seg
    sub_dat09
    seq_xref_seg
    sub_dat10
    seq_xref_seg
    sub_dat11
    seq_xref_seg
    sub_dat12
    seq_xref_seg
    sub_dat13
    seq_xref_seg
    sub_dat14
    seq_xref_seg
    sub_dat15
    seq_xref_seg
    sub_dat16
    seq_xref_seg
    sub_dat17
    seq_xref_seg
    sub_dat18
    logsegment
    sub_log01
    logsegment
    sub_log02
    logsegment
    sub_log03
    logsegment
    sub_log04
    logsegment
    sub_log05
    default
    sub_log05
    system
    (return status = 0)

    Regards

    subhas

  5. #5
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443
    Hi,

    Dump load is a pretty easy way out.

    Lets say your current environment is Box1

    a) You can dump and load the database in Box1 to Box2 (a different environment).
    b) Make sure the load is successful in Box2
    c) Re-create the database in Box1 with the right device names
    d) Load the database in Box1 from a backup copy or from Box2

    BUT In your case this option looks like its NOT feasible.

    The other way around is Sybase mirroring.

    But the trick is you have to mirror / unmirror twice if you want to use the same device name or the same physical name.

  6. #6
    Join Date
    Apr 2003
    Posts
    54
    Hi Trvishi,
    The dump and load should have worked the first time when I loaded the warmstandby on production because it just looks for the correct allocations in sysusages for that database before loading the backup files. I had created the correct devices in correct drives and also had the log 05 dev for log and dat018 dev for data. But after loading , sp_helpdb produces the same output as before. I wanted to confirm before I did anything. I really donot know the reason why this happened.

    Thanks

    Jaideep

  7. #7
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443
    Looks like your create database statement might have the wrong order. Unfortunately ASE doesnt report any errors if the order is wrong.

    Do this in the original db.

    select * from sysusages where dbid=db_id("mydb")

    You will see entries like this "3" for data and "4" for logsegment
    3
    3
    3
    4
    3
    4
    Your create database statement should be in the exact same order. You could club "3"s together and "4"s together but never change the order.

    Can you send me the sysusages output and also the create database statement.

Posting Permissions

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