Saturday, 18 August 2012

How to activate DBMS_output in Rails

I have added some debug statements in my sql Procedure and I want to see the dbms output content in my test log file
DBMS_OUTPUT.PUT_LINE ('Hello!!!');
I open the console
ruby script/console test
check the enable_dbms_output field is true or not By running the command
ActiveRecord::Base.connection
If it is not true then reset to true by running below command before your testcase.
ActiveRecord::Base.connection.enable_dbms_output
then you can see the dbms_output statements in test.log file.

No comments:

Post a Comment