Skip to main content

Backup Oracle db and save it into a shared folder [Windows]

1. create window batch file (paste the content below in to text editor and save as

for /f "tokens=1,2" %%u in ('date /t') do set d=%%v
for /f "tokens=1" %%u in ('time /t') do set t=%%u
if "%t:~1,1%"==":" set t=0%t%
rem set timestr=%d:~6,4%%d:~3,2%%d:~0,2%%t:~0,2%%t:~3,2%
set datestr=%d:~6,4%%d:~0,2%%d:~3,2%
set timestr=%t:~0,2%%t:~3,2%

@echo %datestr%-%timestr%
@echo %datestr%
@echo %timestr%
exp db_username/db_password@db_schema file="\\ip_address\shared\oracle\dump_%datestr%_%timestr%.dmp" log="\\ip_address\shared\oracle\log_%datestr%_%timestr%.log"


***replace db_username, db_password, db_schema,ip_address(where you want the dump and log files generated to)
***if you want to generate the dump & log file same location as the .bat file, replace with the line below:
file="filename.dmp" log="logname.log"
2. paste it into db server
3. set a task scheduler at "Control Panel->Administrative Tools and open the Task Scheduler"

Comments

Popular posts from this blog

It's a new experience for me

Okay, i think i'm kind of coward type, whenever there is some special occasion or some important tasks or duty being assigned to me, i will worry first, i know in another word, it's lack of confident.

For this time, I will be traveling to US on this coming September - of course - it's a business trip , and i will need to apply for US Visa and go for a Visa interview.

So, i completed the application on 7th July 2017 and the earliest Visa interview schedule will be on 25th July 2017.

During the Visa interview scheduling, i still don't feel the heat yet, i started to worry 4 days before the actual interview day.

Starts to imagine all the worst cases that might be happened before/during the interview, and even dream of it- a nightmare that i went to US Embassy without all my documents. **no doubt, i have a stack of documents prepared, from the business invitation letter, itinerary, identification card photocopy, blah blah blah.....and a super ugly 2 * 2 inches photo of min…

曾经太年轻

在所有的所有以后。。。发现人心是险恶的。。。
曾经以为简单就只是复杂的反义词。。。
想了又想。。。应该超乎反义词。。。好远好远。。。
选择去或留。。。根本是谎言。。。因为你没有权利选择。。。
真的就只有习惯和慢慢的熟悉看穿。。。

珍惜您的所有。。。

*不要问我为什么,因为我自己也不知道*

就想安安静静的过。。。

回顾2017

对我而言 2017绝对是个充满惊喜 惊吓惊叹的一年 欢送波友Bok - 新的里程碑
好友结婚啦-我是兄弟-真心感谢 让我有机会参与-一起装饰 新娘车 - 在喝了两杯Whiskey之后 


赶上农历新年的聚会 - 也是最后一次和桂蓉的相见 - 所谓珍惜每一次的相见 - 那可能是最后一次 - 这对我来说非常写实 - 愿桂蓉安息 远离一切苦厄
第一年在Sitiawan的新家 过年 - 亲戚一起来热闹 - 左起 我最敬爱的大舅, 大姨,外婆,姨婆,妈妈

可爱的Sara 和醉醺醺的姑姑 (不良示范)

姑丈,表姐的到来

表姐夫每年的农历新年花的心思 让我们有机会尝鲜 Four Loko 我们都醉了

一如往常 争取每一次合照的机会 在外婆搬到大舅家住之后

老了才和弟弟妹妹游Sunway Lagoon
终于买了我挣扎已久的心头好