How to redirect 'dbms_output.put_line content' to log file from a TimesTen Stored Procedure

See the sample Timesten procedure below.

salary NUMBER;
SELECT emp_sal INTO salary FROM employee where emp_id = employee_id;
DBMS_OUTPUT.PUT_LINE('Employee Id:' || employee_id || ' Annual Income:' || salary*12);

If I call the procedure from Command line interface(ttisql), dbms_output.put_line logs gets printed there only. But I want to collect such debug logs to somewhere else in a log file. Whenever procedure get executed it should append these content to a file. Is there any possible way to do that?


If you are calling your procedure from ttisql as you've said you can use spool filepath and spool off to log any messages appeared on the screen. To append new information to the already existed log file just use APPEND option after filepath

spool c:\logfile.log append

Need Your Help

TwitterWidget within SilverStripe

javascript jquery twitter document.write silverstripe

I am trying to integrate TwitterWidget within SilverStripe.

Idiomatic way to get first element of a lazy seq in clojure

clojure lazy-sequences

When processing each element in a seq I normally use first and rest.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.