Click here to Skip to main content
15,884,353 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I Have 2 schema in my database. One of the schema has a package which is using a another schema's table. The Table from another schema, which is frequently drop and create with same name after a time span.

So, when the table has drop at the same moment the package from another schema will be invalid due the table.

Is there any way to provide a grant access will remain as it is after the table drop or any way to recompile automatically that package. Please help me on this.

Thanks in Advance.

What I have tried:

I am still finding a way. I am looking the way which will provide a permanent grant. :(
Posted
Updated 24-Sep-16 23:13pm
Comments
Jörgen Andersson 25-Sep-16 15:23pm    
Why do you drop and create instead of simply truncating the table?

1 solution

When you drop the object the privileges are also removed. This happens always.

On the other other hand dropping and re-creating an object should be a rare, administrative task and not to happen often. Especially if the object is used by other objects, for example packages, this should happen only if the structure of the database changes.

So based on your description, I'd try to find a completely different approach than altering the permanent objects.
 
Share this answer
 
Comments
Bittu14 25-Sep-16 5:25am    
Thanks.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900