Oracle Tech Tips / FAQ

Pradeep Padala

ppadala@cise.ufl.edu

v0.1, 2002-09-13

Revision History
Revision 0.1 2002-09-13 Revised by: ppadala
Conversion from html to docbook

Table of Contents
1. General
1.1. sqlplus spews out errors after I give password
1.2. How do I list the tables I created?
1.3. I am not able to access oracle through perl+dbi
1.4. How do I change my password?
1.5. My project doesn't require oracle. Can I still use database and create table?
1.6. Why Can't I access Oracle documentation from my home?
2. Permissions
2.1. How do I give permissions on tables to my peers
3. Advanced
3.1. How do I access oracle from C or C++ programs?
3.2. How do I access oracle from Java programs?
3.3. I use bourne or it's derivative shells as my default shell. Do you have an ora.bashrc?

1. General

1.1. sqlplus spews out errors after I give password

  • If it is some thing like this after you give password

        rain:23% sqlplus username@cen3031
        sqlplus: Command not found.
    

    You have to execute the following command before starting sqlplus.

        source /usr/local/etc/ora.csh
    
  • If it is some thing like this after you give password

    rain:28% sqlplus ppadala@cen3031
    
    SQL*Plus: Release 8.1.6.0.0 - Production on Fri Sep 13 11:02:20 2002
    
    (c) Copyright 1999 Oracle Corporation.  All rights reserved.
    
    Enter password:
    ERROR:
    ORA-01017: invalid username/password; logon denied
    
    Enter user-name:
    

    Then you mistyped the password. Type username and password again correctly.


1.2. How do I list the tables I created?

The following command lists the tables owned by the user

    select table_name from user_tables

Output from above command may look like

    TABLE_NAME
    ------------------------------
    DEMO
    ORACLEHW

1.3. I am not able to access oracle through perl+dbi

Make sure that you set the ORACLE_HOME variable and calling DBI properly. You should have the following lines in your code, before accessing the database

# Set the ORACLE_HOME for DBI to find the oracle libraries etc...
$ENV{ORACLE_HOME} = '/usr/local/libexec/oracle-client/product/8.1.6';

# Let's connect to database
$dbh  = DBI->connect('DBI:Oracle:cen3031', 'username', 'password');

Substitue your username and password in the above statement for proper results.


1.4. How do I change my password?

Go to the Registration Page and use your old password to change the password.

A mail will be sent to your indicating that your password is changed. Then you can use the new password.


1.5. My project doesn't require oracle. Can I still use database and create table?

If you want to use it as a learning process, we welcome it. Register for the oracle account.

If you want access to other teams tables, ask the team to grant permission. It's left to the creator team's discretion whether to grant permission or not.


1.6. Why Can't I access Oracle documentation from my home?

Oracle documentation is available from CISE only. Please use a machine in CISE domain.


2. Permissions

2.1. How do I give permissions on tables to my peers

Permissions can be granted using the 'grant' sql command. A typical grant command looks like

    grant update on oraclehw to rmc

This command will give 'update' privileges on 'oraclehw' table to user 'rmc'

If you want to give all permissions use

    grant all on oraclehw to rmc

For more information see Grant Object Privileges section in Oracle8i SQL reference


3. Advanced

3.1. How do I access oracle from C or C++ programs?

You can use the Oracle Call Interface to create C or C++ applications accessing the database. Details here.


3.3. I use bourne or it's derivative shells as my default shell. Do you have an ora.bashrc?

Use /usr/local/etc/ora.sh

You can add the following line to your .bashrc or .profile to have it executed at login

    .   /usr/local/etc/ora.sh