two part question
I have a WCF webservice which attaches MSQL DB files (templates) to the server.
Does anybody know why this could be very slow on the server? when I run the service on my client machine the attach is like 10 times faster.
I have problems with the timeout as when my service tries to handle multiple requests I get a timeout because apparently the sql server is busy with handling my previous request. What is the correct way to handle this?
SqlConnection conn = new SqlConnection("Data Source=" + Properties.Settings.Default.MSSQLServerName + ";Integrated Security=SSPI");
SqlCommand cmd = new SqlCommand("", conn);
//Creating SQL command
cmd.CommandText = "exec sys.sp_attach_db " + name + " , '" + MDFpath + "','" + LDFpath + "'";
//Dispose of connection