Showing posts with label Oracle 10g: SQL*PLUS. Show all posts
Showing posts with label Oracle 10g: SQL*PLUS. Show all posts

Tuesday, August 4, 2009

Oracle 10g: New Instance.

After creating a new instance into our machine. Below basic items must be done before data can be stored.

1. Create Tablespace



  • create tablespace [tablespacename] datafile [path] size [size];

2. Create User


  • create user [username]
    identified by [password]
    default tablespace [tablespace]
    temporary tablespace temp;


3. Granting Rights



  • grant create session to [user];

  • grant create table to [user];

  • grant create view to [user];

  • grant create sequence to [user];

  • grant create procedure to [user];



4. Grant All Privileges..[make sure to connect as the sysdba of the instance]:

  • conn system/system as sysdba;
  • grant all privileges to sa;

Monday, August 3, 2009

Oracle 10g: Database Connection via SQL*PLUS

1. Open a command prompt.
2. To open SQL*PLUS console..do this..:
  • set oracle_sid=[instance/database]
  • sqlplus /nolog

3. Then...[I just created my table ..therefore I am logging in as sysdba]:
  • conn [username]/[password] as sysdba
4. There you go..You are connected!