Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2013
    Posts
    2

    Post Unanswered: oracle backup_restore using tsm

    Hi Everyone ,
    I tried the following to backup & restore database , I get the result as success in trace/log files but when i check it , it is not done.


    ### creating a table in oracle db ###
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    SQL> create table emp(name varchar2(10));

    Table created.

    SQL> insert into emp values('ranjith');

    1 row created.

    SQL> select * from emp;

    NAME
    ----------
    ranjith

    SQL> commit;

    Commit complete.
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------

    ### performing backup on tsm oracle client ###
    ------------------------------------------------

    [oracle@ole6base ~]$ rman target sys/sarasu10@tsm cmdfile bkdb.scr msglog bkdb.log
    RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> [oracle@ole6base ~]$

    ### backup logfile content ###
    ------------------------------

    Recovery Manager: Release 11.2.0.1.0 - Production on Thu Oct 17 15:28:31 2013

    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

    connected to target database: TSM (DBID=1611787300)

    RMAN> run
    2> {
    3> allocate channel t1 DEVICE TYPE disk parms
    4> 'ENV=(TDPO_OPTFILE=/home/oracle/tdpo.opt)';
    5> allocate channel t2 DEVICE TYPE disk parms
    6> 'ENV=(TDPO_OPTFILE=/home/oracle/tdpo.opt)';
    7>
    8> backup
    9> filesperset 5
    10> format 'df_%t_%s_%p'
    11> (database);
    12>
    13> }
    14>
    using target database control file instead of recovery catalog
    allocated channel: t1
    channel t1: SID=36 device type=DISK

    allocated channel: t2
    channel t2: SID=38 device type=DISK

    Starting backup at 17-OCT-13

    channel t1: starting full datafile backup set
    channel t1: specifying datafile(s) in backup set
    input datafile file number=00001 name=/opt/oracle/app/oracle/oradata/tsm/system01.dbf
    input datafile file number=00004 name=/opt/oracle/app/oracle/oradata/tsm/users01.dbf
    channel t1: starting piece 1 at 17-OCT-13
    channel t2: starting full datafile backup set
    channel t2: specifying datafile(s) in backup set
    input datafile file number=00002 name=/opt/oracle/app/oracle/oradata/tsm/sysaux01.dbf
    input datafile file number=00003 name=/opt/oracle/app/oracle/oradata/tsm/undotbs01.dbf
    channel t2: starting piece 1 at 17-OCT-13
    channel t2: finished piece 1 at 17-OCT-13
    piece handle=/opt/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/df_829063714_22_1 tag=TAG20131017T152833 comment=NONE
    channel t2: backup set complete, elapsed time: 00:00:35
    channel t2: starting full datafile backup set
    channel t2: specifying datafile(s) in backup set
    channel t1: finished piece 1 at 17-OCT-13
    piece handle=/opt/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/df_829063714_21_1 tag=TAG20131017T152833 comment=NONE
    channel t1: backup set complete, elapsed time: 00:00:36
    channel t1: starting full datafile backup set
    channel t1: specifying datafile(s) in backup set
    including current SPFILE in backup set
    channel t1: starting piece 1 at 17-OCT-13
    including current control file in backup set
    channel t2: starting piece 1 at 17-OCT-13
    channel t1: finished piece 1 at 17-OCT-13
    piece handle=/opt/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/df_829063750_24_1 tag=TAG20131017T152833 comment=NONE
    channel t1: backup set complete, elapsed time: 00:00:01
    channel t2: finished piece 1 at 17-OCT-13
    piece handle=/opt/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/df_829063749_23_1 tag=TAG20131017T152833 comment=NONE
    channel t2: backup set complete, elapsed time: 00:00:01
    Finished backup at 17-OCT-13
    released channel: t1
    released channel: t2

    Recovery Manager complete.

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------

    ### deleting tables on db###
    ----------------------------

    SQL> drop table emp;

    Table dropped.

    SQL> commit;

    Commit complete.

    SQL> select * from emp;
    select * from emp
    *
    ERROR at line 1:
    ORA-00942: table or view does not exist

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------

    shutdown db instance and start in mount mode
    --------------------------------------------
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup mount
    ORACLE instance started.

    Total System Global Area 1252663296 bytes
    Fixed Size 2212936 bytes
    Variable Size 352324536 bytes
    Database Buffers 889192448 bytes
    Redo Buffers 8933376 bytes
    Database mounted.
    SQL>

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------

    ### restoring oracle db ###
    ----------------------------

    [oracle@ole6base ~]$ rman target sys/sarasu10@tsm cmdfile resdb.scr msglog resdb.log
    RMAN> 2> 3> 4> 5> 6> 7> 8> 9> [oracle@ole6base ~]$

    ## restore log file ##
    ----------------------

    Recovery Manager: Release 11.2.0.1.0 - Production on Thu Oct 17 15:34:41 2013

    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

    connected to target database: TSM (DBID=1611787300, not open)

    RMAN> run
    2> {
    3> allocate channel t1 DEVICE TYPE disk parms
    4> 'ENV=(TDPO_OPTFILE=/home/oracle/tdpo.opt)';
    5> restore database;
    6> recover database;
    7> alter database open;
    8> }
    9>
    using target database control file instead of recovery catalog
    allocated channel: t1
    channel t1: SID=20 device type=DISK

    Starting restore at 17-OCT-13

    channel t1: starting datafile backup set restore
    channel t1: specifying datafile(s) to restore from backup set
    channel t1: restoring datafile 00002 to /opt/oracle/app/oracle/oradata/tsm/sysaux01.dbf
    channel t1: restoring datafile 00003 to /opt/oracle/app/oracle/oradata/tsm/undotbs01.dbf
    channel t1: reading from backup piece /opt/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/df_829063714_22_1
    channel t1: piece handle=/opt/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/df_829063714_22_1 tag=TAG20131017T152833
    channel t1: restored backup piece 1
    channel t1: restore complete, elapsed time: 00:00:15
    channel t1: starting datafile backup set restore
    channel t1: specifying datafile(s) to restore from backup set
    channel t1: restoring datafile 00001 to /opt/oracle/app/oracle/oradata/tsm/system01.dbf
    channel t1: restoring datafile 00004 to /opt/oracle/app/oracle/oradata/tsm/users01.dbf
    channel t1: reading from backup piece /opt/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/df_829063714_21_1
    channel t1: piece handle=/opt/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/df_829063714_21_1 tag=TAG20131017T152833
    channel t1: restored backup piece 1
    channel t1: restore complete, elapsed time: 00:00:15
    Finished restore at 17-OCT-13

    Starting recover at 17-OCT-13

    starting media recovery
    media recovery complete, elapsed time: 00:00:02

    Finished recover at 17-OCT-13

    database opened
    released channel: t1

    Recovery Manager complete.
    [oracle@ole6base ~]$

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------

    ### table EMP after restore in oracle db ###
    --------------------------------------------

    startup
    ORACLE instance started.

    Total System Global Area 1252663296 bytes
    Fixed Size 2212936 bytes
    Variable Size 352324536 bytes
    Database Buffers 889192448 bytes
    Redo Buffers 8933376 bytes
    Database mounted.
    Database opened.
    SQL> select * from emp;
    select * from emp
    *
    ERROR at line 1:
    ORA-00942: table or view does not exist

    --------------------------------------------------------------------------------------------------------------------------------------------------------

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    what have you been doing for the last month?

    how do we know the same USER/schema was used for both SELECT?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Nov 2013
    Posts
    2

    Post

    I dint use any schemas , created the table after connecting with sys as sysdba.
    back to work after an elbow fracture so I couldn't post u , sorry for that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •