Oracle Resource Web Page
CSC instructors can request Oracle accounts for their classes by sending an email to csc_help@ncsu.edu. Include: course, section number. If you want accounts for your TAs please include their name(s)with their unity IDs.
IMPORTANT: Students are responsible for their own database backups. Also, Oracle accounts are permanently deleted at the end of each semester.
How To's
- Logging in to your Oracle class account
- Changing your Oracle password
- How to retrieve assigned Roles and Privileges to your Oracle account
- Granting/Revoking Other Users access to your Objects
- Technical Specifications about the Oracle 12c DBMS
- Accessing Oracle Database from Eclipse IDE (unsupported)
- Additional Oracle Documentation
- Resource Page for DBAs.(unsupported)
- FAQs
Logging in to the Oracle Class Server
To login to your Oracle account using our supported environment:
statements that you need to enter are in bold. When the prompt SQL> is returned, your Oracle login was successful!
- You need an ssh client. We recommend Putty. For Mac users use the Terminal app.
- Launch your ssh client and open a secured connection to the remote host: remote.eos.ncsu.edu.
- login: <enter your Unity ID>
- Password: <enter your Unity password>
- eos% add oracle12
- eos% sqlplus
SQL*Plus: Release 12.2.0.1.0 Production on [date & time stamp]
Copyright (c) 1982, 2016, Oracle. All rights reserved. - Enter username: UnityID@orcl01 (Do not forget to include @orcl01)
- Enter password: <enter your oracle password> (this is NOT your Unity Password - contact your instructor or TA about what is your initial password)
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
|top|
Changing your Oracle Password
Important: We highly recommend users to change their Oracle passwords asap as follows:
Note: (special characters in passwords are allowed except "spaces" or leading/trailing @ symbol.)
SQL>password
Changing password for username
Old password:
New password:
Retype new password:
Password changed
SQL>
|top|
How to retrieve assigned Roles and Privileges to your Oracle account
Retrieve Session Privileges:
- login to your Oracle account
- at the SQL> prompt type:
select * from session_privs;
Retrieve Session Roles:
select * from session_roles;
|top|
Granting/Revoking Other Users access to your Objects
The privileges a user can grant include these( On the user's tables, views, and materialized views):
- INSERT
- UPDATE (all or specific columns)
- DELETE
- SELECT
For example, the user JOE gives MOE SELECT access to the NAMES table:
grant select on NAMES to MOE;
MOE can now view all records on NAMES with:
select * from JOE.NAMES;
To revoke access:
revoke select on NAMES from MOE;
|top|
Some technical Specifications about the Oracle Database Server
- ORACLE HOME PATH: /afs/eos/software/oracle12/oracle/product/12.2/client
- Hostname: ora.csc.ncsu.edu
- DB Name: ORCL01
- SID: ORCL01
- SERVICE NAME: orcl01.ora.csc.ncsu.edu
Accessing Oracle Database from Eclipse IDE (not longer supported - use info at is)
Requirements and Installations -
- Download Eclipse from Eclipse Downloads
- Installing the Eclipse Database Developement Plugin
- For Europa:
- Start eclipse
- At the top select Help->Software Updates->find and Install
- Expand "europa discover Site" and if "Database Developement" is there then select the box beside it, otherwise the plugin is already installed
- then click "Select Required" on the right side
- then click "next" and accept the terms then click "next" again
- finaly select "next" and then "Finish"
- when it asks you to install click "Install All" and when this is finished click "yes"
- For Ganymede:
- Start eclipse
- At the top select Help->Software Updates
- Select the "Availabe Software" tab
- Expand the "Ganymede Update Site"
- If the "Database Developement" is there select the box beside it and click "Install", otherwise the plugin is already installed
- then click "finish and when that is finished click "Yes"
- Install the Oracle Database Plug-in
Go to Oracle Instructions and follow whatever directions you prefer, keeping in mind that the update manager is the easiest way. - RESTART eclipse for these changes to take effect
Using the Tool -
- Configuring Oracle Database
- First to open Database perspective, select windows menu select open perspective and select Data Developement perspective. This opens the Data source explorer (DSE) view.
- Right click on the Databases node in the DSE and select the New option. In the new connection profile wizard select Oracle Database Connection and select next
- Select Oracle Database 10g driver default from the drop down list of drivers
- Replace localhost with the Hostname of the Database server(ora.csc.ncsu.edu)
- Replace xe with SID of the database service (i.e., with orcl)
- Username – Name used to login to the oracle user account
- Password – Oracle user account’s password
- Selecting test connection has to result in a Ping successful message
- Select Finish to complete the wizard
- Accessing Database workspace
To connect to the database right click on the database name and select the Connect option.
After the user has connected to the database, the User Schema is displayed on the Data Source Explorer along with all the tables, procedures, views, etc that are created by the user.
To perform various Database operations right Click on the required folder name and selection the operation that needs to be done.
To disconnect from the database right click and select Disconnect from database option
|top|
Additional Documentation
- Oracle 12c Release 2 Documentation Library
- Oracle12c JDBC Developer's Guide and Reference:
- technet.oracle.com
- www.orafaq.com
- metalink.oracle.com (can be setup to email you security updates)
|top|
FAQs
1) I inserted a new record into a table with the "insert" sql command, but the table doesn't show that record.
Issue the sql command: commit; after your insert statement.
2) How to change my Oracle password?
SQL>password
3) How to move to Another User with Connect
SQL>connect oracle_acct@orcl/password
This is the most secured way of doing it. Suppressing the password, the system will prompt you to enter a password.
4) How do I display my user tablespace disk quota?
SQL> SELECT * FROM USER_TS_QUOTAS;
5) How do I connect to the Oracle server from a third party client or development tool?
You will need the Oracle client installed on your PC. The client can be downloaded from Oracle's Web site. Currently our Oracle server is running under version 12c Release 12 so make sure you download a client that is compatible with it. Add an entry to your tnsnames.ora file (this file should be on your hard drive under: \oracle\ora12\network\admin) as follows:
ORCL01 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora.csc.ncsu.edu)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl01.ora.csc.ncsu.edu)
)
)
Refer to your third-party client or programming tool documentation for further connectivity instructions.
|top|