John Flynn
2009-12-21 20:32:30 UTC
For many years (decades?) I have always extended tempdb after initial
installation, in the same way:
alter database tempdb on <device>=100
This has always assigned the extension fragment as "data and log", which is
what I want. I don't remember this ever not working, in ASE versions from
4.2 up through 15.0.2. Until last week.
Last week I installed a new ASE instance, version 15.0.2 ESD#6. I gave the
usual alter database command, and it worked, but it assigned the extension
fragment to "data only". (This isn't the first build I've done in that ASE
version, and I'm almost positive this didn't happen the last time.) To fix
it, I used a technique that I've used many times in ASE 11.9.2 to fix a
similar problem in a user database (though never tempdb):
exec sp_configure "allow updates", 1
update master..sysusages set segmap=7 where dbid=db_id("tempdb") and
segmap in (3,4)
exec sp_configure "allow updates", 0
dbcc dbrepair( "tempdb", remap )
I have two questions:
1. Why did this happen? To my knowledge ASE has always extended tempdb as
"data+log", and I assume that is intentional and desirable. Why not this
time?
2. My old technique for repairing the database fragments, is it a good
technique? It seemed to work. Is there a better way? It didn't seem to me
that either sp_extendsegment or sp_logdevice were appropriate for this
situation.
Thanks.
- John.
installation, in the same way:
alter database tempdb on <device>=100
This has always assigned the extension fragment as "data and log", which is
what I want. I don't remember this ever not working, in ASE versions from
4.2 up through 15.0.2. Until last week.
Last week I installed a new ASE instance, version 15.0.2 ESD#6. I gave the
usual alter database command, and it worked, but it assigned the extension
fragment to "data only". (This isn't the first build I've done in that ASE
version, and I'm almost positive this didn't happen the last time.) To fix
it, I used a technique that I've used many times in ASE 11.9.2 to fix a
similar problem in a user database (though never tempdb):
exec sp_configure "allow updates", 1
update master..sysusages set segmap=7 where dbid=db_id("tempdb") and
segmap in (3,4)
exec sp_configure "allow updates", 0
dbcc dbrepair( "tempdb", remap )
I have two questions:
1. Why did this happen? To my knowledge ASE has always extended tempdb as
"data+log", and I assume that is intentional and desirable. Why not this
time?
2. My old technique for repairing the database fragments, is it a good
technique? It seemed to work. Is there a better way? It didn't seem to me
that either sp_extendsegment or sp_logdevice were appropriate for this
situation.
Thanks.
- John.