'SQL Server : .mdf upload error (somee.com)
I'm using somee.com for publish webservices and db. But when I try to upload my .mdf file, I get that error.
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.IO.IOException: The process cannot access the file 'c:\dzsqls\appointmentsystemdb.mdf' because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalDelete(String path, Boolean checkHost) at System.IO.File.Delete(String path) at DZWebSvc.DZWebAgent.AttachNewUserDBDataFileOnly(String DBName, String LoginName, String OriginalDBFileName, String OriginalLogFileName, String NewDBFileName, Int32 MaxDataFileSizeMB, Int32 MaxLogFileSizeMB, String ConnectionString, Boolean ChangeDefaultSchemaToDbo, String tk) in c:\Projects\Doka\Zin1_branch\DZWebSvc\DZWebAgent.asmx.cs:line 2232 --- End of inner exception stack trace ---
What does this error mean? What is the solution?
Solution 1:[1]
First check if names of databases are similar (name of your Database in Somee and name of your database in Local Db.
If the problem is not solved, then first delete your Database in Somee and create a new one with the same name if necessary. then in your SQL manager studio generate a script of your database.enter image description here Remove Master from start and end enter image description here then go to somee and click on Run-TSQL > then open T-SQL console and paste your script there, then click "RUN as T-SQL BATCH" and see if it works.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Shaheer Anis |
