Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    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

    Scheduled Pinned Locked Moved Support
    8 Posts 3 Posters 36 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L Offline
      lucas.almeida_8120
      last edited by

      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?

      atrippA 1 Reply Last reply Reply Quote 0
      • atrippA Offline
        atripp inedo-engineer @lucas.almeida_8120
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • L Offline
          lucas.almeida_8120
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • L Offline
            lucas.almeida_8120
            last edited by

            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?

            atrippA 1 Reply Last reply Reply Quote 0
            • atrippA Offline
              atripp inedo-engineer @lucas.almeida_8120
              last edited by

              @lucas-almeida_8120 in that case, I would use a import path - https://docs.inedo.com/docs/proget-bulk-import-with-droppath

              1 Reply Last reply Reply Quote 0
              • S Offline
                scott.wright_8356
                last edited by

                @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.

                atrippA 1 Reply Last reply Reply Quote 1
                • atrippA Offline
                  atripp inedo-engineer @scott.wright_8356
                  last edited by

                  @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.

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    scott.wright_8356
                    last edited by

                    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?

                    1 Reply Last reply Reply Quote 0

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better 💗

                    Register Login
                    • 1 / 1
                    • First post
                      Last post
                    Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation