Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9069

Re: Moving tempdb database fragments off the master device

$
0
0

Hi Jean-Pierre,

 

The steps you took removed the first fragment of sysusages from

the master device but didn't replace it with anything.

 

 

The approach I would use doesn't try to preserve any non-master

allocations (it is easier to restore them by just altering the new tempdb

back onto the desired devices).  What I would do is:

 

sp_configure "allow updates", 1

go

-- create a database where you want tempdb to be in the future:

create database newtempdb on <devname>

go

-- find the dbid of this new database

select dbid from sysdatabases where name = "newtempdb"

go

-- Hook up the origina sysdatabases tempdb entry to the newtempdb

-- entries in sysuseages and clean up

 

begin tran

delete sysusages where dbid = 2

delete sysdatabases where name = "newtempdb"

update sysusages set dbid = 2 where dbid = <newtempdb dbid>

go

-- sanity check the number of rows returned before issuing commit tran

commit tran

go

shutdown

go

 

-- reboot ASE and tempdb should now be in its new location.

 

----------------------

Now, to deal with your current problem:

 

Shutdown ASE

 

Modify the configuration file ($SYBASE/ASE-*/<servername>.cfg )  so that updates to system tables are allowed as sp_configure likely wont  be working

 

Boot ASE with traceflag 3608 to cause it to only recover master and not recover any other databases (tempdb being our particular concern.)

 

Follow the same general steps above (create new db point tempdb entry at it)

 

Remove the traceflag after shutting down, then reboot.normally. 

 

-bret


Viewing all articles
Browse latest Browse all 9069

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>