Accessing Your Oracle9i Accounts


This is an instruction about how to access your oracle account under the command-line interface. In the following instruction, statements in black are the commands you should enter.

 

Step 1: Connect to the university server

        To access your Oracle9i account and perform inquires on the database, you must "ssh" into ssh.ncsu.edu.    

        So if you wanna connect the database from home, you should have a ssh client. For more information about 

        ssh please check here.

           ssh ssh.ncsu.edu

           login: <enter your unity ID>

           password: <enter your unity password>

Step 2: Log into the Oracle9i database

          Now you successfully "ssh" into the university server. Then in the command window, type such commands after the prompt.

           unity% add oracle

           unity% sqlplus

          Then enter your oracle account name as "XXX@orcl.world", here "XXX" is your unity ID.  And then enter your unity password as the 

          password to the database.

          If you successfully access into your oracle account, such information will be printed out:

            Connected to:
            Oracle9i Enterprise Edition Release 9.0.1.0.0 - Production
            With the Partitioning option
            JServer Release 9.0.1.0.0 - Production

 

            SQL>

     Now you could change your password using the following sql statement:

            SQL> ALTER USER your_oracle_account_name IDENTIFIED BY newpassword;

 

After the prompt 'SQL>', you could input SQL*Plus inquiries to perform your own operations on the database. For example,  the following is an statement to create a table named "student" :

 

   SQL> create table student 

     ( Name VARCHAR(30) NOT NULL,
       UnityID VARCHAR(8) NOT NULL,
      Addr VARCHAR(20),
      Status VARCHAR(10));

And then you can insert tuples into this table using statements like:

   SQL> insert into student values ('myName', 'myID', 'myAddress', 'myStatus');       

Also you could use the following statement to check the structure of 'student':

  SQL> describe student;

 

For more information about sql*plus statements, click here; for more information about the university Oracle database, click here.

    

          

                  Go Back To TA Information Page 


 

 Course Webpage | JSP | Servlet | Apache Ant | Apache Jakarta Tomcat | FAQ | Contact Us