Alternative for dbms_output.put_line

The visitor statistics for a website/blog can be very revealing. And it’s interesting because it sort of turns the tables in that rather than a small handful of surfers finding my site as search engines react to what I’ve written based on what they are searching for, I can write an article based on those searches that the people who ended up at my site did.

Today I have had a significant number of hits for someone searching for ‘alternative for dbms_output.put_line’. Not sure why that search would lead someone to arrive at my site.

However, if you haven’t already come across it in your searches, one thing that you might find useful, whoever you are, is debug.f via Tom Kyte and here is one of his blog entries on instrumentation.

Depending on what you’re trying to achieve, another alternative is to write your messages to a table. My current method of choice is to write messages to table using an autonomous transactions that also sets session information using dbms_application_info. The sort of information is pl/sql module entry/exit points and other significant messages like session longops information (together with a maintenance proc and job to cleardown “old” messages). 


4 Responses to Alternative for dbms_output.put_line

  1. me says:

    Hey, one of those people searching is me (after you’ve written this entry though). We sometimes use the UTL_FILE library instead, and I was looking for another solution, and although I thought of writing to a temp table, I don’t have the permission under the user I have to run under to create any tables. I’ll have to look into creating entry/exit points and see if that makes sense for me. Thanks.

  2. me says:

    Ah, I’ve just found out that NULL to dbms_output.enable() says make the buffer size unlimited, which solves all my problems.

  3. me says:

    Ah, I completely misread the last paragraph about entry/exit points…at least I have a solution though, as long as it’s v10.2 or better.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: