Home Database Mysql Tutorial Windows下的Oracle导出脚本

Windows下的Oracle导出脚本

Jun 07, 2016 pm 02:53 PM
oracle windows Export Script

REM File name Daily.bat REM Batch Process Reload DB Backup REM REM Author Frank.Fan REM Modification History Created 2012-05-07 REM Modified REM for /F tokens=1-3 delims=/ %%i in ('date /t') do @set FILENAMEDT=%%i%%j%%k #取系统当前日期:

  REM File name Daily.bat

  REM Batch Process

  Reload DB Backup

  REM

  REM Author Frank.Fan

  REM Modification History

  Created 2012-05-07

  REM Modified

  REM

  for /F "tokens=1-3 delims=/ " %%i in ('date /t') do @set FILENAMEDT=%%i%%j%%k

  #取系统当前日期:年月日(中文格式)、月日年(英文格式)

  for /F "tokens=1,2 delims=: " %%i in ('time /t') do @set FILENAMETM=%%i%%j

  #取系统当前时间:时分

  SET USERNAME=SYSTEM #oracle帐号

  SET USERPASSWD=123456 #oracle密码

  SET SERVICENAME=QEWAY #oracle SID

  SET SCHEMASNAME=ISCOP #oracle SCHEMA帐号

  SET RARTOOL=C:Program FilesWinRAR #设定WINRAR路径(各个机器不同)

  SET DBBACKUPPATH=D:DBBAK #设定被导出的文件路径

  SET DBADIRECTORIES=DBBAK #oracle内设置的Directory目录名

  SET DBBACKUPFILENAME=QEWAY_%FILENAMEDT%-%FILENAMETM%

  goto main

  :main

  ECHO Exporting schemas.......

  expdp %USERNAME%/%USERPASSWD%@%SERVICENAME% DUMPFILE=%DBADIRECTORIES%:%DBBACKUPFILENAME%.dmp schemas=%SCHEMASNAME% LOGFILE=%DBADIRECTORIES%:%DBBACKUPFILENAME%.log

  ECHO Done exporting schemas.

  ECHO =======================================================

  ECHO ...Done export

  if exist %DBBACKUPPATH%%DBBACKUPFILENAME%.RAR del %DBBACKUPPATH%%DBBACKUPFILENAME%.RAR

  "%RARTOOL%winrar.exe" a -ep %DBBACKUPPATH%%DBBACKUPFILENAME%.RAR %DBBACKUPPATH%%DBBACKUPFILENAME%.dmp

  del %DBBACKUPPATH%%DBBACKUPFILENAME%.dmp

  Echo ...Compression complete

  forfiles /p "%DBBACKUPPATH%" /m *.rar -d -30 /c "cmd /c del /f @path"

  #删除30天之前的RAR文件

  REM -----------Send a mail to notification-----------

  start D:DBBAKBatch_notification_Daily.vbs #调用邮件通知VBS文件

  EXIT

  邮件通知VBS文件内容:

  NameSpace = ""

  set Email = CreateObject("CDO.Message")

  Email.From = "XXXX@Exchange.com"

  Email.To = "XXXX@163.com"

  Email.Subject = "Gongxtpt Batch Daily Task"

  Email.Textbody = "Gongxtpt Batch Daily Task was done!! Starting at 00:00AM"

  with Email.Configuration.Fields

  .Item(NameSpace&"sendusing") = 2

  .Item(NameSpace&"smtpserver") = "10.0.0.12"

  .Item(NameSpace&"smtpserverport") = 25

  .Item(NameSpace&"smtpauthenticate") = 0

  .Item(NameSpace&"sendusername") = ""

  .Item(NameSpace&"sendpassword") = ""

  .Update

  end with

  Email.Send

  Set Email=Nothing

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1670
14
PHP Tutorial
1274
29
C# Tutorial
1256
24
Can vs code run in Windows 8 Can vs code run in Windows 8 Apr 15, 2025 pm 07:24 PM

VS Code can run on Windows 8, but the experience may not be great. First make sure the system has been updated to the latest patch, then download the VS Code installation package that matches the system architecture and install it as prompted. After installation, be aware that some extensions may be incompatible with Windows 8 and need to look for alternative extensions or use newer Windows systems in a virtual machine. Install the necessary extensions to check whether they work properly. Although VS Code is feasible on Windows 8, it is recommended to upgrade to a newer Windows system for a better development experience and security.

Oracle's Role in the Business World Oracle's Role in the Business World Apr 23, 2025 am 12:01 AM

Oracle is not only a database company, but also a leader in cloud computing and ERP systems. 1. Oracle provides comprehensive solutions from database to cloud services and ERP systems. 2. OracleCloud challenges AWS and Azure, providing IaaS, PaaS and SaaS services. 3. Oracle's ERP systems such as E-BusinessSuite and FusionApplications help enterprises optimize operations.

How to run sublime after writing the code How to run sublime after writing the code Apr 16, 2025 am 08:51 AM

There are six ways to run code in Sublime: through hotkeys, menus, build systems, command lines, set default build systems, and custom build commands, and run individual files/projects by right-clicking on projects/files. The build system availability depends on the installation of Sublime Text.

How to solve complex BelongsToThrough relationship problem in Laravel? Use Composer! How to solve complex BelongsToThrough relationship problem in Laravel? Use Composer! Apr 17, 2025 pm 09:54 PM

In Laravel development, dealing with complex model relationships has always been a challenge, especially when it comes to multi-level BelongsToThrough relationships. Recently, I encountered this problem in a project dealing with a multi-level model relationship, where traditional HasManyThrough relationships fail to meet the needs, resulting in data queries becoming complex and inefficient. After some exploration, I found the library staudenmeir/belongs-to-through, which easily installed and solved my troubles through Composer.

laravel installation code laravel installation code Apr 18, 2025 pm 12:30 PM

To install Laravel, follow these steps in sequence: Install Composer (for macOS/Linux and Windows) Install Laravel Installer Create a new project Start Service Access Application (URL: http://127.0.0.1:8000) Set up the database connection (if required)

git software installation git software installation Apr 17, 2025 am 11:57 AM

Installing Git software includes the following steps: Download the installation package and run the installation package to verify the installation configuration Git installation Git Bash (Windows only)

vscode cannot install extension vscode cannot install extension Apr 15, 2025 pm 07:18 PM

The reasons for the installation of VS Code extensions may be: network instability, insufficient permissions, system compatibility issues, VS Code version is too old, antivirus software or firewall interference. By checking network connections, permissions, log files, updating VS Code, disabling security software, and restarting VS Code or computers, you can gradually troubleshoot and resolve issues.

MongoDB vs. Oracle: Choosing the Right Database for Your Needs MongoDB vs. Oracle: Choosing the Right Database for Your Needs Apr 22, 2025 am 12:10 AM

MongoDB is suitable for unstructured data and high scalability requirements, while Oracle is suitable for scenarios that require strict data consistency. 1.MongoDB flexibly stores data in different structures, suitable for social media and the Internet of Things. 2. Oracle structured data model ensures data integrity and is suitable for financial transactions. 3.MongoDB scales horizontally through shards, and Oracle scales vertically through RAC. 4.MongoDB has low maintenance costs, while Oracle has high maintenance costs but is fully supported.

See all articles