Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2009
    Posts
    5

    Talking Unanswered: problems with log files when i load a dump

    I have problems with the log when i dump a database to another server.

    Now i have 5 data devices and 2 log devices on a old server.
    What i did was to make from the 5 data devices 1 device and from the 2 log devices also on a new server.

    Now i load a dump from the old server to the new server and of course the log and the data in 1 device.

    I have have tried to seperate the log to de orginal log devices with sp_logdevice without success.

    What did i do:

    1 load database

    2 sp_helplog (log starts on data device)

    2 dump tran with truncate only

    3 sp_logdevice <dbname>,<log device>

    4 dump tran with truncate only

    5 sp_dropsegment logsegment, <dbname>, <data device>

    6 inserts......

    7 sp_helplog (log starts on log device (correct).

    8 insert until the orginele data the log overwrite.

    Now still i have log on the data device???
    Help!. How i remove that log on the data device.

  2. #2
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    What you did appears OK
    I don't understand your point 8

    What is the output from the below

    select * from sysdatabases where dbid=db_id('yourdb')
    looking here at logptr
    and
    select * from sysusages where dbid=db_id('yourdb')
    and maybe also
    select * from sysdevices

  3. #3
    Join Date
    Jul 2009
    Posts
    5
    select * from sysdatabases where dbid=db_id('dba')

    name,dbid,suid,status,version,logptr,crdate,dumptr date,status2,audflags,deftabaud,defvwaud,defpraud, def_remote_type,def_remote_loc,status3,status4
    'dba',4,1,12,1,2095,2009-07-13 13:22:03.586,2009-07-14 12:59:14.11,-32768,0,0,0,0,,,0,0
    =======================

    select * from sysusages where dbid=db_id('dba'

    dbid,segmap,lstart,size,vstart,pad,unreservedpgs,c rdate
    4,3,0,1536,536870912,,924,2009-07-13 13:22:03.586
    4,0,1536,512,536872448,,502,2009-07-13 13:22:03.586
    4,4,2048,1024,553648128,,1020,2009-07-13 13:32:01.63
    4,3,3072,1024,570425344,,1020,2009-07-13 13:52:51.636
    4,3,4096,5120,587202560,,5100,2009-07-13 14:17:10.626

    ============================
    select * from sysdevices where name like "HP2%"

    low,high,status,cntrltype,name,phyname,mirrorname
    536870912,536872959,16386,0,'HP2_data_1','HP2_data _1',
    570425344,570426367,16386,0,'HP2_data_2','e:\\data \\sybdata\\HP2_data_2',
    587202560,587207679,16386,0,'HP2_data_3','e:\\data \\sybdata\\HP2_data_3.dat',
    553648128,553649151,16386,0,'HP2_log_1','F:\\LOG\\ Syblog\\HP2_log_1.dat',

    ===============================

    Here are the results of the queries.

    My point is that Sybase Central on devices HP2_data_1 data and log shows.
    Also our monitoring tool gives a warning.

  4. #4
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    Did you refresh your view?

    Your log segment seems OK from the posted info however there is an unused fragment on HP2_data_1 where the original log was (seen from sysusages where segmap=0). To fix this:
    Code:
    exec sp_extendsegment 'default', 'dba', 'HP2_data_1'
    exec sp_extendsegment 'system', 'dba', 'HP2_data_1'
    You can avoid problems during database load with log landing on data or vice versa by ensuring that the data and log segments of the target database are created in the same sequence as the original. (select * from sysusages order by dbid, lstart)

  5. #5
    Join Date
    Jul 2009
    Posts
    5

    Thumbs up

    Thanks!!!!!!!

    The problem is solved!!!!..



Posting Permissions

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