Hello,
RMD use MS SQL as data-source. Database RemoteDesktopManager had set option Recursive Triggers enabled (got it from model db and had it "from beginning").
Now finished with error Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32) on trigger tr_Connections_Update. looking on table connections, all records have column SecurityGroup NULL.
Disabling Recursive Triggers on database RemoteDesktopManager solved this ...
Do you explicitly require this option to be set or unset (then maybe add this to upgrade script) or is it problem with actual data in tables?
Petr Valouch
Help wanted: Telepath.
You know where to apply.
I will investigate and patch the upgrade script if required. Thank you for the heads-up.
Stéfane Lavergne
Petr,
Did the recursion happen every time you edited a session? Do you have repro steps?
It's a bug, the recursion is required but should have stopped after the first recursion (not infinity).
Best regards,
Stéfane Lavergne
from trigger seems to me it shoud stop :) ...
isnull(i.SecurityGroup, '00000000-0000-0000-0000-000000000000') <> isnull(d.SecurityGroup, '00000000-0000-0000-0000-000000000000')
when i put recursive triggers back and played with it, every update (f.e. description on more tab) has been applied to db ...
trying with profiler, there is:
UPDATE Connections SET Data = @Data, SecurityGroup = @SecurityGroup, Name = @Name , ConnectionType = @ConnectionType, ConnectionSubType = @ConnectionSubType, GroupName = @GroupName, MetaData = @MetaData, ModifiedDate = @ModifiedDate, ModifiedUsername = @ModifiedUsername, ModifiedLoggedUserName = @ModifiedLoggedUserName, UnsafePassword = @UnsafePassword WHERE ID=@ID
set nocount on
insert into dbo.ConnectionHistory (HistoryType, ConnectionID, DATA, SecurityGroup, CustomerID, ConnectionType, ConnectionSubType, GroupName, Name, UnsafePassword, DataSourceID, MetaData, CreationDate, Description, ModifiedDate, ModifiedUsername, ModifiedLoggedUserName, Version)
select N'U', ID, DATA, SecurityGroup, CustomerID, ConnectionType, ConnectionSubType, GroupName, Name, UnsafePassword, DataSourceID, MetaData, CreationDate, Description, isnull(ModifiedDate, getutcdate()), ModifiedUsername, ModifiedLoggedUserName, Version from inserted
update c
set
-- set any field to itself
c.GroupName = c.GroupName
from (select N'%;' + i.GroupName + N'[\;]%' as GroupName
from
inserted i
inner join deleted d on i.ID = d.ID
where isnull(i.SecurityGroup, '00000000-0000-0000-0000-000000000000') <> isnull(d.SecurityGroup, '00000000-0000-0000-0000-000000000000')
and i.ConnectionType = 25) a
inner join (select N';' + GroupName + N';' as GroupName, ID from Connections where ConnectionType <> 25) b on b.GroupName like a.GroupName
inner join Connections c on b.ID = c.ID
UPDATE DatabaseInfo SET ConnectionCacheID = NewID()
and then update c, insert connectiohistory, update c ...
if you wanna play with data, i can upload you backup of DB ....
Petr Valouch
Help wanted: Telepath.
You know where to apply.
I will try to repro on my side first, odd that I haven't seen it yet.
Thanks
Stéfane Lavergne
Petr, please upload the backup. I can't reproduce here on my own DB with server trigger recursion set to on.name minimum maximum config_value run_valueserver trigger recursion 0 1 1 1
Stéfane Lavergne
sended in PM ...
Petr Valouch
Help wanted: Telepath.
You know where to apply.
Thanks for the backup. I can reproduce now. I will investigate and make the appropriate fix/changes.
Best regards,
Stéfane Lavergne
Fixed, will be available in the next beta release.
Stéfane Lavergne