Search code examples
sqlsql-server-2005sql-server-2000

SQL Server 2000 database after restore to 2005 is empty


I have very old backup file (.bak) of SQL Server 2000. After restoring it to SQL Server 2005, the database looks empty (please see screenshot).

What is the probable cause?

screenshot


Solution

  • Answer for other people looking for solution: It turns out that the database was even older than SQL2000. It was from SQL 6.5 (1996). From previous screenshot 6.5 means database compatibility version 65 (SQL Server version 6.5. All versions described here: https://en.wikipedia.org/wiki/History_of_Microsoft_SQL_Server

    So I had to open SQL Enterprise manager 8.0 (which supports such an old database, version 65) and change compatibility level of the database to 80 (highest available, and that's compatibility version of SQL 2000). Than make a backup of DB and restore it in SQL Server 2000-2008 as lvl 80 is supported by them. Please see screenshot below: Compatibility lvl

    And you can repeat the steps so for example DB restored in SQL Server 2008 can be changed (compatibility lvl) to a 100. Back it up again and restore in SQL 2017 or higher, you can easily find compatibility level tables: MICROSOFT WEBSITE COMPATIBILITY LEVEL