dbTalk Databases Forums  

How to move tempdb

comp.databases.sybase comp.databases.sybase


Discuss How to move tempdb in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jo
 
Posts: n/a

Default How to move tempdb - 01-23-2004 , 04:37 AM






Hi

I have 2 servers A and B.
I need to move tempdb from Server A to server B.

This both servers are indentical. They are also same network.

What will be the best solution to do?

Kindly suggest any query or scripting.

Regards



Reply With Quote
  #2  
Old   
Tom McCready
 
Posts: n/a

Default Re: How to move tempdb - 01-23-2004 , 09:14 AM








jo wrote:

Quote:
Hi

I have 2 servers A and B.
I need to move tempdb from Server A to server B.

This both servers are indentical. They are also same network.

What will be the best solution to do?

Jo,

Maybe I am missing something, but this doesn't make much sense to me
because tempdb usually doesn't hold data (except temporarily). Here is
a script to rollback tempdb to the original 2MB size:

sp_configure allow, 1
go
begin tran
delete master .. sysusages
where dbid = 2 and lstart != 0
go
update master .. sysusages set segmap = 7 where dbid = 2
go
select * from master .. sysusages where dbid = 2
you should see the following output, if not rollback the transaction:
dbid segmap lstart size vstart
2 7 0 1024 2564

commit tran
go
sp_configure allow, 0
shutdown
go

disk init new devices
alter tempdb onto the new devices


Tom

Quote:




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.