-
Notifications
You must be signed in to change notification settings - Fork 47
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 - Export grants and received grants #37
Comments
That would be a useful function. Will you be able to execute the RECEIVED_GRANTS? I assume not? |
Arno, can you provide patch or pull request? |
Not without the appropriate permissions, which you normally don't have in your schema. But the filename has the foreign schemaname as prefix so you see clearly where to execute those received grants. E.g. the file: |
Answering qwazer question: Is this a hard requirement for you? |
Yes. I think it must be optional behavior, because
|
Anyway, I attach the patch here for you to see if it's ok. |
No you don't need special rights. |
I'll try to give an simple explanation of the feature: My schema is SCHEMA_ARNO with a table TABLE_ARNO inside. If SCOTT grants me SELECT to EMP table, I receive a file in the RECEIVED_GRANTS folder which contains the grant that he provided me to this table. At the end I see what I grant to others and what others grant to me, and I can recreate those grants if needed. |
I agree, that it is useful feature. But I want to keep backward compatibility. So replacing old grants in parent DDL with new file it's not a good idea from this point of view.
|
Just for your info. I rarely work with Oracle now. |
Regarding backward compat: Naming: DDLFormatter: And don't worry about the Oracle part of scheme2ddl. I'm having an eye on it because it is my main focus. |
I was do it (export all USER and SYSTEM grants) in my fork here https://github.com/xorader/scheme2ddl/tree/3.x_patches_from_xorader |
I added a functionality that allows us to export all grants into a separate directory. The old behaviour of putting the grants to the parent DDL object is not affected by my change.
Additionally I added a function that exports all grants I receive from other schemes!
So I get every grant that my scheme/application needs and everything i grant to others as well.
I named the new objects/folders "GRANTS" and "RECEIVED_GRANTS".
If someone is interested I could commit my changes, or simply provide a patch file here.
Let me know.
The text was updated successfully, but these errors were encountered: