Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

SQL error when upgrading ProGet from 5.0.8 to 5.2.32



  • I attempted to upgrade ProGet 5.0.8 to 5.2.32, and it resulted in a database related error and left ProGet in a broken state.

    2023-03-22 21_01_37.png

    INFO: Executing OBJECTS\2.VIEWS\1.ProGetLicensingViolations_Extended.sql...
    INFO: Executing OBJECTS\2.VIEWS\1.ProGetPackageVersions_Extended.sql...
    INFO: Executing OBJECTS\2.VIEWS\1.PypiPackages_Overview.sql...
    INFO: Executing OBJECTS\2.VIEWS\1.RoleTasks_Extended.sql...
    INFO: Executing OBJECTS\2.VIEWS\1.RpmPackages_FileNames.sql...
        ERROR:    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
        ERROR:    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
        ERROR:    at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
        ERROR:    at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
        ERROR:    at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
        ERROR:    at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
        ERROR:    at Inedo.DbUpdater.SqlServer.SqlServerDatabaseConnection.ExecuteQuery(String query, SqlTransaction transaction)
        ERROR:    at Inedo.DbUpdater.SqlServer.SqlServerDatabaseConnection.ExecuteScripts(IEnumerable`1 scriptFiles)
        ERROR:    at Inedo.DbUpdater.Program.Update(String scriptPath, String connectionString)
        ERROR:    at Inedo.DbUpdater.Program.Main(String[] args)
        ERROR: Unhandled Exception: System.Data.SqlClient.SqlException: Invalid object name 'dbo.RpmPackages'.
    

    Has anyone else encountered a similar error?


  • inedo-engineer

    Hi @doejohn_7742 ,

    The underlying error message "Invalid object name 'dbo.RpmPackages' is implying that there's something pretty wrong with the database; in this case, a missing table (RpmPackages).

    If that's the case, it wouldn't be easy to fix or troubleshoot unfortunately, and would require SQL expertise, etc. We don't have any general advise for this, but we may be able to help some paid users depending on the issue (it's quite time consuming as you can imagine).

    HOWEVER -- it could also be something really simple, like your username (i.e. set in the connection string when you upgrade) is in the wrong schema (needs to be dbo schema), so I would check that too. Our script is supposed to detct that, but sometimes it doesn't work.

    Cheers,
    Alana



  • @atripp Thank you for the quick reply. We're back up and running on 5.0.8. I'll check those things and give it another shot. Would you be able to tell me in what version the RpmPackages table was added? 5.0 or 5.1?



  • Never mind. The table was added in 5.2. It sounds like your second suggestion is the issue here. Thanks again.


  • inedo-engineer

    @ade8s_7742 so glad to hear that! It's really rare, but glad it wasn't database corruption!!


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation