0

I created a new database in oracle 11g using DBCA . I checked the listener in cmd -> lsnrctl and its running . with this command:
select instance_name, status from v$instance; I get my database name and it's status is OPEN
is there anything missing ? anything else I should check?
because when I put in use databasename; I get an error Unknown command use databasename !

3
  • USE is not a valid Oracle SQL command. You just need to connect to the database. Commented Dec 5, 2011 at 18:08
  • @a_horse_with_no_name thank you but what about show tables? I created a table and it was created successfully , desc tablename also works and descripes it but show tables fails? where can I get a list of valid Oracle SQL commands? Commented Dec 5, 2011 at 18:24
  • "where can I get a list of valid Oracle SQL commands?": from the manual: docs.oracle.com/cd/E11882_01/server.112/e26088/toc.htm for SQL and: docs.oracle.com/cd/E11882_01/server.112/e16604/toc.htm for SQL*Plus Commented Dec 5, 2011 at 18:53

1 Answer 1

1

As others have pointed out, USE is a SQL Server command. in Oracle, you can do one of the following, based on your scenario.

If you are working in an interactive mode (in unix.. for example), you can issue

sqlplus schema_name/password@database_name

to connect to the database and then issue your queries.

Please note that Databases in SQL server are equivalent to Schemas in Oracle. In oracle, you'll have one database and multiple schemas to logically differentiate different subject areas.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.