After successfully installing ORACLE 11gR1 on Windows7 32bit platform, I can go inside the SQL PLUS and I can also create database, but I still don't have any clue how to use database.
in MySQL the command to use database should be:
USE MYDATBASENAME;
In SQL SERVER also quite the same:
USE [DATABASE];
But I have no idea how to use database in ORACLE 11gR1 via SQLPLUS, any body have any ideas?
I'm planning to create a table after I succeed in using the USE
command.
To set up and use a database switching service: Configure DataSources that connect to your live and staging databases. Configure a SwitchingDataSource component, as described in Configuring a SwitchingDataSource. Configure the Repository components that use the DataSources to point to the SwitchingDataSource .
In terms of architecture, Oracle has table->schema->database, and at the same time also table->tablespace->database. MySQL has simply table->database.
Even though they all use the same noun the term "database" is something completely different between MySQL (SQL Server) and Oracle.
Usually a MySQL database is mapped to a schema/user in Oracle. In Oracle there is a 1:1 relationship between schemas and users.
A "database" in Oracle refers to the complete installation (which is also named "instance"). As there is typically only a single instance/installation there is no sense in "switching a database" in Oracle.
The closest thing to "USE mydatabase" in Oracle would be to switch the current schema:
ALTER SESSION SET current_schema = other_user;
Then you can access all tables of other_user
without prefixing them. This of course requires your current user to have at least select privileges on the tables of the other user (i.e schema)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With