Be learing-7 test, 7.11 create job-Oracle full backup according to policy, difference to tape, recovery

Source: Internet
Author: User
Tags change settings
Technorati label: Be, Backup Exec, Veritas, backup 1.1 create job-Oracle full backup according to policy, difference to tape, restore (OK)

This test is performed in the actual generation environment, and the tape library is used for backup. Then, the source Oracle database is restored to the SCN based on the time point.

1.1.1.1 tape management

The be Media Server is bak01.

1.1.1.2 labeling 1.1.1.3 tape placement

Use the import command of the tape library to import 10 tapes.

1.1.1.4 be manage tape 1.1.1.4.1 Scan

Scan the front tape, such,

Tape after scanning, for example,

The scanned tape is still unrecognizable, such

1.1.1.4.2 inventory

Right-click the slot of robotic libraries and run inventory. After the task is completed, online media is shown as follows:

Among them, blp34, blp038, and blp039 have used and backed up data, so their allocated date and media label icons are different. All current tapes are blank media.

1.1.1.4.3 quick erase

This step can only be performed when a tape is loaded for the first time because there is no data in the tape.

1.1.1.4.3.1 before erase

1.1.1.4.3.2 right-click menu-> quick erase

1.1.1.4.3.3 after erase

1.1.1.5 backup job BKDB01-PlcDB011.1.1.5.1 backup plan

Back up data on db01 and DB02 to tape. The Media Server is bak01.

1.1.1.5.2 preparations before backup 1.1.1.5.2.1 convert db01 and DB02 to archive Mode

Step 1: Stop All WebLogic services on app01 and app02.

Because the Weblogic service uses db01 and DB02 databases.

Step 2: log on to sqlplus of db01

1.1.1.5.3 be Agent installation and configuration

Installation:

1. Copy // bak01/C:/program files/Symantec/Backup Exec/agents/raws32 to any directory of db01 and DB02.

2. Run raws32/setupaa.exe.

Db01 Configuration:

Run Agent

Change settings

Add Oracle instances, as shown in figure

Use the OS system to log on to the account, as shown in figure

1.1.1.5.4 media set and policy management 1.1.1.5.4.1 Policy Name: plcdb01

The selection list corresponding to this policy is bkseldb01.

TEMPLATE 1: Full backup template tpldb01full

Requirements: one tape is used for full backup.

Device Name: ADIC 1.

Media Set Name: msdb01full. The additional period is one day, and the coverage period is one day.

Running cycle: starts running at 2:00:00 every day and ends at 2:59:59.

Template 2: Differential template tpldb01diff

Requirement: one tape is used for differential backup.

Device Name: ADIC 1.

Media Set Name: msdb01diff. The additional period is one day, and the coverage period is one day.

Running cycle: starts running at 2:30:00 every day and ends at 2:59:59.

1.1.2 be settings 1.1.2.1 important settings 1.1.2.1.1 set the search sequence that can overwrite the media

Menu: Tools-> Option-> Media Management

The order of this case is:

Search for covered media from the saved media set.

Search for covered media from this media set.

Search for media that can be overwritten from other media sets.

1.1.2.1.2 Logon account settings

Menu: Network-> logon accounts, add the following account:

Db01 OS account and Oracle login account

1.1.2.1.3 Oracle login list settings

1.1.2.2 be device settings

For details, see policy settings.

1.1.2.3 be media settings

Full backup media set, such

Differential media set, such

1.1.2.4 be policy setting 1.1.2.4.1 new policy

1.1.2.4.2 create a full backup template 1.1.2.4.2.1 create a backup Template

1.1.2.4.2.2 device and media

Here, we can select the device ADIC 1, IBM 1, IBM 2. ADIC 1 is a tape library, ibm1, and ibm2 are two drivers of adic1. If you select ADIC 1, be will select the driver, even if one driver fails, the job can continue.

Here we specify ibm1.

1.1.2.4.2.3 General

1.1.2.4.2.4 advanced Open File

None. This is an Oracle backup.

1.1.2.4.2.5 Oracle

1.1.2.4.2.6 schedule

Click button "Edit schedule details"

Recurring week days, click button "select all"

Time Window,

1.1.2.4.3 create a copy full backup Template

None. This backup does not have a copy backup.

1.1.2.4.3.1 create duplicate backup sets template1.1.2.4.3.2 templates1.1.2.4.3.3 device and media1.1.2.4.3.4 General

// Preferred source device is the object to be copied.

1.1.2.4.3.5 schedule

// Select Run only according to rules for this template.

// View rules

// Click Edit ruels.

1.1.2.4.4 create a new differential template 1.1.2.4.4.1 create a backup Template

1.1.2.4.4.2 device and media

1.1.2.4.4.3 General

1.1.2.4.4.4 advanced Open File

None.

1.1.2.4.4.5 Oracle

1.1.2.4.4.6 schedule

1.1.2.4.5 create a copy difference Template

None.

1.1.2.4.5.1 templates1.1.2.4.5.2 device and media1.1.2.4.5.3 general1.1.2.4.5.4 schedule1.1.2.5 be selection list settings

Create a selected item list

Selections

Resource credential test,

1.1.2.6 be job settings

New jobs using policy

Moniter

After the job is created, the two jobs start to wait for running.

1.1.3 be backup job running result (??) 1.1.3.1 exception during running 1.1.3.1.1 final error: 0xe0000340

Final error: 0xe0000340-The database script returned an error. Refer to the database Script output section in job logs for more details.

Final error category: Resource errors

Be log info:

RMAN-12001: cocould not open channel ch0

RMAN-10008: cocould not create channel Context

RMAN-10003: Unable to connect to target database

ORA-12560: TNS: protocol adapter Error

After the database is archived, the Oracle service is not restarted.

Open service manager and restart oracleserviceegov01

Restart listener

1.1.3.1.2 final error: 0xe0000340

Final error: 0xe0000340-The database script returned an error. Refer to the database Script output section in job logs for more details.

Final error category: Resource errors

Be log info:

Starting backup at 25-apr-09

Current Log archived

Channel ch0: Starting archive log backupset

Channel ch0: specifying archive log (s) in backup set

Input archive log thread = 1 sequence = 357 recid = 1 Stamp = 685118319

Input archive log thread = 1 sequence = 358 recid = 2 Stamp = 685118512

Channel ch0: Starting piece 1 at 25-apr-09

Released channel: ch0

RMAN-00571: ========================================================== ==============================

RMAN-00569: ==================== error message stack follows ==========================

RMAN-00571: ========================================================== ==============================

RMAN-03002: failure of backup plus archivelog command at 04/25/2009 14:41:54

ORA-04030: Out of process memory when trying to allocate 1049100 bytes (ksfq heap, ksfq buffers)

1. The official description is as follows:

ORA-04030 out of process memory when trying to allocate string bytes (string, string)

Cause: Operating System Process private memory has been exhausted.

Action: see the database administrator or operating system administrator to increase process memory quota. There may be a bug in the application that causes excessive allocations of process memory space.

This reminds me that the memory allocated when I installed the database can be too large. It is the configuration I installed:

The memory allocation of the installed oracle is as follows: (large_pool_size was originally 0, and then changed to 800 m)

We can see through the SQL command that sga_target = 1800 m, pga_aggregate_target = 600 is the same as what I set. For share memory management set to automatic, Oracle will manage it on its own, it seems that the management is not good, and you have to manually allocate it.

2. Online search information

Symptom: ORA-04030: The process memory is insufficient when trying to allocate... bytes (hash-join Subh, kllcqas: kllslibs.

ORA-04030: Out of process memory when trying to allocate string bytes

The reason and solution of ORA-04030:

The ORA-04030 is basically caused by the excessive use of memory.

The number of memory used by Oracle process is limited:

A. for 32-bit systems, there are limits on SGA 1.7g

B. Some OS systems also have some memory parameter restrictions.

-- Run ulimit.

C. OS physical memory + swap restrictions

Now we should check whether the SGA + PGA used by DB exceeds the above limit.

SGA includes db_cache, shared_pool, large_pool, and java_pool sessions. PGA includes sort_area_size/hash_area_size/* _ area_size or pga_aggregate_target.

The Code executed and some data also occupy space.

Then, reduce some values, such as db_cache and sort_area_size.

If it is caused by a limited of the OS system, you can consider releasing the limit man ulimit to see how to release the limit ......

Based on the above two points, determine the need to adjust the memory size less than 1.7 GB.

1. Set RMAN to fetch memory from SGA

Alter system set dbwr_io_slaves = 2 Scope = spfile;

Alter system set backup_tape_io_slaves = true scope = spfile;

2. Adjust the SGA size

Alter system set sga_target = 1200 m;

Alter system set sga_max_size = 1200 m scope = spfile;

3. Set the maximum memory size

Alter system set large_pool_size = 80 m;

4. Restart Oracle service.

5. Check the size of SGA, PGA, and pool.

1.1.3.2 adjust schedule after an exception

Full backup

Difference

1.1.3.3 simulate the difference 1.1.3.4 after full backup

1.1.3.5 1st run 1.1.3.5.1 simulation increment after full backup

Log on to db01 and insert records to the database.

1.1.3.5.2 job Monitor

1.1.3.5.3 after running Mediaset

1.1.3.6 2nd run 1.1.3.6.1 simulate Increment

Log on to db01 and insert records to the database.

Manually run the differential job

1.1.3.6.2 job Monitor

Note that the time is 11:17:57.

1.1.3.6.3 after running Mediaset

1.1.3.7 3rd run 1.1.3.7.1 simulate Increment

Log on to db01 and insert records to the database.

Manually run the differential job

1.1.3.7.2 job Monitor

Note that the time is 11:23:32.

1.1.3.7.3 after running Mediaset

1.1.3.8 4th run 1.1.3.8.1 simulation Increment

Log on to db01 and insert records to the database.

Manually run the differential job

1.1.3.8.2 job Monitor

Note that the time is 11:33:32.

1.1.3.8.3 after running Mediaset

1.1.3.9 conclusion

None.

1.1.4 restoration 1: Restore data to 3rd backup time points based on SCN

Media Server: bak01.

DB server: db01.

Use Backup Data to restore data to 3rd backup time points.

1.1.4.1 preparations before recovery

None.

1.1.4.2 db01 settings of the target server

None.

1.1.4.3 db01 media management 1.1.4.3.1 move the backup media to the new server

None.

1.1.4.3.2 be create a new device with the same name

None.

1.1.4.3.3 overwrite the Media Directory

None.

1.1.4.3.4 scan, check, and catalog Device

None.

1.1.4.4 be restore job settings

Create a restore job, restoredb01nast.

1.1.4.4.1 General

1.1.4.4.2 Selection

It must be restored from the tablespace.

Explanation:

From the control file (controll files), you can restore to any time point listed.

From the control file (controll files), we can see that 10:41:30 is full backup, 11:04:14 is 1st differential backup, 11:19:53 is 2nd differential backup, and 11:25:47 is 3rd differential backup, 11:36:04 is 4th differential backups.

From the control file (controll files), we can see that the recovery time is several minutes longer than the scheduled backup time.

If you place the cursor in any tablespace, a prompt is displayed.

Explanation:

Now we can see at a glance which time point of backup is arranged in the order of backup time. At a glance, we can see how to recover the backup.

We can see the directory where the source Oracle database files are stored.

Select the control file for the 3rd backup time point.

Explanation:

1. the time point or SCN can be used in the restoration, so that the point can be accurately restored during the restoration.

2. databaseid, which can be used when Oracle redirection is restored. the ID of the target database must be the same as that of the source database. Otherwise, the database cannot be restored.

After learning about the preceding information, choose tablespace for recovery, as shown in figure

1.1.4.4.3 resource credentials Test

This step must be completed successfully.

1.1.4.4.4 device and media

1.1.4.4.5 Oracle redirection settings

None.

1.1.4.4.6 Oracle settings

Select the SCN of the 3rd backup.

1.1.4.4.7 schedule, run now

Monitor:

1.1.4.5 follow-up

Step 1: log on to the target Oracle Server db01, open cmd, and enter sqlplus sys/password @ Sid as sysdba.

Step 2: Check the data.

Because the time point for restoring to 3rd backups should be 400 million records.

Haha, it is completely correct.

1.1.4.6 conclusion

Difference recovery is successful and can be recovered to any point in time.

1.1.5 restoration 2: Restore to 2nd backup time point based on SCN

Media Server: bak01.

DB server: db01.

Use Backup Data to restore data to 2nd backup time points.

1.1.5.1 preparations before recovery

None.

1.1.5.1.1 Oracle settings

Double-click the job restoredb01nast.

Query the SCN of 2nd differential backups.

Select the SCN of the 2nd backup.

1.1.5.1.2 schedule, run now

Monitor:

Exception

Final error: 0xe0000340-The database script returned an error. Refer to the database Script output section in job logs for more details.

Final error category: Resource errors

Be log info:

Starting recover at 26-apr-09

Released channel: ch0

RMAN-00571: ========================================================== ==============================

RMAN-00569: ==================== error message stack follows ==========================

RMAN-00571: ========================================================== ==============================

RMAN-03002: failure of recover command at 04/26/2009 00:36:55

RMAN-20208: Until change is before resetlogs change

For the last restoration, RMAN performed a resetlogs, so data before resetlog cannot be recovered.

1. Direct recovery is difficult to implement. It is said that Oracle10g RMAN can be restored to the time point before resetlogs, but it is not possible to be, at least 12.5 is not available.

2. Delete the db01 database, recreate the same database, and then restore Oracle redirection. This is certainly acceptable.

1.1.5.2 follow-up

Step 1: log on to the target Oracle Server db01, open cmd, and enter sqlplus username/password @ Sid as sysdba.

Step 2: Check whether the database is normal.

Because the last recovery failed, the database was not opened properly after it was closed.

Step 3. Run RMAN to db01 and RMAN target sys/password @ Sid.

Run the following command:

> Restore database;

> Recover database;

> Alter database open;

After the command is completed, the database returns to the last archive state. Obviously, the last archive time is the first recovery time, therefore, the current database data should be consistent with the first restoration.

Step 4: Check the data. sqlplus username/password @ Sid

1.1.5.3 conclusion

The same backup data can only be restored once. If it is restored again, only oracle redirection can be restored.

Related Article

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.