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

Enhancement: Support Forward Slash Statement Terminators In Oracle #64

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 5 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 below.

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\slashterminator". These should be 
one time only scripts.
--------------------------------------------------
 Running slashterminator.sql on roundhouse_bugs - .
RoundhousE encountered an error.
System.Data.OracleClient.OracleException: ORA-00922: missing or invalid option

   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-00922: missing or invalid option

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

RoundhousE v0.8.5.0
Windows 7, 64 bit
Oracle XE 11g, 32 bit

Please provide any additional information below.

The attached script works fine when run from another tool, such as SQL*Plus or 
Oracle SQL Developer. It is valid syntax to use a forward slash as a statement 
terminator, and I believe it is customary in some circumstances. (The odd 
syntax required for stored procedures comes to mind, and I've seen an Oracle 
generated DDL use them.) However, they seem to cause the error above in 
RoundhousE.

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

Attachments:

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