I just tried on a recent 7.0 build and it worked fine. The syntax is:
exec undelete_action 4477
I looked at the definition of the stored procedure and I did not see ACTIONS anywhere in there. Can you post the definition of your stored procedure and also the exact version of 7.0 you are running?
Did you upgrade from 6.0 to 7.0? I’m thinking your stored procedure didn’t get updated because the 6.0 version of the stored procedure would include the ACTIONS object on line 5, and it would fail if run against a 7.0 database. If this is the case, I suggest you give support a call and they can help make sure your database is updated correctly.
I did a little more investigation and it looks like the undelete_action stored procedure was broken in 7.0.1. If upgrading to 7.0.7 is possible for you, I’d recommend just doing that.
If you can’t upgrade you should be able to run the 7.0.7 stored procedure against the 7.0.1 database:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER procedure dbo.undelete_action @ActionID integer
as
begin
update ACTION_FLAGS
set IsDeleted = 0,
ManyVersion = dbo.fn_IncrementManyVersion( ManyVersion ),
OriginServerID = NULL,
OriginSequence = NULL
where ActionID = @ActionID
end
Forgive my ignorance, but where would I run these commands? I need to verify that I can get my past actions, even after i delete them from the console. I am pretty green in SQL, and looking for what tool to use for the above procedures.
select A.Name as
'Action Name', A.ID, A.CreationTime, dbo.fn_ExtractField(
'Issuer', 0, A.Fields) as
'Action Issuer' from ACTION_DEFS A, ACTION_FLAGS F where A.ID = F.ActionID AND F.IsDeleted=1