Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Restore 6.5 Database from Tape

Author  Topic 

ricky_newbee
Posting Yak Master

126 Posts

Posted - 2005-06-24 : 12:52:29
Hello,
I need help with Restoring Sql 6.5 database from an external backup device(TAPE). I know there are many experts in this forum, can you please help me with this situation? I know questions pop like, why 6.5? The only way i can upgrade 6.5 to 2000 is i guess to restore the database backup of 6.5 from tape and then move the 6.5 databases to SQL 2000. Correct me if i am wrong. Thanks for help.

Rick

mcrowley
Aged Yak Warrior

771 Posts

Posted - 2005-06-24 : 13:01:28
Hopefully, you have the software that wrote to the tape? Veritas, Legato, Omniback, whichever backup software it is, see if you can extract all the segment information. This was critical in the 6.5 days. Or better yet, if you can get it from the system you are trying to replicate, that would likely be easier. You have to set up a database "for load" on a set of segments that look EXACTLY like the database you are trying to restore.

After that, you are correct. You need to restore the database to a 6.5 server, before you use the upgrade wizard in SQL 2000 to get the database into SQL 2000.
Go to Top of Page

ricky_newbee
Posting Yak Master

126 Posts

Posted - 2005-06-24 : 13:34:54
Thanks. I have to figure out a way to get the backups from tape to the server where i would be restoring the database. If i under stood correctly, i have to setup a database which should be exactly same as the one on tape, correct? I mean the names and locations of MDF's and LDF's.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-06-24 : 13:58:13
Take a look at the LOAD DATABASE command in 6.5 Books Online. It's the old RESTORE DATABASE command.

Tara
Go to Top of Page

mcrowley
Aged Yak Warrior

771 Posts

Posted - 2005-06-24 : 15:43:53
The number and size of trhe files themselves is not as important as the number and size of the segments. The segments can not be too big or too small. Best place to start would be with the backup software that wrote the database out to tape in the first place.
Go to Top of Page

ricky_newbee
Posting Yak Master

126 Posts

Posted - 2005-06-24 : 16:31:53
Thank you both of you. I will give it a try monday or tuesday. Mean while i will try to find out a way to get the backup software. Thanks for your help MCROWLEY and TARA
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-06-24 : 19:27:07
As mcrowley stated, the exact size, number, and order of the database segments is critical to be able to restore a 6.5 database.

I have attached a script that gives you this information. If your server is still up and running, you should run this script now to get this information, and save it for future reference.



use master

go
print 'Display Database Segment Sizes'
print ' '
go


select
a.dbid,
DB_Name = a.name,
b.segmap,
Segment_Type =
convert(varchar(15),
case b.segmap
when 3 then 'Data'
when 4 then 'Log'
when 7 then 'Data and Log'
else 'Unknown'
end),
Segment_Size = b.size,
Seg_Megabytes = (b.size * 2) / (1024) ,
b.Lstart ,
DB_Creation_Date = a.crdate,
Current_Date_Time = getdate(),
Device_Name = c.Name,
Device_Path = c.phyname,
b.Vstart,
c.Low,
c.High
from
master.dbo.sysdatabases a,
master.dbo.sysusages b,
master.dbo.sysdevices c
where
a.dbid = b.dbid and
b.vstart >= c.low and
b.vstart <= c.High and
c.high > 19 and
c.phyname <> 'nul'
order by
a.dbid, b.lstart


go
print ' '
print 'Display Database Devices'
print ' '
go
set nocount on
go

select
DeviceNumber =
case
when name = 'master'
then 0
when convert(int,convert(binary(1), (low / 0x01000000))) = 0
then convert(smallint,null)
else convert(smallint,convert(int,convert(binary(1), (low / 0x01000000))))
end,
*
into
#t1
from
master..sysdevices

go
set nocount off
go

select
DeviceNumber ,
low ,
high ,
name ,
phyname
--*
--status ,
--cntrltype ,
--mirrorname ,
--stripeset
from
#t1
where
DeviceNumber is not null
order by
DeviceNumber,
Name

go
print ' '
print 'Display Backup Devices'
print ' '
go

select
name ,
phyname
--*
--DeviceNumber ,
--low ,
--high ,
--status ,
--cntrltype ,
--mirrorname ,
--stripeset
from
#t1
where
DeviceNumber is null
order by
Name

go
drop table #t1
go
print ' '
print 'End'
print ' '


CODO ERGO SUM
Go to Top of Page

ricky_newbee
Posting Yak Master

126 Posts

Posted - 2005-06-27 : 10:15:04
Michael,
Thanks somuch.
Go to Top of Page

ricky_newbee
Posting Yak Master

126 Posts

Posted - 2005-06-27 : 12:31:41
mcrowley/TARA/Michael,
Another question, if i make a copy of backupset from tape to the Server where i would install 6.5. Can i perform "CREATE DATABASE FOR LOAD"? I am hoping i can get a copy of Backup from tape to the server by today.

Thanks,
Rick
Go to Top of Page

ricky_newbee
Posting Yak Master

126 Posts

Posted - 2005-06-29 : 10:04:09
Guys,
I could able to recover databases from tape backup. I used CREATE DATABASE FOR LOAD.
Thanks for your help.

Rick
Go to Top of Page
   

- Advertisement -