Navigation: CSC Department Menu

Oracle DBA Commands

This web page is intended for those Oracle users who have been assigned DBA role. Please select one of the tasks from the list below. If you would like to see more howtos, please email me at webmaster@csc.ncsu.edu

  1. Logging in to the Oracle Class Server,
  2. resetting a user's Oracle password,
  3. creating a single user Oracle account.
  4. checking if an oracle account already exists

Logging in to the Oracle Class Server

The statements that you need to enter are in bold. When the prompt “SQL>” is returned, your Oracle9i login was successful! Note, you must "ssh" into ssh.ncsu.edu. If you are trying to access your Oracle Account from home, you must have an ssh client to connect to ssh.ncsu.edu. For more information about ssh please check here.

ssh remote-linux.eos.ncsu.edu

login: <enter your Unity login> (Do not enter any trailing suffix/modifier)

Password: <enter your Unity password>

unity% add oracle10g

unity% sqlplus


SQL*Plus: 10.1.0.3.0 - Production on Thu Oct 11 15:35:26 2007

Copyright (c) 1982, 2004, Oracle. All rights reserved.

Enter user-name: Your Unity login@orcl.world
Enter password: <enter your oracle password>
Connected to:
Oracle Database 10g Release 10.1.0.4.0 - Production

SQL>

|top|


Resetting a user's Oracle password

  1. login to your Oracle account as explained above
  2. at the SQL> prompt type:
  3. alter user User_Unity_Login identified by newpassword;

|top|


 

Creating a single user Oracle account

  1. login to your Oracle account as explained above
  2. open your favorite text editor (e.g. vi or pico) and enter the following commands (1 command per line):
    • CREATE USER User_Unity_login
    • IDENTIFIED BY "user_password" (use the student ID for user_password - the one that starts with 000. If you dont have one, pick another unique and strong password)
    • DEFAULT TABLESPACE "USERS"
    • TEMPORARY TABLESPACE "TEMP"
    • QUOTA 5000 K ON USERS
    • ACCOUNT UNLOCK;
    • GRANT "CSCDB" TO User_Unity_login;
  3. Save your text file as account.sql I recommend you save this file in your unity/eos space under the same directory where you invoke the sqlplus command.
  4. exit your text editor
  5. login to your Oracle account as explained here.
  6. at the SQL> prompt type:

    @account [press enter]
    The output should read account created otherwise something went wrong.

|top|


Checking if an oracle account already exists

  1. login to your Oracle account as explained above
  2. at the SQL> prompt type:

    select username from dba_users/all_users where username='UNITY_ID';
    (important: UNITY_ID must be in upper case NO blank spaces between the equal sing and the single quote);

    If account already exists the output will be USERNAME and UNITY_ID under it. Otherwise, the output will be "no rows selected".

Return to Oracle Resource Web Page