Operating System - HP-UX
1845894 Members
4628 Online
110250 Solutions
New Discussion

Problems while backing up datafiles with multiple DD commands

 
SOLVED
Go to solution
Aji Thomas
Regular Advisor

Problems while backing up datafiles with multiple DD commands

hi guys,

i have a problem with creating a new HOT backup script for my oracle database.
I want to run multiple dd of my datafiles while the tablespaces are in BEGIN backup. After these multiple dd's are over i need to proceed with next step of my script, that is placing tablespaces in END backup mode.

Now within my script, I have,

-------------------------------------------
alter tablespace begin backup;

sh file1.sh &
sh file2.sh &

alter tablespace end backup;
-------------------------------------------

But when i execute this backup script, file1.sh and file2.sh which contains the dd command executes simultaneosly, But at the same time proceeds to next step. I want to execute the next step only once
sh file1.sh &
sh file2.sh &
gets executed.

How best I can?
Please suggest me.
Regards
AJI
5 REPLIES 5
Matthew_50
Valued Contributor

Re: Problems while backing up datafiles with multiple DD commands

usually, we will use RMAN to made a backup when DB is open(online), then backup the RMAN file to tape or other disks, if your DB is still open(online), you use dd directly to the datafile, even if you complete the backup, you won't be able to use the datafile.
Ralph Grothe
Honored Contributor
Solution

Re: Problems while backing up datafiles with multiple DD commands

man wait
Madness, thy name is system administration
Aji Thomas
Regular Advisor

Re: Problems while backing up datafiles with multiple DD commands

hi

Let me specify first of all, we are not using RMAN for online backup.

The problem is when i try initiating multiple DD's within my script

if i modify the script as

-------------------------------------------
alter tablespace begin backup;

sh file1.sh
sh file2.sh

alter tablespace end backup;
-------------------------------------------

That is if i remove &, the backup goes fine. But I will not be able to perform multiple DD's.

please suggest me how i can take multiple DD's

AJi
Vincent Fleming
Honored Contributor

Re: Problems while backing up datafiles with multiple DD commands

As mentioned very shortly above, I believe the command you're looking for is "wait". Depending upon the shell you're using, you should be able to do like this:

-------------------------------------------
alter tablespace begin backup;

sh file1.sh&
sh file2.sh&

wait

alter tablespace end backup;
-------------------------------------------

and it'll wait for the dd's to finish before continuing.

Check the man pages for the shell you're using, and check the specific behavior of the wait command there.

Cheers,

Vince
No matter where you go, there you are.
Aji Thomas
Regular Advisor

Re: Problems while backing up datafiles with multiple DD commands

Hi

Thanks for the update
That was exactly the one which i required

Thanks for the support,
AJI