Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Nov 08, 2014 @ 17:17
    Jeroen Breuer
    0

    Error thrown by SQLBackUp package

    Hello,

    I installed the packaged on Umbraco 7.1.8. When I try to create a backup I get the following exception:

    Error thrown by SQLBackUp package
    System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near '.'.
       bij System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       bij System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       bij System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
       bij System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
       bij System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
       bij System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
       bij AllianceMedia.SQLBackUp.UserControls.SQLBackUp.btnRun_Click(Object sender, EventArgs e)
    ClientConnectionId:b90d0fe9-b0b5-4063-9463-2f87b57ea967

    I can't post the connection string of course, but it's to our development database server. Any extra info you need?

    Jeroen

  • Adam Maidment 54 posts 163 karma points
    Nov 09, 2014 @ 13:57
    Adam Maidment
    0

    Hi Jeroen,

    1. What version of MSSQL are use using on your dev server?
    2. Could you post the query string and 'hash' out the specific details? - I need to check the structure
    Regards
    Adam
  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Nov 10, 2014 @ 12:38
    Jeroen Breuer
    0

    Hello,

    The version is SQL Server 2008 R2 10.50.1600.1

    This is the connection string: <add name="umbracoDbDSN" connectionString="server=####;database=####;user id=####;password=####" providerName="System.Data.SqlClient" />

    Jeroen

  • Adam Maidment 54 posts 163 karma points
    Nov 11, 2014 @ 10:56
    Adam Maidment
    1

    Hi Jeroen,

    I've done some initial investigation and can't seem to replicate your issue. I will invest some more time later in the week. I'll be cleaning up the comments and putting the source code online sometime in the near future which may also allow others to have a look and see if there's a obvious issue I've missed.

    I will keep you posted.

    Regards
    Adam 

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Nov 11, 2014 @ 10:59
    Jeroen Breuer
    0

    Thanks. I'll try to debug it myself once I have the source code.

    Jeroen

  • kim Thomsen 59 posts 277 karma points
    Nov 11, 2014 @ 16:52
    kim Thomsen
    0

    I got the same issue 
    And im running umbraco 7.1.8  and MSSQL 2012

  • Adam Maidment 54 posts 163 karma points
    Nov 11, 2014 @ 17:48
    Adam Maidment
    0

    Hi,

    Are either of you using a dot-convention in your connection string at all?

    eg: server=.\INSTANCENAME

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Nov 11, 2014 @ 17:49
    Jeroen Breuer
    0

    No it's just a url in my situation.

    Jeroen

  • kim Thomsen 59 posts 277 karma points
    Nov 12, 2014 @ 09:06
    kim Thomsen
    0

    I tryed changing it, but nothing semes to work for me 

  • Adam Maidment 54 posts 163 karma points
    Nov 12, 2014 @ 10:40
    Adam Maidment
    1

    Hi,

    I've now uploaded the source code for the UserControl. As mentioned in the project blurb, it was a rather hastily hacked together package so I'd be really keen to hear feedback on improvements or bug fixes which can be included for future releases.

    I still can't replicate the error you guys are getting so have a look and see if there's a glaring mistake I've made ;-)

    I am happy to provide personal email to anyone who wishes to communicate.

    Many thanks
    Adam 

  • kim Thomsen 59 posts 277 karma points
    Nov 12, 2014 @ 12:01
    kim Thomsen
    100

    Found the error :) 
    Its becouse of the name of my db.
    Its called xxx.umbraco

    so line 125 should be :
    sqlcmd = new SqlCommand("BACKUP DATABASE [" + sqlcon.Database + "] TO DISK = '" + destdir + filename + "'", sqlcon);

    instead of 
    sqlcmd = new SqlCommand("BACKUP DATABASE " + sqlcon.Database + " TO DISK = '" + destdir + filename + "'", sqlcon);

     :)

  • Adam Maidment 54 posts 163 karma points
    Nov 12, 2014 @ 12:07
    Adam Maidment
    0

    Excellent. How obvious. I'll update the package to 1.1 and reupload.

    Thanks Kim.

Please Sign in or register to post replies

Write your reply to:

Draft