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.
I do not know from where your extra 5GB are coming.
What I’m 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:
For more log information:
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.
I’ve 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 I’ve just explain does not wok all the time. When it doesn’t work I use to drop and recreate the database with the good device declaration.
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....