-
Hi: Found this script in Scripts section. Tried it. Happy with the response but unable to figure out a few things..
-- Create Script to backup actual files to a directory
select 'alter tablespace '|| tablespace_name||' begin backup;' c1,
'host cp '||file_name||' &HOT_BACK_DIR' || '/' ||
substr(file_name,instr(rtrim(file_name),'/',-1,1)+1,length(rtrim(file_name)))||
'.bak' c2,
'host compress -f '|| ' &HOT_BACK_DIR' || '/' ||
substr(file_name,instr(rtrim(file_name),'/',-1,1)+1,length(rtrim(file_name)))||
'.bak' c3
from dsc_hot_stage
union
select 'alter tablespace '|| tablespace_name||' end backup;' c1,
null, null
from dsc_hot_stage
group by tablespace_name,file_name order by 1;
Thanks, ST2000
-
Put each tablespace in backup mode
Use the host command to get to an os prompt
Use your OS copy command to copy datafile to backup directory
Use your os command to compress the backed up data file.
Take tablespace out of backup mode.
Jeff Hunter
-
Thanks Jeff.. I could figure out the task since I am able to produce a file, but the few things I cant understans are ::
what are c1, c2 and c3.. how is it represnting that and using them.. very confusing
The first '/'.. It is not shown on result
Thanks, ST2000
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|