32-bit Database vs. 64-bit Database?

Problem:

In the process of organizing the SQL Server sample databases and projects, I often see different download files for 32-bit and 64-bit (e.g., AdventureWorksDB.msi vs.  AdventureWorksDB_x64.msi). This makes me think: OK, how do I know the version of a database? how do I know if a database is a 32-bit or 64-bit?

Solution:

1. For the database version

(1) Turn on TRACEON flag 3604, run DBCC DBINFO:

DBCC TRACEON (3604);  
GO 

DBCC DBINFO
GO 


DBCC TRACEOFF (3604);

(2) In the output, find dbi_version (THE CURRENT VERSION) and dbi_createversion

(3) Know the database version number
  • SQL Server 7.0 databases have version number 515
  • SQL Server 2000 databases have version number 539
  • SQL Server 2005 databases have version number 611/612
  • SQL Server 2008 databases have version number 655
  • SQL Server 2008R2 databases have version number 663
  • SQL Server 2012 databases have version number 706
  • SQL Server 2014 databases have version number 782
  • SQL Server 2016 databases have version number 829
2. For the database 32-bit vs. 64-bit property, see the post below:

http://stackoverflow.com/questions/2526375/32bit-to-64bit-sql-server-2008-database-conversion

The key point is that there is no such concept at the database level. The difference between 32-bit and 64-bit is only applicable to the server instance. However, attaching a so-called 64-bit database (meaning it was created on a 64-bit instance) to a 32-bit instance to the same or higher version of server instance is fine.

But I am kind of understanding why MS folks use different file names for different architecture machines: The default installation path depends on the architecture of processor. So, to be aligned with other installation files, they decide to use different names for the same thing (i.e., the database).