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

[ORACLE] Error in CREATE VIEW DDL in synonym.sql, includes full name of view/table with schema same as in source #673

Closed
priyanshi-yb opened this issue Dec 12, 2022 · 2 comments
Assignees

Comments

@priyanshi-yb
Copy link
Contributor

priyanshi-yb commented Dec 12, 2022

While exporting SYNONYMs from Oracle, it exports the CREATE OR REPLACE VIEW DDLs with full name of view with schema_name included and that schema will be same as the schema in which the synonym is present in Oracle sourceDB, but the schema with that name is not present in target and hence import schema fails with error of does not exist.

Example-

CREATE OR REPLACE VIEW sakila_demo.offices AS SELECT * FROM sakila_demo.locations;

Error in import schema -

ERROR: relation "sakila_demo.locations" does not exist (SQLSTATE 42P01)

as locations table is imported in public schema.

@github-actions github-actions bot added the triage Needs to be triaged label Dec 12, 2022
@priyanshi-yb priyanshi-yb removed the triage Needs to be triaged label Dec 12, 2022
@priyanshi-yb priyanshi-yb self-assigned this Dec 12, 2022
@priyanshi-yb
Copy link
Contributor Author

priyanshi-yb commented Dec 15, 2022

There are these two options for the solution-

  • Adding this case in analyze-schema and leaving it on user to do the needful manually like removing the schema name from the DDL or create the schema/required objects in the respective schema in the target.
  • Voyager explicitly remove the schema name from the DDLs at the end of export-schema phase.

@priyanshi-yb
Copy link
Contributor Author

fixed using option-2 in this PR #701

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