Questions tagged [ora-00955]

Name is already used by an existing object Cause: An attempt was made to create a database object (such as a table, view, cluster, index, or synonym) that already exists. A user's database objects must have distinct names.

Name is already used by an existing object

Cause: An attempt was made to create a database object (such as a table, view, cluster, index, or synonym) that already exists. A user's database objects must have distinct names.

Action: Enter a unique name for the database object or modify or drop the existing object so it can be reused.

16 questions
15
votes
1 answer

How to rename a primary key in Oracle such that it can be reused

On Oracle, I create a table like this: CREATE TABLE "Mig1"( "Id" INTEGER NOT NULL , CONSTRAINT "PK_Mig1" PRIMARY KEY ( "Id" ) ) Then, I rename the PK: ALTER TABLE "Mig1" RENAME CONSTRAINT "PK_Mig1" TO "PK_XXX" Then, I rename the…
Dejan
  • 9,150
  • 8
  • 69
  • 117
5
votes
2 answers

name is already used by an existing object

In this code I am trying to delete the tables if they already exist every time I run the program, but the control is not going inside the if statements. table1 and table2 are present in the database. I have checked that in my database. Since its not…
Ava
  • 5,783
  • 27
  • 58
  • 86
5
votes
1 answer

sqlplus duplicating create table. ORA-00955: name is already used by an existing object

I'm trying to create a PL/SQL script that prints a message and then creates a table. If I run the script in SqlPlus, the message is printed, the table is created, but I receive an error message saying the table is in use. It seems the "create table"…
Bolha
  • 253
  • 3
  • 8
2
votes
1 answer

flyway commandline tool - what option to re-execute failed DDL?

I successfully ran v1 migration with a create table DDL. I copied same to v2 file and ran - got the expected validation error message: Migrating to version 1.0.002 com.googlecode.flyway.core.exception.FlywayException: Error executing…
dileeph
  • 71
  • 4
1
vote
2 answers

BEGIN/END and CREATE Table in single .sql file

I have a small SQL script that I'm executing with Oracle's SQL*Plus to emulate create or replace on tables: BEGIN EXECUTE IMMEDIATE 'DROP TABLE symbols'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN END IF; END; / CREATE…
victorhooi
  • 16,775
  • 22
  • 90
  • 113
1
vote
2 answers

Django migrate throws ORA-00955 error when using oracle database

I'm stuck in a weird situation where I have to be using an oracle database along with Django. Before I get started I would like to mention that I run the database from inside a docker container. The problem that I've stumbled upon is that even…
Terchila Marian
  • 2,225
  • 3
  • 25
  • 48
1
vote
0 answers

Flyway "ORA-00955: name is already used by an existing object"

We are trying to use Flyway to manage our database schema updates with the following spring-boot configuration: spring: datasource: driver-class-name: oracle.jdbc.OracleDriver password: ${java_user_password} url:…
abdsahin
  • 63
  • 1
  • 5
1
vote
1 answer

JPA createEntityManager causes Oracle 955 error

I have created a simple JAVA app to learn database connection. I have table USR_BOOKS in Oracle 11g database. Using EclipseLink(JPA 2.0) Persistence libray. Using "Create Entity From Database", I created a class in Java, and created JPA Controller…
yossarian
  • 13
  • 2
0
votes
1 answer

Duplicate error creating synonyms

I am attempting to create synonyms for a user in Oracle. BEGIN FOR S IN (SELECT owner, table_name FROM all_tables WHERE owner = 'TABLE_OWNER') LOOP EXECUTE IMMEDIATE 'create synonym '||S.table_name||' for…
Brian
  • 71
  • 1
  • 2
  • 3
0
votes
2 answers

PL/SQL Function exists?

I am trying to create a function called add_extra. CREATE OR REPLACE FUNCTION add_extra(p_price NUMBER) RETURN NUMBER IS BEGIN RETURN(9000); END add_extra; However, when I run the script, it says: Error starting at line 1 in command: CREATE OR…
whirlwin
  • 16,044
  • 17
  • 67
  • 98
0
votes
1 answer

Problem to make first migrate using Oracle in Django

I am trying to connect Oracle in my Django Project, but with no success. My versions: Python 3.7 x86 Django 2.1.1 Oracle Client 12.2.0.1.0 x86 Oracle Database 12.2.0.1.0 x64 cx-Oracle 7.0.0 settings.py file: DATABASES = { 'default': { 'ENGINE':…
aluiz
  • 63
  • 5
0
votes
1 answer

ORA-00955 during SQL Table creation

I have been getting the error during a table creation. I know it means that the table name needs to change, but I don't see any object with the same name. A copy of the .lst is below. Thanks SQL> CREATE TABLE CUSTOMERtable 2 ( 3 …
OttoMeter
  • 3
  • 2
0
votes
3 answers

ORACLE: can we create global temp tables or any tables in stored proc?

below is the stored proc I wrote: create or replace procedure test005 as begin CREATE GLOBAL TEMPORARY TABLE TEMP_TRAN ( COL1 NUMBER(9), COL2 VARCHAR2(30), COL3 DATE ) ON COMMIT PRESERVE ROWS / INSERT INTO TEMP_TRAN VALUES(1,'D',sysdate);…
niceApp
  • 2,913
  • 8
  • 35
  • 36
-1
votes
1 answer

Name already existing error in SQL Developer

I got some help last night on this code but now I am getting a different error. My professor is STILL not answering me so I am coming to you guys. Here is the code: --Create Volunteer Supervisor CREATE TABLE Volunteer_Supervisor ( PH_Person_ID …
-1
votes
1 answer

Table doesn't exist on db that was created via python

I used the following code to create a table in python. import cx_Oracle as db conn = db.connect('scott/tiger@localhost/orcl') cursor = conn.cursor() cursor.execute("create table films(title varchar(10), year varchar(10), director varchar(10))")…
1
2