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

@vencoreguy vencoreguy commented Dec 7, 2017

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

@axelfontaine axelfontaine commented Dec 8, 2017

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

@vencoreguy vencoreguy commented Dec 8, 2017

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

@axelfontaine axelfontaine commented Dec 11, 2017

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

@vencoreguy vencoreguy commented Dec 13, 2017

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

@axelfontaine axelfontaine commented Dec 18, 2017

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 added a commit to flyway/flywaydb.org that referenced this issue Dec 18, 2017
@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Dec 20, 2017

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

@vencoreguy
Copy link
Author

@vencoreguy vencoreguy commented Dec 21, 2017

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

Thanks again.,

@vencoreguy
Copy link
Author

@vencoreguy vencoreguy commented Dec 23, 2017

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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.