Friday, April 26, 2013


TO  CONNECT USING SHELL SCRIPTING FROM ROOT USER (CRON TAB)


PATH=$PATH:$HOME/bin

export PATH

ORACLE_SID=orcl
ORACLE_BASE=/oracle/product/10.2.0
ORACLE_HOME=$ORACLE_BASE/db_1
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID ORACLE_BASE ORACLE_HOME PATH

sqlplus -s hr/hr@orcl  @ /home/oracle/Desktop/a.sql

CONFIGURE SQLDEVELOPER TOOL

ON LINUX ENVIRONMENT

FIRST STEP DOWNLOAD

http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html

SECOND STEP DOWNLOAD JAVA

 http://www.oracle.com/technetwork/java/javase/downloads/index.html



SET PATH IN  SQLDEVELOPER.CONF
 SetJavaHome /usr/java/jdk1.7.0_21/

ENJOY

Sunday, April 21, 2013

CONNECT ORACLE DB USING SHELL SCRIPT


CAN COPY THIS PATH FROM .BASH_PROFILE IN ORACLE HOME




PATH=$PATH:$HOME/bin

export PATH

ORACLE_SID=orcl
ORACLE_BASE=/oracle/product/10.2.0
ORACLE_HOME=$ORACLE_BASE/db_1
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID ORACLE_BASE ORACLE_HOME PATH

sqlplus -s hr/hr@orcl  @ /home/oracle/Desktop/a.sql



/////////////////////////////////////////////////////////////////////////////////////////////////////////
a.sql contain query to execute on database;
ex - create table test values(id number,name varchar2(30));

Thursday, April 18, 2013

STEP FOR ORACLE DATABASE IN ARCHIVE LOG MODE

SQL> startup mount
ORACLE instance started.

Total System Global Area  608174080 bytes
Fixed Size                  1220844 bytes
Variable Size             167776020 bytes
Database Buffers          436207616 bytes
Redo Buffers                2969600 bytes
Database mounted.
SQL>
SQL>
SQL> alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

SQL>
SQL> select log_mode from v$database;

LOG_MODE
------------
ARCHIVELOG

SQL>



ARCHIVE LOG MULTIPLEXING
IN ORACLE 10g PROVIDE 10 DIFFERENT DESTINATION TO KEEP YOUR ARCHIVE LOG 

SQL>alter system set log_archive_dest_1='LOCATION=/oracle/archive';

for remove location
SQL>alter system set log_archive_dest_1='';

SQL>alter system archive log current;

v$archived_log



 

///DISABLE ARCHIVE LOG MODE

SQL> connect sys/chaya as sysdba
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter database noarchivelog;

SQL> alter database open;