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

Trailing Comments In Oracle SQL File Cause Error #63

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 3 comments
Open

Trailing Comments In Oracle SQL File Cause Error #63

GoogleCodeExporter opened this issue Mar 14, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Place the attached file in the up folder.
2. Execute RoundhousE against an Oracle database.
3. Observer error.

What is the expected output? What do you see instead?

Actual output:

Running RoundhousE v0.8.5.0 against roundhouse_bugs - .
Looking in . for scripts to run.
==================================================
Setup, Backup, Create/Restore/Drop
==================================================
==================================================
RoundhousE Structure
==================================================
 Running database type specific tasks.
Creating a sequence for the 'Version' table.
Creating a sequence for the 'ScriptsRun' table.
Creating a sequence for the 'ScriptsRunErrors' table.
 Creating [Version] table if it doesn't exist.
 Creating [ScriptsRun] table if it doesn't exist.
 Creating [ScriptsRunErrors] table if it doesn't exist.
==================================================
Versioning
==================================================
 Attempting to resolve version from C:\Projects\CSharp\experiments\roundhousebugs\_BuildInfo.xml using //buildInfo/version.
 Found version 1.0.0.0 from C:\Projects\CSharp\experiments\roundhousebugs\_BuildInfo.xml.
 Migrating  from version 1.0.0.0 to 1.0.0.0.
 Versioning  database with version 1.0.0.0 based on blah.
==================================================
Migration Scripts
==================================================
--------------------------------------------------
Looking for AlterDatabase scripts in ".\alterDatabase".
--------------------------------------------------
--------------------------------------------------
Looking for Update scripts in ".\bugscripts\trailingcomments". These should be 
one time only scripts.
--------------------------------------------------
 Running TrailingComment.sql on roundhouse_bugs - .
RoundhousE encountered an error.
System.Data.OracleClient.OracleException: ORA-00900: invalid SQL statement

   at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc)
   at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals)
   at System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean needRowid, OciRowidDescriptor& rowidDescriptor)
   at System.Data.OracleClient.OracleCommand.ExecuteNonQuery()
   at roundhouse.databases.AdoNetDatabase.run_command_with(String sql_to_run, ConnectionType connection_type, IList`1 parameters)
   at roundhouse.databases.AdoNetDatabase.run_sql(String sql_to_run, ConnectionType connection_type, IList`1 parameters)
   at roundhouse.databases.oracle.OracleDatabase.run_sql(String sql_to_run, ConnectionType connection_type)
   at roundhouse.migrators.DefaultDatabaseMigrator.run_sql(String sql_to_run, String script_name, Boolean run_this_script_once, Boolean run_this_script_every_time, Int64 version_id, Environment environment, String repository_version, String repository_path, ConnectionType connection_type)
   at roundhouse.runners.RoundhouseMigrationRunner.traverse_files_and_run_sql(String directory, Int64 version_id, MigrationsFolder migration_folder, Environment migrating_environment, String repository_version, ConnectionType connection_type)
   at roundhouse.runners.RoundhouseMigrationRunner.log_and_traverse(MigrationsFolder folder, Int64 version_id, String new_version, ConnectionType connection_type)
   at roundhouse.runners.RoundhouseMigrationRunner.run()
ORA-00900: invalid SQL statement



What version of the product are you using? On what operating system?

RoundhousE 0.8.5.0
Windows 7, 64 bit

Please provide any additional information below.

Tested against Oracle XE 11g 32 bit.

As near as I can figure, RoundhousE sees that there's more text after the 
semicolon and tries to interpret it as a command. Since the "command" is all 
comments, Oracle interprets it as an empty command and blows up.

Original issue reported on code.google.com by [email protected] on 3 Dec 2011 at 6:55

Attachments:

@GoogleCodeExporter
Copy link
Author

Thanks. I am installing oracle now so I can really dive into all of these 
oracle issues. I appreciate you sending me a file to test this.

Original comment by [email protected] on 3 Dec 2011 at 8:14

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

No problem. Thank you for looking into fixing these issues.

Original comment by [email protected] on 3 Dec 2011 at 8:36

@GoogleCodeExporter
Copy link
Author

I think I may have this one fixed, but I will need to verify.

Original comment by [email protected] on 19 Feb 2012 at 3:47

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

No branches or pull requests

1 participant