Last post Apr 27, 2020 03:09 PM by PatriceSc
Apr 27, 2020 05:01 AM|jameslovemicrosoft|LINK
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: To use ALTER DATABASE, the database must be in a writable state in which a checkpoint can be executed. To use ALTER DATABASE,
the database must be in a writable state in which a checkpoint can be executed. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior
runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout,
Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at DZWebSvc.DZWebAgent.AttachNewUserDB(String DBName, String LoginName, String OriginalDBFileName, String OriginalLogFileName, String NewDBFileName, String NewLogFileName, Int32 MaxDataFileSizeMB, Int32 MaxLogFileSizeMB, String ConnectionString, Boolean ChangeDefaultSchemaToDbo,
String tk) in C:\Projects\Doka2019\DZWebSvc\DZWebAgent.asmx.cs:line 2167 --- End of inner exception stack trace ---
Apr 27, 2020 05:49 AM|DA924|LINK
To me, this seems that you should be discussing this with the hosting provider.
Apr 27, 2020 07:05 AM|Masterpiece88|LINK
You need to upload full .bak file to hosting server, you can't upload .mdf and .ldf, you are unable to restore it. You need to conver it to .bak file. You can run this script:
BACKUP DATABASE [NameOfDatabase] TO DISK = N'D:\path\filename.bak' WITH NOFORMAT, NOINIT, NAME = N'NameOfDatabase-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
Apr 27, 2020 02:50 PM|bruce (sqlwork.com)|LINK
Probably the Sqlserver process account trying to do the attach, only has read access to the files.
Apr 27, 2020 03:09 PM|PatriceSc|LINK
I would avoid this. MDF and LDF Files are the files on which SQL Server works and this is the last option I would use (including on premise).
ilw favor doing a "real" database backup and restoring this backup on a server. Your hosting service should have some documentation about how to move a database on their service (or this is a server on which you have full control ?)
Edit: or you wrote your own service to try to update the server side db ???