XCopy not Detaching Database



I am using the AttachDBFileName and User Instance properties to cause my ..mdf database to dynamicaly attach and detach when the application runs and stops execution. This is known as Xcopy Deployment, a very cool idea available only in SQL Express.

It all works perfectly both with and without User Instancing, up until I stop the application. The problem is that the .mdf file is never detached, also if I use user instancing the user instance sqlserv.exe process never stops, even when I set the user instance timeout to 5.

Any ideas or suggestions?

Best Regards,

Ken Hanson

.