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"


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…

Skytrex Adventure-"Extreme Challenge"

Someone said that i will for sure upload the photo and show off with my strength... As i was incredibly,unexpectedly, unbelievably finished the 24 challenges of skytrex adventure... Uhoo... I so called that challenge as "One day Tarzan" challenges... As every challenges are on the platform at trees... The highest is 22 meters... I have conquered it... 12th the day... around 1pm...SZ,SW and TJ reached in my place... We take about 1 hour to reach the location... The sky was greyness...Finally, it was raining... As we reached in the destination...the rain stopped... We take the so called bus to reach at the Skytrex in the TPM... We went to the pondok to register ourselves...and signed a paper... i don't really read the something about any accident happen, it's on your own risk...and we required to fill in the people to contact if accident happen... We rent a locker to keep our stuffs (RM 5), bought a pair of gloves (RM3 per pair)... right after that we equipped w…