I'm noticing the same problem simply restoring a course backup into a new empty course. The DB is PostgreSQL, and the moodle instance is the same that backed up the course. The restore process appears to complete, but course media are missing. The icons exist, but no content, and links report errors (no such id, etc). I'm still looking into this, but thought I'd report that the problem is not limited to My/MS-SQL.
Seen on a couple of Moodles on versions 1.8.x..
I will provide details if I can-/ as I debug the problem.
- Luke Hudson