Oracle Equivalent of Print in SQL Server


I'm new to Oracle.Im now converting SQL stored procedure to Oracle stored procedure.As in my Sql Stored procedure, i have those print 'record inserted into xxx table' to show whether the records successfully inserted to different table.Is there anyway i can do the same in Oracle in order to track what has the stored procedures done?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dbms_output.put_line(YOUR variables)

you will need to SET SERVEROUTPUT ON before the above line will display the results in SQL Plus window
NievergeltSenior SW DevCommented:
Actually, in a script, you need to use CALL, only in PL/SQL it works without.
Also, the function requires one parameter; you can use it like this:


DBMS_OUTPUT has a limit on how many characters you can output, so you will probably like to add the following statement after the SET SERVEROUTPUT :

sinwee80Author Commented:
If i have a db program which execute this stored procedure, Can this dbms_output.put_line(YOUR variables)
captured in the vb program to log to a file?
NievergeltSenior SW DevCommented:
You best look first at the documentation:

As you see there, DBMS_OUTPUT actually writes to a buffer.
With DBMS_OUTPUT.GET_LINE or DBMS_OUTPUT.GET_LINES you can retrieve the contents of that buffer in your program.

Alternatively, you could use supplied package UTL_FILE to write to a file:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.