Oracle exp backup machine setup steps

Source: Internet
Author: User
JMYBJS (DESCRIPTION (ADDRESS (PROTOCOLTCP) (HOST129.1.9.90) (PORT1521) (CONNECT_DATA (SERVERDEDICATED) (SERVICE_NAMEjmybjs) create a folder on disk d: backupdmpd: backuplog is used to store dmp files and backup logs. Modify the backup script as follows:

JMYBJS = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 129.1.9.90) (PORT = 1521) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = jmybjs ))) create a folder d: backupdmp d: backuplog on disk d to store dmp files and backup logs. Modify the backup script as follows:

JMYBJS =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = 129.1.9.90) (PORT = 1521 ))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = jmybjs)

)

)

Create a folder on disk D:

D: backupdmp

D: backuplog

Used to store dmp files and backup logs.

Modify the backup script as follows:

'Nightly Bulk copy export for the MERs table & veiw

'Write output to clarentYYMMDD.txt and errors to ERRYYMMDD.txt

''Strssql = "bcp demo. clrnuser. bill_recordview out c: bibak" + outfile + "-U jl_voip-P jlvoip-c-k-t ,"

Dim outfile, aa, bb, stroption1, stroption2, A, B, C, strsql

Set ws = WScript. CreateObject ("WScript. shell ")

A = cint (month (dateadd ("d", 0, date ())))

B = cint (day (dateadd ("d", 0, date ())))

C = cint (year (dateadd ("d", 0, date ())))

If A <10 then aa = cstr (0) + cstr ()

If A> = 10 then aa = cstr ()

If B <10 then bb = cstr (0) + cstr (B)

If B> = 10 then bb = cstr (B)

Outfile = cstr (C) + aa + bb

Stroption1 = "D: oracle_bfproduct10.1.0Db_1BINexp system/****** @ jmybjs full = y buffer = 900000 file = d: backupdmpjmybjs" + outfile + "log = d: backuplogjmybjs "+ outfile + ". log """

Strsql = stroption1

Ret = ws. Run (strsql)

After the test, the backup is normal.

Modify the deletion script to keep the backup data on the backup machine for 30 days.

'Nightly Bulk copy export for the MERs table & veiw

'Write output to clarentYYMMDD.txt and errors to ERRYYMMDD.txt

''Strssql = "bcp demo. clrnuser. bill_recordview out c: bibak" + outfile + "-U jl_voip-P jlvoip-c-k-t ,"

Dim outfile, aa, bb, stroption1, stroption2, A, B, C, strsql

Set ws = WScript. CreateObject ("WScript. shell ")

A = cint (month (dateadd ("d",-30, date ())))

B = cint (day (dateadd ("d",-30, date ())))

C = cint (year (dateadd ("d",-30, date ())))

If A <10 then aa = cstr (0) + cstr ()

If A> = 10 then aa = cstr ()

If B <10 then bb = cstr (0) + cstr (B)

If B> = 10 then bb = cstr (B)

Outfile = cstr (C) + aa + bb

Stroption1 = "C: WINDOWSsystem32Delete d: backupdmpjmybjs" + outfile + ". dmp"

Strsql = stroption1

Ret = ws. Run (strsql)

Upload the file to system32 on the backup machine. The test is normal.

Finally, add the task to windows

Note: More exciting articles, please pay attention to SanlianProgramming TutorialTopic.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.