Q:

Attach/detach vs. backup/restore

I need to transfer the database (as a whole) to another server, to make a duplicate database to setup another test environment.
I have two choices:

Make a full backup at source server/restore at destination server;
Detach at source server/attach at destination server.

What are the pros and cons of the two solutions according to my requirements?
I am using SQL Server 2008 Enterprise.

A:

Backup/restore should normally be your method of choice. It will be quicker in most situations.
You can use it consistently, also for production to test too.
See this related question as well, where the backup/restore vs detach/attach is mentioned:
SQL Server Migration restore backup vs copy data and log files
Make sure you add the WITH COPY_ONLY option to the backup so it does not break the existing maintenance plan backup chain.

A:

Detaching the database will take it offline. Make a backup if you need the database to remain online while you copy it to another server.
Moving and restoring a backup file (.bak) may be simpler/easier than moving and attaching multiple mdf/ldf files (as you would if you detached the database). 
On paper, a database detach/attach may be faster technically, but in practice, a backup/restore is likely to be quicker and easier. When you detach a database you first have to take the original database offline (disconnect everyone and everything), and then the database is unavailable until you reattach. You also have to keep track of all of the files, whereas with a backup all of the files are grouped.

If you decide to backup/restore, use the WITH COPY_ONLY option during the backup to ensure that any existing maintenance plan's backup chain isn't broken.
 A .bak file compresses well, so if you decide to go with making a backup, compressing the backup before moving it might save some transfer time.

A:

I would go for backup/restore as it leaves the original database in an operational state.
Especially if you're doing a 'production to test' conversion, it's important that the production database stays online.
Backup/restore is also a safer option: What happens if the file becomes corrupt somewhere between the start of the detach, the copy, the attach, etc.? At least if you perform a backup and the file becomes corrupt, you can start over. If that happens with a detach, your database is gone.
Also, to me (although its more a feeling than anything else), backup/restore is "everyday work" whereas detach/attach is something you do in exceptional circumstances. Don't ask me where I got this idea though ;-)

