This is a mirror of official site: http://jasper-net.blogspot.com/

Database internal file versions– How to determine if the database was upgraded or created from scratch

| Thursday, July 29, 2010
In some cases it it interesting to know whether a database was directly created on the current version of the running SQL Server instance or if the database was upgraded during an upgrade of the instance or by attaching a database from an older version to a newer version of SQL Server.

The information is stored in the datafile headers. To reveal it you will have to use the DBCC command and redirect the information to the trace output (by default this will be send to the errorlog) by using the following command:

DBCC TRACEON(3604)

After that you free to use one of the following commands:

DBCC DBINFO (information of the current database you are executing from)
DBCC PAGE(‘YourDatabaseHere’1,9,3) (Whereas “YourDatabaseHere’1” is you database to check for)
to will get you the following information:

1346.clip_5F00_image002_5F00_thumb.jpg

Read more: Developer hearted / Relational minded

Posted via email from .NET Info

0 comments: