Results 1 to 3 of 3

Thread: Log size wrong?

  1. #1
    Join Date
    Feb 2003
    Location
    Netherlands
    Posts
    63

    Unanswered: Log size wrong?

    hey Guys,

    Hope someone can help me out. I have a database that I've restored from a backup but my segments got a bit mixed up so I had to correct this by setting the segments correctly.

    The weird thing now is that I have 10Gb of log space allocated to a single devices right now while my other devices are all data. But my free log space (that is returned when you do sp_helpdb) shows that I have 15Gb of log space left over.

    Its like Sybase has still allocated log space within my data devices eventhough its no longer using it.

    Any ideas how to cure this? It doesn't seem to do any harm other then after using the full 10Gb, it sais it still has 5Gb free but it gets into a log suspend.
    Greetz,

    Bastiaan Olij

  2. #2
    Join Date
    Nov 2005
    Location
    Gex - France
    Posts
    15
    I do not know from where your extra 5GB are coming.

    What Im suspecting is that you have created your new database with a device structure not strictly equal to the one from the dumped database. Strictly means the same number of devices with the same size. From my own experience, using different device structure results in strange data and log mixes.

    To solve your issue, according to the Sybase documentation, you must move the log segment to its own device.

    alter database log on log-device-name

    sp_logdevice db-name, log-device-name



    To check that their are no more devices with "data and log" status run:



    sp_helpdb db_name



    For more log information:

    use db_name

    sp_helplog



    If it is stated that the log is still in the older device, you must create some transaction in order to fulfill the current log page (in the older device). Sybase will open the next log page on the new log device.



    After that, dump the master and your database.



    Note:

    Ive done that a couple of time before I understand that device structure must be strictly equal.

    The good news is, that now, I know why I got some data and log mixes.

    The bad news is that the process Ive just explain does not wok all the time. When it doesnt work I use to drop and recreate the database with the good device declaration.


  3. #3
    Join Date
    Feb 2003
    Location
    Netherlands
    Posts
    63
    I think I forgot the sp_logdevice, maybe that will work, but my damn test servers been rollbacking a process that failed due to the log issues all day now. It does seem to be doing something though....
    Greetz,

    Bastiaan Olij

Posting Permissions

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