Question

I'm restoring a SQL 2000 user database on a SQL 2008 R2 box, but sometimes I receive the following error. This is the SQL Log.

22/11/2010 09:32:00 | SPID61 | Starting up database 'DB_OPP_P_2'.

22/11/2010 09:32:00 | SPID61 | The database 'DB_OPP_P_2' is marked RESTORING and is in a state that does not allow recovery to run.

22/11/2010 09:32:33 | SPID61 | Starting up database 'DB_OPP_P_2'.

22/11/2010 09:32:33 | SPID61 | Recovery is writing a checkpoint in database 'DB_OPP_P_2' (51). This is an informational message only. No user action is required.

22/11/2010 09:32:36 | SPID61 | Error: 928, Severity: 20, State: 1.

22/11/2010 09:32:36 | SPID61 | During upgrade, database raised exception 156, severity 25, state 1, address 0000000002225A9F. Use the exception number to determine the cause.

Since it shows the exception occurred during upgrade phase, I believe it happened after restore percent hit 100%.

I've implemented a script retry of this restore, and it failed all 5 times it tried. However if I retry manually with the same restore script the restore completes. I've run DBCC CHECKDB on the source and no error has been returned.

Compatibility level of the database is 80 (sql 2000) and version is 539.

While running Upgrade Advisor on the problematic database of the time I see 27 objects with the old outer join sintax *=, =*

Unfortunattly I won't be able to change the procs to check if this is the culprit. One other possibility is that there are a lot of procs that doesn't have BEGIN and END delimiting its extensions, and if I create them in a batch this confuses SQL.

UPDATE:

  • I've successfully restored the database on a SQL 2000 box.
  • I also implemented a retry behavior on my job, that failed all 5 times.

The retry behavior failed. But the strange thing is that if I retry with the same restore script the job tried the restore succeeds.

UPDATE 2: I've manually restored the database on my migration to sql 2008 r2. So I haven't fixed this issue, and will not fix it, as on sql 2008 r2 this doesn't happen. Thanks for your help.

Was it helpful?

Solution 2

I've manually restored the database on my migration to sql 2008 r2.

So I haven't fixed this issue, and will not fix it, as I've moved to sql 2008 r2 and this doesn't happen anymore.

Thank you very much for your help.

OTHER TIPS

Check the compatibility of the databases in SQL Server 2000: are they 65?

Error 156 is incorrect syntax, basically, and it's usually caused by compatibility mismatch. "65" is not supported in SQL Server 2008

Did you try the upgrade advisor before backup/restore?

Edit:

Outer JOIN. Hmmm

Just noticed that for SQL Server 2005 it's discontinued but for SQL Server 2008 it's deprecated. My guess is that the *0 and 0* syntax is breaking things, regardless of what the upgrade advisor and MSDN says. Personally I haven't used it since, er, I migrated to SQL Server 7 from 6.5...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top