Scott Canaan
2018-11-05 20:39:18 UTC
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
***@rit.edu<mailto:***@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.
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
***@rit.edu<mailto:***@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.