At IU, how do I use the sample account on the UITS Oracle database Oed1?
At Indiana University, the UITS Oracle database
Oed1 has one sample user account, HR. This account is set
up so it cannot be modified, but can be accessed for reading or
copying. The password for the HR account is
hr.
Viewing the contents of the sample account
To see a list of tables in the HR account, log into the
sample account HR (enter username and password
hr ) using the SQL*Plus or SQL*Plus Worksheet Oracle
Client tools. To do this, see How do I connect to the UITS Oracle database Oed1 from the IUB STCs? and On Quarry, how do I access the UITS Oracle database Oed1 with SQL*Plus? Once you have logged in, enter:
To see a list of column definitions in a particular table, enter the following at the SQL*Plus prompt:
describe tablename;Replace tablename with the name of the table.
Copying tables from a sample account to your own account
If you have your own account on Oed1, you can practice SQL commands by copying tables from the sample account to your own account. To do so:
- Determine the names of the tables in the
HRaccount that you would like to copy by using the above procedure for listing theHRtables.
- Query the contents of those tables from your own account by
specifying the schema (account) name in the
SELECTstatement as in the following example: select * from hr.tablename;Substitute the name of the table for
tablename. - Create a copy in your own account from the SQL*Plus prompt, as
in the following example:
create table tablename as select * from hr.tablename;
Substitute the name of the table for
tablename. - Verify that the table is now in your account by querying the catalog with the following command: select * from cat;
- Verify that the table data copied over by querying the table with
the following command:
select * from tablename;
Substitute the name of the table for
tablename.
Last modified on May 13, 2009.






