Be aware that if you attach your 2005 DB to SQL2012 you will not be able to use it with SQL 2005 again - Sql will convert it to the latest format, and there is no facility to export a 2005 friendly version.
A much, much better idea would be to copy the DB and allow the 2012 version to be a new, separate DB that it manages:
http://msdn.microsoft.com/en-us/library/ms188664.aspx[
^]