Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SET SERVEROUTPUT ON Not working in 5.0.1 trial #1861

Closed
vencoreguy opened this issue Dec 7, 2017 · 8 comments
Closed

SET SERVEROUTPUT ON Not working in 5.0.1 trial #1861

vencoreguy opened this issue Dec 7, 2017 · 8 comments

Comments

@vencoreguy
Copy link

What version of Flyway are you using?

flyway-trial-5.0.1

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin, SBT plugin, ANT tasks)

Command-line

What database are you using (type & version)?

Oracle 12c

What operating system are you using?

Windows

What did you do?

(Please include the content causing the issue, any relevant configuration settings, and the command you ran)

I have downloaded 5.0.1 trial today to test some of the sqlplus commands that are supposed to work but its still giving error

What did you expect to see?

TEST

What did you see instead?

2017-12-07 15:20:06.262 DEBUG : Executing SQL: SET SERVEROUTPUT ON
2017-12-07 15:20:06.262 DEBUG : Executing SQL: BEGIN
DBMS_OUTPUT.PUT_LINE('TEST');
END;

2017-12-07 15:20:06.293 DEBUG : Rolling back transaction...
2017-12-07 15:20:06.371 DEBUG : Transaction rolled back
2017-12-07 15:20:06.449 ERROR : org.flywaydb.core.internal.exception.FlywaySqlException:
Unable to get server output

SQL State : 99999
Error Code : 17003
Message : Invalid column index

@axelfontaine
Copy link
Contributor

Interesting. What exact version and edition of Oracle are you using? Are you able to manually call dbms_output.get_line without errors with same credentials as Flyway?

@vencoreguy
Copy link
Author

Oracle version: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

Yes I am able to call DBMS Statement without errors, but when add SET SERVEROUTPUT ON its giving error
-- Works without SERVEROUTPUT
BEGIN
DBMS_OUTPUT.PUT_LINE('TEST');
END;
/

-- below doesnt work
SET SERVEROUTPUT ON;
BEGIN
DBMS_OUTPUT.PUT_LINE('TEST');
END;
/

@axelfontaine
Copy link
Contributor

I just can't seem to reproduce this error. Not with 12.2 nor 12.1, with either Enterprise or Standard editions.

Does

SET SERVEROUTPUT ON;
BEGIN
DBMS_OUTPUT.PUT_LINE('TEST');
END;
/

Work in SQL*Plus for you? (With the exact same user and password)

@vencoreguy
Copy link
Author

Yes, it works fine on sql plus. here is what I got

SQL> SET SERVEROUTPUT ON;
SQL> BEGIN
2 DBMS_OUTPUT.PUT_LINE('TEST');
3 END;
4 /
TEST

PL/SQL procedure successfully completed.

@axelfontaine
Copy link
Contributor

This has now been reimplemented using DBMS_OUTPUT.GET_LINES, which is the exact same technique SQL*Plus is using. Please give it a try once 5.0.3 is out.

axelfontaine pushed a commit to flyway/flywaydb.org that referenced this issue Dec 18, 2017
@axelfontaine
Copy link
Contributor

5.0.3 is out now. Please try again with that version.

@vencoreguy
Copy link
Author

Thank you so much, we tried with Maven it worked., trying outside Maven.

Thanks again.,

@vencoreguy
Copy link
Author

Great, IT WORKS NOW, Tested multiple scenarios with this., also tested SELECT statement results and it works great.

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants