5

I am trying to run the SQL queries coded on my friend's laptop onto mine. I have imported the .sql file into SQL developer and I'm trying to run it.However, I keep getting the error:

01435. 00000 -  "user does not exist"

I have listed all the users:

select * from all_users;

and I get:

OUTLN                                   9 30-MAR-10 
SYSTEM                                  5 30-MAR-10 
SYS                                     0 30-MAR-10 

among other users. My SQL query is :

  CREATE OR REPLACE TYPE "HOMEWORK1"."INNERTABLE" IS TABLE OF VARCHAR2(128);

I am using Oracle 11g on Win8. Please tell me if I need to post anything else to help you. Thanks a lot

1
  • 7
    so does the user HOMEWORK1 exist? if not, you have to create it.
    – DazzaL
    Mar 27, 2013 at 14:58

1 Answer 1

3

DazzaL has highlighted the nub of the problem but to give a bit more background, on the assumption you're fairly new to Oracle...

The create table syntax shows that your command is trying to create a table called INNERTABLE in the schema HOMEWORK1. Schema and user are essentially interchangeable in Oracle, so the error saying 'user does not exist' is referring to the HOMEWORK1 schema/user. Unless you've already created that in your database, that won't exist by default.

You can either (a) create the HOMEWORK1 user, (b) update the script to replace HOMEWORK1 with a (non-built-in; see below) user that does exist, or (c) update the script to remove the schema reference which will cause objects to be created as the user you're logged in as.

But who you are logged in as is something to check - it isn't clear from the question, so apologies if you know this and it isn't relevant to you. It's important not to create your own objects under Oracle's built-in schemas, especially SYS and SYSTEM as you could do a lot of damage, and you should not be logged in to a built-in schema routinely - only for specific activities that can't be done otherwise (like shutdown). The only exceptions to that are maybe the sample HR and SCOTT schemas, and even then it'll be better in the long term to use your own account for anything except queries against those.

If this is a fresh install and you're logging in as SYS because that's all you had available, please create a new user, assign it the relevant privileges, and do all further work under that.

1
  • Thank you! I am a beginner and I created a new user HOMEWORK1 and it works! Thanks!
    – P Ramesh
    Mar 28, 2013 at 1:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.