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 !
1 Answer
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.
USEis not a valid Oracle SQL command. You just need to connect to the database.