Hi @rosario-digiovanni_1930 ,
Thanks for sharing the details; from here, I would recommend just working with inedosql.exe
and the SqlSCripts.zip
file that's in the ProGet.SqlScripts-22.0.17 package. You can just run inedosql update
after extracting the SQLScripts.zip
file
The error is from from a while ago (14.07.2020 14:41:44), so I guess it's nothing to worry about. Perhaps it's the same underlying issue?
There's definitely something wrong... I just have no idea what it is. The only guess is schema/permissions, but you've already checked it.
I will describe to you what's happening, and hopefully you can troubleshoot with your database team better, especially since you'll have all the scripts that are run...
The script 0.1.AddStoredProcInfo.sql
does the following:
- drop/create table
__StoredProcInfo
- drop/create stored procedure
__AddStoredProcInfo
- drop/create stored procedure
__GetStoredProcInfo
- execute
__AddStoredProcInfo
Then later, the 1.ApiKeys_CreateOrUpdateApiKey.sql
script is executed. This script starts by executing __AddStoredProcInfo
again, but it's called with the [dbo].[__AddStoredProcInfo]
prefix instead.
So I think the issue is schema-related.
But as I mention, we try to mitigate this earlier with 00. EnsureDbo.sql
. This script works like so:
IF (SCHEMA_NAME() <> 'dbo') BEGIN
DECLARE @SQL NVARCHAR(MAX) = 'ALTER USER [' + CURRENT_USER + '] WITH DEFAULT_SCHEMA = [dbo]'
PRINT 'Changing default schema ("' + SCHEMA_NAME() + '") to dbo via: ' + @SQL
EXEC sp_executesql @SQL
PRINT 'Schema changed.'
END
Anyway, please let us know what you find. We'd love to make these scripts work in more scenarios, and not cause problems like this.