I made an Ingres report for automating this:
select server, session_id from
where db_name = 'fepa404'
.print "set autocommit on \\g" .nl
.print "\\sql" .nl
.print "execute procedure" .nl
.print "ima_remove_session(server_id = '" .print server .print "'," .nl
.print "session_id = '" .print session_id .print "')" .nl
.print "\\p\\g" .nl
Load it into imadb with "sreport". Then run it against imadb with "report".
This will generate a script removesessions.sql. Run removesessions.sql
against imadb -> all sessions will be removed.
Note that you must change the line
where db_name ...
in the report so that it fits the name of your database(s).
> We have some cron jobs executing application shutdown, ingstop,
> ingstart, optimizedb and sysmod once a week. However, the ingstop
> doesn't work due to orphaned process keeping a database session open
> after the application is shutdown. It pretty much defeats the purpose
> to have cron perform these automated weekly maintenance processes if
> these orphaned sessions cause the processes to abort. We thought of
> executing an "ingstop -force" instead of just an ingstop but are
> concerned that ingstop -force may cause additional problems. How safe
> is it to use this command once a week and what impacts will we see?
What would be the affect of issuing a second ingstop -force -kill within a
script, if my original ingstop had not yet returned or appeared to be hung