var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
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>
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.
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
select * from sysusages where dbid=db_id('yourdb')
and maybe also
select * from sysdevices
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'
select * from sysdevices where name like "HP2%"
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.
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:
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)
exec sp_extendsegment 'default', 'dba', 'HP2_data_1'
exec sp_extendsegment 'system', 'dba', 'HP2_data_1'
The problem is solved!!!!..