Re: Table Restore Using CommVault
Date: Tue, 6 Nov 2018 11:04:08 -0500
Message-ID: <5b4cd746-280f-4608-579a-74ab538e9c0e_at_gmail.com>
Hi Scott,
You need to put the word "test" in double quotes. Here is a version that will work:
run {
allocate channel notarget1 device type 'sbt_tape'
PARMS 'SBT_LIBRARY=/opt/commvault/Base/libobk.so,BLKSIZE=1048576"; Recover table "TEST"."TEST_TABLE" until time = “to_date(‘11/04/2018 00:00:00’,’mm/dd/yyyy hh24:mi:ss’)”
Auxiliary destination ‘/oracle/data/TEST’
Remap table ‘TEST’.’TEST_TABLE’:’TEST_TABLE2’;
release channel notarget1;
}
BTW, for this to work, your database version must be 12.1 or higher.
Regards
On 11/5/18 3:39 PM, Scott Canaan wrote:
>
> Has anyone done a table restore using CommVault? I’m trying to figure
> out how to do it using the command line interface, as I want to change
> the table name and the GUI doesn’t appear to allow that.
>
> I’ve created a user, test, with a table, test_table to use for this.
> I put 10 rows in the table the other day and 10 more today. I want to
> restore a copy of the table to another table from the other day.
>
> I’ve created a script, using the usual CommVault stuff at the
> beginning and ending and added the recover table clause in the middle,
> but RMAN doesn’t like it.
>
> This is what I have so far:
>
> run {
>
> allocate channel notarget1 device type 'sbt_tape'
>
> PARMS 'SBT_LIBRARY=/opt/commvault/Base/libobk.so,BLKSIZE=1048576
>
> ENV=(CV_mmsApiVsn=2,CV_channelPar=notarget1)';
>
> Recover table test.test_table until time = “to_date(‘11/04/2018
> 00:00:00’,’mm/dd/yyyy hh24:mi:ss’)”
>
> Auxiliary destination ‘/oracle/data/TEST’
>
> Remap table ‘TEST’.’TEST_TABLE’:’TEST_TABLE2’;
>
> release channel notarget1;
>
> }
>
> RMAN keeps complaining about ‘test’. When I took that out, it
> complained about ‘until’. It keeps telling me there is a syntax error
> and I can’t figure out why. The recover table statement is based on
> the Oracle RMAN documentation.
>
> *Scott Canaan ‘88**
> */Sr Database Administrator
> /Information & Technology Services
> Finance & Administration **
>
> *Rochester Institute of Technology
> *o: (585) 475-7886 | f: (585) 475-7520**
>
> srcdco_at_rit.edu <mailto:srcdco_at_rit.edu> | c: (585) 339-8659
>
> *CONFIDENTIALITY NOTE*: The information transmitted, including
> attachments, is intended only for the person(s) or entity to which it
> is addressed and may contain confidential and/or privileged material.
> Any review, retransmission, dissemination or other use of, or taking
> of any action in reliance upon this information by persons or entities
> other than the intended recipient is prohibited. If you received this
> in error, please contact the sender and destroy any copies of this
> information.
>
-- Mladen Gogala Database Consultant Tel: (347) 321-1217 -- http://www.freelists.org/webpage/oracle-lReceived on Tue Nov 06 2018 - 17:04:08 CET