使用批處理備份oracle資料庫

2021-04-19 07:04:44 字數 965 閱讀 6341

@echo on

set backpath=d:

set filename=%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2%

set username=was

set password=wasuser

set dbname=was

echo 準備備份資料庫

if not exist %backpath% goto nopath

if not exist %backpath%/dmp goto nodmppath

if not exist %backpath%/log goto nologpath

goto startwork

:nopath

echo nopath

pause

mkdir %backpath%

mkdir %backpath%/dmp

mkdir %backpath%/log

goto startwork

:nodmppath

echo nodmppath

pause

mkdir %backpath%/dmp

if not exist %backpath%/log goto nologpath

goto startwork

:nologpath

echo nologpath

pause

mkdir %backpath%/log

goto startwork

:startwork

echo startwork

pause

imp %username%/%password%@%dbname% file=%backpath%/dmp/%filename%.dmp log=%backpath%/log/%filename%.log

exit

批處理備份oracle

echo off title oracle簡易資料備份工具 startbackupdata clsecho.echo oracle簡易資料備份工具 echo.set nowdate date 0,4 date 5,2 date 8,2 if orahost set orahost 192.168.0...

oracle資料庫備份批處理

echo off e cd e 資料庫備份 set username test set password 123456 set strdate date 0,4 date 5,2 date 8,2 set filename username strdate echo on echo 備份開始 dat...

使用批處理備份日誌

客戶要求jboss日誌級別是debug,這個級別的日誌,每天估計得有3g的日誌產生,伺服器的硬碟可吃不消啊,呵呵。就想使用備份的機制,把前一天的日誌打包,然後刪除原檔案。這種文字日誌,一壓縮就很想了,3g壓縮完估計也就200m吧。d systemutil winrar rar a ag k r s ...