Search This Blog

Sunday, December 3, 2006

Logical_bkp_EXPORT_linux

Oracle Version : 10.1.3.0.0
OS System : Linux Ver 3
-----------------------------

Export_bkp_scheduling on linux server.
-------------------------------------
shell script for backup.
-----------------------

oracle@oracle]$vi expbkp.sh
#press i or a ( for insert mode)

#!/bin/bash
ORACLE_HOME= /db/app/oracle/orahome #put_oracle_home_path
export ORACLE_HOME
export PATH=$ORACLE_HOME/bin:$PATH

#for system date with dmp file.
value= ` date '%d%m%y'`
exp userid/pwd file=file_name$value.dmp log=log_name$value.log

#type shift + zz for file closing.
shift+ZZ
-----------------------------------------
oracle@oracle]$cat expbkp.sh # check expbkp.sh file contents.
--------------------------------------------------------
Schedule ur backup according ur time Eg> every night 10 pm. for scheduling use "CRONTAB" utility.

-------------------------------------
oracle@oracle]$crontab -e #for create new crontab file.
#press i or a for insert mode
0 20 * * * /db/app/expbkp.sh #give compete path of ur .sh ( bkp script file).

------------------------------------------
oracle@oracle]$crontab -l ( for check crontab file)
oracle@oracle]$crontab -r ( for delete crontab file entry )
----------------------------------------------------------

3 comments:

AJ said...

[oracle@localhost ~]$ cat shutdown.sql
SQL> PROMPT startup force;
startup force
SQL> PROMPT shutdown normal;
shutdown normal

SQL>PROMPT exit;
exit
[oracle@localhost ~]$



Hello Dear can you clarify SQL> PROMPT in there. why this has to be there.

M.S.Taj said...

Hi,
Prompt command
According to Doc.
[pre]
Changes the Windows command prompt.


PROMPT [text]


text Specifies a new command prompt.
[/pre]

Here i want to execute "shutdown" command later that is why we used PROMPT command.

Regards
Taj

Anonymous said...

hi there,
i'm newbie in oracle and unix. currently, i'm trying to dump my oracle data through terminal. first thing i do is login to my server as administrator, and then check wether the command "exp" in exist. after make sure that it exist (by command : man exp), then i run below command:

administrator@kompi:$ exp username/password file=ora1.dmp log=ora1.log

then the result would be like :
-bash: exp: command not found.

what do you think i did wrong? should i log in using my oracle username instead of my administrator username?
pls advice.

Thanks.
Deen.