Session support to store history of SQL statement for SQL actions