We are currently trying to upgrade from 4.9 to 5.0.1 and we are having the same problem. The stored procedure "GetPackageByName" seems to be missing.
When we compare the packages table from a fresh install to that from the "upgraded" version, there seems to be a difference.
Upgrade:
PackageID, Name, FriendlyName, Description, PackageType, Version, License, Manifest
Fresh:
PackageID, PortalID, Name, FriendlyName, Description, PackageType, Version, License, Manifest, Owner, Organization, Url, Email, ReleaseNotes, IsSystemPackage
When we had a look at the stored procedure "GetPackageByName" in the DNN 5 version it uses PortalId wich doesnt exist.