Get Started

Access to Oracle server from Unix

Change password

Exit from SQL*Plus

Basic must-knows of SQL


Access to Oracle server from Unix

SSH into one of SoC Unix machines such as sf3.comp.nus.edu.sg

Before using Oracle, run the following line in your login shell to set up the Oracle environment:

     source /opt/oracle/bin/oraenv

PS: The directory path is subjective to change and to be announced later.

You may wish to put this line in your shell initialization file instead (for example, .profile).

Now, you can log in to Oracle by typing:

     sqlplus <userID>@<oracle DB instance>

Here, sqlplus is Oracle's generic SQL interface. <userID> refers to your Unix account.

You will be prompted for your password. This password is initially dbpasswd (this initial password is subjective to change and to be announced later). After you enter the correct password, you should receive the prompt

     SQL>


Change password

In the SQL> prompt, type the following command followed by the Enter key.

     ALTER USER <userID> IDENTIFIED BY <newPassword>;

where <userID> is again your Unix login account, and <newPassword> is your new password to be used.  The semi-colon at the end of the command is required.

It is recommended that you immediately change your initial password after the first login.


Exit from SQL*Plus

In the SQL> prompt, type EXIT followed by the Enter key.  And you will be disconnected from Oracle server and logged out from SQL*Plus session. Please note that by default all your changes made to database will be automatically committed upon exit.

If you had made a mistake and want to discard all changes you made since the last commit command, type ROLLBACK followed by Enter key.


Basic must-knows of SQL