Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is a Synonym Valid after "Altering" a table 2

Status
Not open for further replies.

sa0309

Programmer
Apr 5, 2010
45
US
I'm running Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production.

I want to ALTER a table ( add a column ). Will this cause the synonym to become invalid?

Thank you.
 
SA,

As our Tek-Tips colleagues can attest, the motto I live by is "One test is worth 100 expert opinions." This is why I usually post responses here that are real, live tests for a question.

Here is my test for your scenario:

Code:
12:57:57 SQL> create synonym y for summit.x;

Synonym created.

(re-connect as user SUMMIT)

12:59:43 SQL> alter table x add (new_col number);

Table altered.

(re-connect as synonym-owning user)

select object_name,object_type,status from user_objects where object_name = 'Y';

OBJECT_NAME     OBJECT_TYPE         STATUS
--------------- ------------------- -------
Y               SYNONYM             VALID

1 row selected.



[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
“People may forget what you say, but they will never forget how you made them feel.
 
As usual, Santa Dave has provided the very best guidance. *testing* It's been awhile since I've given a star to Mufasa, so have one, please.

====================================
The reasonable man adapts himself to the world. The unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. - George Bernard Shaw


 
Agree with u Johnherman.

Question answered.

Thank you!
 
As they say in England, "Ta, Mates!"

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
“People may forget what you say, but they will never forget how you made them feel.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top