Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading forever..?

Status
Not open for further replies.

kenjoswe

Technical User
Sep 19, 2000
327
SE
Hi all,

I have a backuped a database on a tapedevice from an old server that I would like to restore to a new server.

I have created a new database with the same sortorder and name as the old one.

When I run the restore command from EnterpriseManager everything looks good and I'll get:
'Restore was successfull'. The database is approx 150 GB.
But the database say's: 'Loading' and that's what the database have said for three days now.
I guess I have waited long enough.

What can be wrong?

/Kent J.
 
Enterprise Manager is probably just cashing the info. Try closing Enterprise Manager and reopening it and be sure to hit the refresh button at the top of the window to get an updated databases view.

Was your entire database on just the one tape?

Once it says Restore was successful you should be done and it should no longer say loading. Check the SQL errorlog and see if there is anything useful in there.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(Not quite so old any more.)
 
Yes, the backup was on one tape.

I have also tried to attach the database directly but that fails too.

This is from the errorlog:
Starting up database 'KundData'.
Error: 9004, Severity: 21, State: 1
An error occurred while processing the log for database 'KundData'..

I have checked the size from the original database and they have exactly the
same size.
KundData_Data.MDF 132 706 816
KundData_Log.LDF 20 796 096

Can I ignore the logfile somehow?

I successfully managed to restore a smaller database with logfile (LDF)
from the same tape that was after the bigger databasefile.
That tells me that it's possible to restore from this tapebackup.
I could also attach the same small database without problem.

I don't understand why I'm having this trouble with the big one.

/Kent J.
 
Sounds like the log was corrupt on the tape. There are a couple of things you can try. None of these are really recommended.

1. Mark the database status to the correct status in master.dbo.sysdatabases. You'll need to know what the settings of the database were.

2. Detach the offending database, rename the log file and reattach the database. When you reattach it, it will show that it can't find the ldf file. That's fine, just click attach (or ok, or whatever it's labeled). It will ask you if it should build a new log file or something to that effect. Click yes and it should reattach the database with a new log file. You can also try doing this via sp_attachdb_single_file


Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(Not quite so old any more.)
Donate to Katrina relief
 
You say it continues to say LOADING....usually that means you used the WITH NORECOVERY option and it's still waiting for more log files to be restored.

Run this in Query Analyzer...

RESTORE LOG KUNDData WITH RECOVERY

-SQLBill

Posting advice: FAQ481-4875
 
SQLBill,

Yes,I have successfully done my restore.
It took 11 hours and 47 min.
===========================
RESTORE DATABASE Kunddata
FROM TAPE = '\\.\tape0'
with recovery

Processed 15402472 pages for database 'Kunddata', file 'KundData_Data' on
file 1.
=======================

/Kent J.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top