The only real way to solve this is, as I think you discovered, is to create a new database (or drop and re-create the existing database). You don't need to do anything with DDL or
When you run
DUMP DATABASE the output is exactly as it would be inside the database. Looking at the output of
sp_helpdevice should give you a rough idea of how the database is structured. The
sysusages table in the
master database is the best place to look at the database structure:
select * from master..sysusages where dbid=db_id(mydb) order by lstart
segmap column specifies whether the segment is data, log or data+log.
Once you've examined the output of all of these, you can re-create the database with the correct segmaps:
CREATE DATABASE mydb ON
If your database had been structured as a mix of something like data, log, log, data, log (i.e. it had been expanded several times with
ALTER DATABASE) then you could use
bcp to copy out all tables and re-create the database in a contigous order.