Monday, March 26, 2012

Database versions in sql server

This is something interesting that I noticed recently.

select name,cmptlevel,version from sysdatabases
the above query shows how the versions are defined between sql server 2000, 2005, 2008, 2008 R2

in 2000 - version is 539 in sysdatabases sytem table
in 2005 - version is 611 in sysdatabases sytem table
in 2008 - version is 655 in sysdatabases sytem table
in 2008R2 - version is 661 in sysdatabases sytem table

When you restore a sql server 2000 backup on to a 2008R2 server, here is the what it shows in the output file:

Database 'database_test' running the upgrade step from version 539 to version 551.
Database 'database_test' running the upgrade step from version 551 to version 552.
Database 'database_test' running the upgrade step from version 552 to version 611.
Database 'database_test' running the upgrade step from version 611 to version 621.
Database 'database_test' running the upgrade step from version 621 to version 622.
Database 'database_test' running the upgrade step from version 622 to version 625.
Database 'database_test' running the upgrade step from version 625 to version 626.
Database 'database_test' running the upgrade step from version 626 to version 627.
Database 'database_test' running the upgrade step from version 627 to version 628.
Database 'database_test' running the upgrade step from version 628 to version 629.
Database 'database_test' running the upgrade step from version 629 to version 630.
Database 'database_test' running the upgrade step from version 630 to version 631.
Database 'database_test' running the upgrade step from version 631 to version 632.
Database 'database_test' running the upgrade step from version 632 to version 633.
Database 'database_test' running the upgrade step from version 633 to version 634.
Database 'database_test' running the upgrade step from version 634 to version 635.
Database 'database_test' running the upgrade step from version 635 to version 636.
Database 'database_test' running the upgrade step from version 636 to version 637.
Database 'database_test' running the upgrade step from version 637 to version 638.
Database 'database_test' running the upgrade step from version 638 to version 639.
Database 'database_test' running the upgrade step from version 639 to version 640.
Database 'database_test' running the upgrade step from version 640 to version 641.
Database 'database_test' running the upgrade step from version 641 to version 642.
Database 'database_test' running the upgrade step from version 642 to version 643.
Database 'database_test' running the upgrade step from version 643 to version 644.
Database 'database_test' running the upgrade step from version 644 to version 645.
Database 'database_test' running the upgrade step from version 645 to version 646.
Database 'database_test' running the upgrade step from version 646 to version 647.
Database 'database_test' running the upgrade step from version 647 to version 648.
Database 'database_test' running the upgrade step from version 648 to version 649.
Database 'database_test' running the upgrade step from version 649 to version 650.
Database 'database_test' running the upgrade step from version 650 to version 651.
Database 'database_test' running the upgrade step from version 651 to version 652.
Database 'database_test' running the upgrade step from version 652 to version 653.
Database 'database_test' running the upgrade step from version 653 to version 654.
Database 'database_test' running the upgrade step from version 654 to version 655.
Database 'database_test' running the upgrade step from version 655 to version 660.
Database 'database_test' running the upgrade step from version 660 to version 661.

 



 

No comments:

Post a Comment