views:

52

answers:

1

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

Error: 928, Severity: 20, State: 1

During upgrade, database raised exception 156, severity 25, state 1, address 0000000001C05A9F. Use the exception number to determine the cause

It has occured during upgrade phase, after restore percent hit 100%.

If I retry with the same script, sometimes I get the same error, but if I wait a little the script completes successfully. 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.

+1  A: 

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...

gbn
Compatibility is on 80 and version on 539. I've used upgrade advisor and found some old syntax join's but didn't correct them.
Gabriel Guimarães
@Gabriel Guimarães: ... and the upgrade advisor?
gbn
There's the old outer join sintax, but its just a warning.
Gabriel Guimarães
Is exception 156 the same as error 156? I'm getting error 928 not 156.
Gabriel Guimarães
@Gabriel Guimarães: Error = exception in this case. You are getting 156. Error 928 is only reporting error 156 which has severity 25 which is the **highest**
gbn
Is there a way to use this address to find where this is happening? thanks!
Gabriel Guimarães
@Gabriel Guimarães: no sorry. I would change the joins and see what happens...
gbn
OK. I'll return here after I change the joins.
Gabriel Guimarães
Unfortunattly I won't be able to change these so soon. But thank you for the help interpreting the errors. Meanwhile I'll leave the questions open.
Gabriel Guimarães