Questions tagged [dbms-output]

145 questions
5
votes
2 answers

PL/SQL Alias for DBMS_OUTPUT.PUT_LINE()?

Simple question, is it possible to give an alias to the output function in the question title so that I can call something like trace('hello') rather than DBMS_OUTPUT.PUT_LINE('hello')? I would like this because I use output to help with debugging…
Griffin
  • 13,184
  • 4
  • 29
  • 43
4
votes
1 answer

Output to screen in Oracle SQL

I have searched quite extensively on how to output messages in Oracle SQL. I have read a lot about dbms_output.put_line and dbms_output.get_line and tried using both but am unable to get either to work. Using Oracle SQL Developer Version 2.
Alex
  • 1,060
  • 2
  • 17
  • 35
4
votes
1 answer

Is dbms_output.put() being buffered differently from dbms_output.put_line()?

Im using Aqua Data Studio to debug a stored proc by scattering output statments throughout. I have a delete statement in the package which violate an integrity constraint: DELETE FROM x WHERE x.ID = an_x_with_children; My proc fails with an…
Tom Tresansky
  • 19,364
  • 17
  • 93
  • 129
3
votes
1 answer

Procedure Buffer overflow

I have following procedure which is filling up null values in a column. The procedure works fine if i have very small set of data. But data that i am targettign on is about 3 billions of record. Just having this script tested on 1 Million record…
x.509
  • 2,205
  • 10
  • 44
  • 58
3
votes
1 answer

dbms_output.put_line in PLSQL Developer fails with ORA-06502 for strings longer than 32512 chars

This script fails in PLSQL Developer version 14.0.0.1961 (error ORA-06502: PL/SQL: numeric or value error: character string buffer too small): declare v varchar2(32767) := rpad('x',32513,'x'); begin dbms_output.enable(null); …
Tomáš Záluský
  • 10,735
  • 2
  • 36
  • 64
3
votes
1 answer

Euro '€' symbol not inserted correctly during Oracle SQL LOAD

I'm loading a csv file using sqlldr. the file contains the symbol "€" which is inserted into a VARCHAR2 column. After the load, the database displays '¿' instead of the euro symbol. I have specified the characterset in the control file during the…
Slimane Agouram
  • 365
  • 1
  • 5
  • 17
3
votes
2 answers

Spooler not writing dbms_output to file

I need to spool the output of a loop to a file. My code for that is below: set termout off set echo off set colsep '' set linesize 5000 set heading off set feedback off set preformat off set trimspool on set serverout…
Danger_Fox
  • 449
  • 2
  • 11
  • 33
2
votes
4 answers

My long time SQL*Plus loop doesn't print DBMS_OUTPUT.PUT_LINE output during execution

I know that in order to print something on sqlplus like below: begin dbms_output.put_line('Hello!'); end; / I need to call set serveroutput on; before that. I also know that is not needed, but I can also call DBMS_OUTPUT.enable; before, just…
Arthur Accioly
  • 801
  • 9
  • 26
2
votes
3 answers

PL/SQL - retrieve output

Is there a way to retrieve output from PL/SQL continuously rather than wait until the SP completes its execution. Continuously mean as when it executes the execute immediate. Any other mechanism to retrieve pl/sql output? As per Oracle docs Output…
R-K
  • 119
  • 1
  • 1
  • 8
2
votes
3 answers

dbms_output.put_line prints nothing in SQL Developer version 18.1.0.095

My database is: Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 - 64bit The company just gave me a new desktop with Windows 10. I installed SQL Developer version 18.1.0.095 Build 095.1630. Everything works fine except that…
Stack0verflow
  • 1,148
  • 4
  • 18
  • 42
2
votes
2 answers

PL/SQL Program to display the salaries of top 'a' employees

SET SERVEROUTPUT ON; DECLARE CURSOR cemp IS SELECT esal FROM emp ORDER BY esal DESC; a NUMBER (10) := &a; sal emp.esal%TYPE; BEGIN OPEN cemp; LOOP FETCH cemp INTO sal; …
2
votes
3 answers

sqldeveloper - DBMS_OUTPUT.PUT_LINE() Doesn't Work

I am trying to print the value passed to the DBMS_OUTPUT.PUT_LINE() function to the DBMS_OUTPUT screen in SQL Developer. No matter what I pass to the function, nothing gets printed in the output window. I have turned on the DBMS Output window and…
Neil
  • 301
  • 2
  • 5
  • 14
2
votes
1 answer

Print DBMS_OUTPUT.put_line with Hibernate or Spring

I would like to know if Hibernate or Spring or any 3rd party lib provide the ability of printing DBMS_OUTPUT.put_line messages directly to system.out or a file of log. The purpose is to have both PLSQL log messages and java log messages in the…
Qianlong
  • 269
  • 2
  • 12
2
votes
2 answers

get dbms output message from oracle in php

CREATE OR REPLACE PACKAGE BODY simpleState IS PROCEDURE selectFromTable(tableName VARCHAR2, columnName VARCHAR2) IS TYPE c1 IS TABLE OF VARCHAR2(30); Notes c1; BEGIN EXECUTE IMMEDIATE 'Select ' || columnName ||…
student0495
  • 171
  • 3
  • 15
2
votes
1 answer

NEXT_DAY in DBMS_OUTPUT.PUT_LINE

This seems to be a silly question, however I will anyway try my luck here. Refer below code block, you'd see NEXT_DAY accepts both 1 and 'Sunday' as an argument in SELECT statement but in DBMS_OUTPUT.PUT_LINE only 'Sunday', and throws error for 1 -…
Vishal
  • 198
  • 1
  • 3
  • 11
1
2
3
9 10