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 after upgrade version



  • I am having an issue that every time I update the Proget version, it always gives some error in some database procedure. This time, when I updated to version 2023.30, I received the following error:

    Could not find stored procedure 'PgvdVulnerabilities_GetVulnerabilities'.

    Microsoft.Data.SqlClient.SqlException (0x80131904): Could not find stored procedure 'PgvdVulnerabilities_GetVulnerabilities'.
    at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__209_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke()
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    --- End of stack trace from previous location ---
    at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
    --- End of stack trace from previous location ---
    at Inedo.Data.DatabaseContext.DbResult.CreateAsync(DbCommand command, DatabaseContext context, DateTimeOffset startTime, Stopwatch stopwatch)
    at Inedo.Data.DatabaseContext.ExecuteInternalAsync(String storedProcName, GenericDbParameter[] parameters)
    at Inedo.Data.SqlServerDatabaseContext.ExecuteInternalAsync(String storedProcName, GenericDbParameter[] parameters)
    at Inedo.ProGet.Data.DB.Context.PgvdVulnerabilities_GetVulnerabilitiesAsync(String Ecosystem_Name, String AssessmentType_Name, Nullable1 OnlyUnassessed_Indicator, String OrderBy_Name, Nullable1 OrderByDesc_Indicator, Nullable1 Skip_Count, Nullable1 Take_Count)
    at Inedo.ProGet.WebApplication.Pages.Packages.ListPackagesPage.PackageList.InitializeAsyncInternal()
    at Inedo.ProGet.WebApplication.Pages.Packages.ListPackagesPage.PackageList.InitializeAsync()
    ClientConnectionId:97f4c8e6-6163-43c5-8f83-3654804ba889
    Error Number:2812,State:62,Class:16

    This time it was this, but every time I update it presents some issue of not being able to find some procedure. Could you give me some assistance on this matter?


  • inedo-engineer

    Hi @lucas-almeida_8120 ,

    This error is indicating that your database not being upgraded along with the rest of your installation. Or is otherwise corrupt. I can't imagine how that could happen, so unfortunately you'll have to do some digging on this.

    Here is where the connection string for the ProGet database is stored:
    https://docs.inedo.com/docs/installation-configuration-files

    If you review the installation logs in the Inedo Hub, you will see what database/connectionstring is being used.

    Good luck, and let us know what you find!

    Alana



  • This post is deleted!


  • I chose to migrate it to a server with a more updated operating system, and I will let it recreate the database. How do I ensure that my feeds and NuGet packages are maintained while allowing Proget to create a new database? If I simply copy the folder where my packages and extensions are saved and place it on the new server, will it be able to identify them?


  • inedo-engineer



  • @atripp We had the same error when upgrading each node on a high availability install. Does the upgrade routine delete and recreate the stored procedures for each node upgrade? It felt like there was no check of a version for each node upgrade.


  • inedo-engineer

    @scott-wright_8356 the Inedo Hub will upgrade the database code (stored procs, views) when doing an installation. So from the time you upgrade the first server to the last server of a cluster, the "database code" and "server code" will be "out of sync", yielding errors like this.

    For most users it's okay, and they will typically (manually) upgrade all nodes over the course of a few minutes during a mtaintenance period etc.



  • A possible solution to this is to use Extended Properties in SQL. That way you can check the version of the files in the upgrade and not re-create them when they have already been updated?


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation