oracle

Name:
Location: Srinagar, Jammu and Kashmir, India

Saturday, December 24, 2005

Scheduling export of tables or database

Create a bat file like startBkp.bat
  • Contents of startBkp.bat:

  • @echo off
    echo Generated command to run:
    echo.
    exp parfile=c:\myparfile.par userid=%*
    echo.

  • Contents of myparfile.par:
    file c:\myparfile.par
    file=c:\mydumpfile.dmp
    log=C:\mydumpfile.log
    direct=y
    statistics=none
    compress=n
    consistent=n

Run it using:
startBkp.bat scott/tiger@database_name
or
startBkp.bat scott/tiger@database_name tables=t1,t2,t3

The same may be scheduled by windows scheduler:
start menu->Programs->Accessories->System tools

Oracle user creation

Create user <name>identified by <passwd> default tablespace <tablespacename> temporary tablespace <temp>;


grant <sysdba> to <username>;

Altering User

SQL> -- with SQL*Plus
SQL> alter user scott identified by ***;

User altered.
SQL> -- with PL/SQL
SQL> begin
2 execute immediate 'alter user scott identified by tiger';
3 end;
4 /PL/SQL procedure successfully completed.
SQL>


Online Schools