Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Veritas and Oracle backups
On Fri, 8 Mar 2002, Jon Vahlberg wrote:
> directory but I don't want to mount a snapshot partition to do it. How can I
> do the following:
> ALTER TABLESPACE <tablespace> BEGIN BACKUP;
> cp <raw files> to backup directory
> ALTER TABLESPACE <tablespace> END BACKUP;
Use svrmgrl to alter the tablespace status or execute other SQL commands in your backup script. E.g.:
...
echo "I'm doing backup of tablespace something"
svrmgrl <<@EOF
CONNECT INTERNAL;
ALTER TABLESPACE something BEGIN BACKUP;
EXIT;
@EOF
cp databasefile somewhere_else
#other commands
svrmgrl <<@EOF
CONNECT INTERNAL;
ALTER TABLESPACE something END BACKUP;
EXIT;
@EOF
echo "I'm doing something else"
...
You can use svrmgrl to obtain tablespace names, translate them to filenames and to do many other things. You can filter output as you need, but it seems to me better to use SPOOL <temp_filename> command to export the results, because it is more predictable. :-)
AFAIK sqlplus can be used instead of svrmgrl.
Use oracle or other account with dba main group to get rid of password asking. Good luck.
-- EdWin <edwart_at_do.wroclaw.tpsa.pl> "Warning: Dates in calendar are closer than they appear."Received on Fri Mar 08 2002 - 16:58:42 CST
![]() |
![]() |