Hi Ifthekar,
It is suggested to migrate your OS and DB version First and then Upgrade.
Options are as below :
- Migrate to new hardware using Export - Import Method (Heterogeneous System Copy)
- Migrate using backup restore method System Copy as your OS and DB are same i.e Windows and SQL (SQL Server Supports restore on higher version from older version) You can create new server with OS Windows Server 2012 and install MS SQL Server 2012, take backup from source system (MS SQL 2005) and restore on target server (MS SQL 2012) , Run SAPinst to install using system copy method.
Once your system is migrated on upgrade OS and DB version you can perform in place upgrade on same server.
Hope this clarifies your query.
Thanks,
Anand Patel