Oracle自动导出脚本(WINDOWS停的,导出文件名自动加上日期和时间)
只适用于Windows客户端,透过exp下令完成数据库导出。
有以次特性:
一 导出的文件名自动加上日期和时间,避免导出资料的纷乱.
二 导出的资料自动经过RAR压缩,与此同时剔除压缩前的资料(急需装配好WINRAR),Oracle的DMP资料压缩比很高的.
三 支持windows的任务计划.
四 将导出的日记和dmp资料共通封装,避免忘掉exp的内容.
条件: 务必window装配好oracle客户端 , 并配备美Net Manager (指定数据库联接符pcchina)
以次是具体的脚本:命名为 oracleBackup.bat
----------------------------------------------------------------------------------------------------------------------------
rem windows环境停Oracle数据库的自动备份脚本。
rem 可以将本批处理设成windows任务计划下自动施行。
@echo off
@echo ================================================
@echo windows环境停Oracle数据库的自动备份脚本
@echo 说明:起步备份时,亟需配备以次变量
@echo 一、BACKUP_DIR 指定要备份到哪个索引
@echo 二、ORACLE_USERNAME 指定备份所用的Oracle用户名
@echo 三、ORACLE_PASSWORD 指定备份所用的Oracle密码
@echo 四、ORACLE_DB 指定备份所用的Oracle联接名
@echo 五、BACK_OPTION 备份选项,可认为空,可认为full=y,可认为owner=a用户,b用户 之类....
@echo 六、RAR_CMD 指定RAR命令行压缩工具所在索引
@echo ================================================
rem 以次变量急需根据实际情况配备------> 注意:此脚本务须放在d:bakcup索引下
set BACKUP_DIR=D:backup
set ORACLE_USERNAME=loan_admin
set ORACLE_PASSWORD=xxxx
set ORACLE_DB=pcchina
set BACK_OPTION=
set RAR_CMD="C:Progra~一WinRARRar.exe"
for /f "tokens=一,二" %%a in ('date/t') do set TODAY=%%a
set BACK_NAME=%ORACLE_DB%_%TODAY%(%time:~零,二%时%time:~三,二%分)_
set BACK_FULL_NAME=%BACKUP_DIR%%BACK_NAME%
rem 开始备份
exp %ORACLE_USERNAME%/%ORACLE_PASSWORD%@%ORACLE_DB% %BACK_OPTION% file="%BACK_FULL_NAME%.dmp" log="%BACK_FULL_NAME%exp.log"
rem 压缩并剔除原有资料
%RAR_CMD% a -df "%BACK_FULL_NAME%back.rar" "%BACK_FULL_NAME%.dmp" "%BACK_FULL_NAME%exp.log
本文来源:
我的异常网
Java Exception
Dotnet Exception
Oracle Exception
720 - Exception in thread
721 - Java异常
722 - Exception in thread 'main' java.lang.NullPointerException
723 - An internal error occurred during
724 - org.hibernate.LazyInitializationException: could not initialize proxy
725 - java.lang.IllegalStateException: getWriter() has already been called for this response
726 - org.hibernate.SessionException: Session is closed!
727 - javax.naming.NameNotFoundException
728 - java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
729 - javax.mail.MessageRemovedException
730 - org.hibernate.LazyInitializationException:could not initialize proxy
731 - 警告: Error setting value
732 - override and commit
733 - Building workspace has encountered a problem. Errors during build
734 - Could not open the editor: An unexpected exception was thrown
735 - Error creating the view.An error occurred while automatically activating bundle org.eclipse.jdt.ui
736 - java.lang.IllegalMonitorStateException
737 - java.lang.UnsupportedClassVersionError: Bad version number in .class file
738 - java.io.EOFException
739 - not allowed to send
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/liangdiwei/archive/2009/12/22/5051844.aspx
-