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 synonym creation is failing #243

Open
greenmonster1 opened this issue Jul 10, 2019 · 6 comments
Open

Oracle synonym creation is failing #243

greenmonster1 opened this issue Jul 10, 2019 · 6 comments

Comments

@greenmonster1
Copy link

Hello -

We are running a deploy to create new synonym with grants, the synonym gets created but grants are failing with below error, could you please review it and suggest options?

grant all privileges on cosmos_apps.fp_rel_lift_restrictions to cosmos_user

2019-07-10T20:15:49.4510137Z ]]]
2019-07-10T20:15:49.4510392Z at com.gs.obevo.db.impl.core.changetypes.DbSimpleArtifactDeployer.deployArtifact(DbSimpleArtifactDeployer.java:57)
2019-07-10T20:15:49.4510657Z at com.gs.obevo.db.impl.core.changetypes.AbstractDbChangeTypeBehavior$1.value(AbstractDbChangeTypeBehavior.java:66)
2019-07-10T20:15:49.4511096Z at com.gs.obevo.db.impl.core.changetypes.AbstractDbChangeTypeBehavior$1.value(AbstractDbChangeTypeBehavior.java:63)
2019-07-10T20:15:49.4511700Z at com.gs.obevo.db.impl.platforms.AbstractSqlExecutor.executeWithinContext(AbstractSqlExecutor.java:62)
2019-07-10T20:15:49.4511930Z at com.gs.obevo.db.impl.core.changetypes.AbstractDbChangeTypeBehavior.deploy(AbstractDbChangeTypeBehavior.java:63)
2019-07-10T20:15:49.4512390Z at com.gs.obevo.db.impl.core.changetypes.RerunnableDbChangeTypeBehavior.deploy(RerunnableDbChangeTypeBehavior.java:60)
2019-07-10T20:15:49.4512644Z at com.gs.obevo.impl.ChangeTypeBehaviorRegistry.deploy(ChangeTypeBehaviorRegistry.java:66)
2019-07-10T20:15:49.4512872Z at com.gs.obevo.impl.command.DeployChangeCommand.execute(DeployChangeCommand.java:35)
2019-07-10T20:15:49.4513118Z at com.gs.obevo.impl.ExecuteDeployStrategy.deploy(ExecuteDeployStrategy.java:36)
2019-07-10T20:15:49.4513369Z at com.gs.obevo.impl.MainDeployer.doExecute(MainDeployer.kt:451)
2019-07-10T20:15:49.4513597Z at com.gs.obevo.impl.MainDeployer.executeInternal(MainDeployer.kt:298)
2019-07-10T20:15:49.4514223Z at com.gs.obevo.impl.MainDeployer.execute(MainDeployer.kt:93)
2019-07-10T20:15:49.4514466Z at com.gs.obevo.impl.context.AbstractDeployerAppContext.deploy(AbstractDeployerAppContext.java:139)
2019-07-10T20:15:49.4514690Z at com.gs.obevo.db.cmdline.DbDeployerMain.start(DbDeployerMain.java:79)
2019-07-10T20:15:49.4514923Z at com.gs.obevo.cmdline.AbstractMain.start(AbstractMain.java:129)
2019-07-10T20:15:49.4515132Z at com.gs.obevo.dist.Main$5.value(Main.java:185)
2019-07-10T20:15:49.4515342Z at com.gs.obevo.dist.Main$5.value(Main.java:182)
2019-07-10T20:15:49.4515577Z at com.gs.obevo.dist.Main.execute(Main.java:119)
2019-07-10T20:15:49.4515778Z at com.gs.obevo.dist.Main.execute(Main.java:87)
2019-07-10T20:15:49.4515991Z at com.gs.obevo.dist.Main.main(Main.java:69)
2019-07-10T20:15:49.4517074Z Caused by: java.sql.SQLSyntaxErrorException: ORA-00980: synonym translation is no longer valid

@shantstepanian
Copy link
Contributor

I will take a look this weekend

@greenmonster1
Copy link
Author

We did another test today and the issue seems to be not with the grants just that create synonym gets executed before the view is created which is causing the problem. Could we change the order of execution that synonym creation can happen after tables and views are complete?

@greenmonster1 greenmonster1 changed the title Oracle grants to synonym failing Oracle synonym creation is failing Jul 12, 2019
@shantstepanian
Copy link
Contributor

You can use the includeDependencies attribute to specify the order of deployment when needed. See this section in the doc:
https://goldmansachs.github.io/obevo/db-project-structure.html#DB_Object_Deployment_Order

But ideally, the deploy order should have been picked up. Can you please send over your view and synonym definitions? (I'd assume that the synonym def is referring to the view def?)

@greenmonster1
Copy link
Author

Please find the view definition and the synonym creation scripts as well.

FP_REL_LIFT_RESTRICTIONS.txt

FP_REL_LIFT_RESTRICTIONS#.txt

@shantstepanian
Copy link
Contributor

The symbol in the name is likely causing the issue. I will look for the fix later this week

@shantstepanian
Copy link
Contributor

You can try out the fix from the snapshot version mentioned in #245

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

2 participants