Oracle:ora-00955:name is already used by an existing object

Source: Internet
Author: User

In the afternoon, a table structure was exported from the production library to test for some problems, because the production library is connected to a table under other users, so by simulating it locally through the view, the view is created:

Create or Replace view csews as SELECT * from Order_list;

But it appears that Ora-00955:name is already the error of used by an existing object,

On the internet to find out that the database has the same name object, so query

SELECT * from all_objects where object_name= ' csews ';

But no record, very crazy, looking for a long time did not find a solution, and finally in the table structure file search

csews actually searched for such a statement:

Create or replace synonym csews for p3dbo. Csews;

It dawned on me that I had created a synonym.

The synonym is then deleted:

Drop public synonym csews;

Then re-execute:

Create or Replace view csews as SELECT * from Order_list;

The view is built successfully.

But think carefully, select * from all_objects where object_name= ' csews ';

This statement should be able to find out, because I have another user under this view but why did not find out, so there is a csews to capitalize on the next query:

SELECT * from all_objects where object_name= ' csews ';

The results of the query came out, then understand the original to capitalize. If I had known it would not have wasted so much time, but who let me be rookie level, hereby record,

Avoid making similar mistakes again next time!

Note: After Oracle's lexical analysis, it will turn lowercase into uppercase, direct capitalization reduces the time of the compilation process, so capitalization is a good habit!

Oracle:ora-00955:name is already used by an existing object

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.