A
ad
I am use the AttachDbFilename to connection to a .mdf file of SqlExpress
(like the example below)
After the database is attached, it will be free again until all session time
out.
But sometime I want to move the .mdf file to another place, but the .mdf is
not free.
How can I disconnect all the connections to that database immediately?
----------------------------------------------------------------------------------------------------------------------
<add name="MyDataBase" connectionString="Data Source=VMXP\SQLEXPRESS;
AttachDbFilename=C:\SqlData\Healthdb\Health.mdf;
Integrated Security=True;
User Instance=True"
providerName="System.Data.SqlClient"/>
(like the example below)
After the database is attached, it will be free again until all session time
out.
But sometime I want to move the .mdf file to another place, but the .mdf is
not free.
How can I disconnect all the connections to that database immediately?
----------------------------------------------------------------------------------------------------------------------
<add name="MyDataBase" connectionString="Data Source=VMXP\SQLEXPRESS;
AttachDbFilename=C:\SqlData\Healthdb\Health.mdf;
Integrated Security=True;
User Instance=True"
providerName="System.Data.SqlClient"/>