-
Question on the dependent objects and privileges when a table is renamed.
Hi Guys,
This is a very basic question but I need to get some facts clarified.
I am renaming a table (first I created a table 'ABC_1', Populated that table with an 'insert into...' statement from the original table 'ABC', then I dropped the table 'ABC' and rename table 'ABC_1' to 'ABC'). In this process what happens to the dependent objects? The views, procs and triggers become invalid thus I need to recompile them. The synonyms stay the same. WHat happens to the privileges on the table? Do I need to regrant them? AM I missing anything that needs to be done.
Thanks for your prompt response.
-Chintzs
-
Re: Question on the dependent objects and privileges when a table is renamed.
Originally posted by Chintz
Do I need to regrant them?
Did you grant them to ABC_1 yet?
Jeff Hunter
-
Nope. I have granted no privileges to ABC_1.
-Chintzs
-
Then yes, you need to regrant them.
Jeff Hunter
-
Re: Question on the dependent objects and privileges when a table is renamed.
Originally posted by Chintz
Hi Guys,
This is a very basic question but I need to get some facts clarified.
I am renaming a table (first I created a table 'ABC_1', Populated that table with an 'insert into...' statement from the original table 'ABC', then I dropped the table 'ABC' and rename table 'ABC_1' to 'ABC'). In this process what happens to the dependent objects? The views, procs and triggers become invalid thus I need to recompile them. The synonyms stay the same. WHat happens to the privileges on the table? Do I need to regrant them? AM I missing anything that needs to be done.
Thanks for your prompt response.
-Chintzs
If I remember correctly, triggers get dropped when you drop a table. They don't just go invalid. Well, I guess triggers assigned to other tables that reference table ABC will go invalid. But if you have a trigger on table ABC... it's gone. So you have to recreate it for table ABC_1.
Jodie
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|