静默安装Oracle12C 并使用TSM备份Oracle

安装oracle 12C

停止防火墙,selinux

chkconfig iptables off

service iptables stop

vim /etc/selinux/config 修改SELINUX=disabled ,重启后生效

setenforce 0 ,不需要重启,立即生效,只限于当次

 

检查rpm包

rpm -q --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n" \

binutils \

compat-libstdc++-33 \

elfutils-libelf \

elfutils-libelf-devel \

gcc \

gcc-c++ \

glibc \

glibc-common \

glibc-devel \

glibc-headers \

ksh \

libaio \

libaio-devel \

libgcc \

libstdc++ \

libstdc++-devel \

make \

sysstat \

numactl \

unixODBC \

unixODBC-devel \

| grep "not installed" | grep -v grep | awk'{print "yum install -y " $2 }'

 

 

vi /etc/hosts

192.168.80.177 node1

 

vi /etc/sysctl.conf

 

cat >> /etc/sysctl.conf <<EOF

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

EOF

 

sysctl -p

 

 

vim /etc/security/limits.conf

 

cat >> /etc/security/limits.conf <<EOF

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

oracle soft stack 10240

EOF

 

vi /etc/pam.d/login

 

cat >> /etc/pam.d/login <<EOF

session required  pam_limits.so

EOF

 

session   required     /lib/security/pam_limits.so  ---32bit

session   required    /lib64/security/pam_limits.so ---64bit

 

vi /etc/profile

 

cat >> /etc/profile <<EOF

if [ \$USER = "oracle" ]; then   

 if [ \$SHELL ="/bin/ksh" ];then

ulimit -p 16384

ulimit -n65536    

 else        

ulimit -u 16384-n 65536    

 fi

fi

EOF

 

 

找到ulimit –S –c 0 > /dev/null 2>&1

改成

ulimit -S -c unlimited > /dev/null 2>&1

 

 

 vi /etc/csh.login

 

cat >> /etc/csh.login <<EOF

if( \$USER == "oracle" ) then

     limit maxproc16384

     limitdescriptors 65536

     umask 022

endif

EOF

 

 /usr/sbin/groupadd oinstall

 /usr/sbin/groupadd dba

 /usr/sbin/useradd-g oinstall -G dba oracle

 passwd oracle

 

mkdir -p /u01/app/oracle/product/12.1.0/dbhome_1

mkdir -p /u01/app/oraInventory

chown -R oracle:oinstall /u01/app/

chmod -R 775 /u01/app/

 

 

su - oracle

vim .bash_profile

ORACLE_BASE=/u01/app/oracle

ORACLE_SID=demo

ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1

export ORACLE_BASE ORACLE_SID ORACLE_HOME

export PATH=$PATH:$ORACLE_HOME/bin

 

或者 参考:

vim demo.env

umask 022

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1

export ORACLE_SID=demo

export TNS_ADMIN=$ORACLE_HOME/network/admin

export ORA_NLS10=$ORACLE_HOME/nls/data

export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

exportCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

export PS1=$LOGNAME@`hostname`:'$PWD>'

export SQLPATH=$ORACLE_HOME/sqlplus/admin:/home/oracle/admin/sql

alias ohome="cd $ORACLE_HOME"

alias taf="tail -f/u01/app/oracle/diag/rdbms/demo/demo/trace/alert_demo.log"

ulimit -u 16384 -n 63536 #linux

esc="033["

echo " "

echo " "

echo -e "${esc}31;1m******************************************************************${esc}0m"

echo -e "${esc}31;1m***This is PRODUCT , Please becareful of your operation!***${esc}0m"

echo -e"${esc}31;1m******************************************************************${esc}0m"

echo " "

echo " "

 

安装

此步骤很重要,如果忽略 ,最终会提示inventory 文件目录非空 导致静默安装失败

vim /etc/oraInst.loc

inventory_loc=/u01/app/oraInventory

inst_group=oinstall

 

因为12.1的静默安装需要提供MOS的username,password 所以静默安装 12.1.0 采用 debug模式安装 ,如果有异常则更容易发现错误原因。

 ./runInstaller-silent -noconfig -ignorePrereq -responseFile /home/oracle/db.rsp  ---会报错

 

 

cd $ORACLESOFT_mount/database

./runInstaller -silent -debug -force \

FROM_LOCATION=/mnt/hgfs/database/stage/products.xml \

oracle.install.option=INSTALL_DB_SWONLY \

UNIX_GROUP_NAME=oinstall \

INVENTORY_LOCATION=/u01/app/oraInventory \

ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1 \

ORACLE_HOME_NAME="Oracle111" \

ORACLE_BASE=/u01/app/oracle \

oracle.install.db.InstallEdition=EE \

oracle.install.db.isCustomInstall=false \

oracle.install.db.DBA_GROUP=dba \

oracle.install.db.OPER_GROUP=dba \

oracle.install.db.BACKUPDBA_GROUP=dba \

oracle.install.db.DGDBA_GROUP=dba \

oracle.install.db.KMDBA_GROUP=dba \

DECLINE_SECURITY_UPDATES=true

 

 

 

运行到

The following configuration scripts need to be executedas the "root" user.

 #!/bin/sh

 #Root scripts torun

 

/u01/app/oracle/product/12.1.0/dbhome_1/root.sh

To execute the configuration scripts:

         1. Open aterminal window

         2. Log inas "root"

         3. Run the scripts

         4. Returnto this window and hit "Enter" key to continue

 

另打开一个终端 运行root.sh

最好先运行/u01/app/oraInventory/orainstRoot.sh

 ./u01/app/oraInventory/orainstRoot.sh

 ./u01/app/oracle/product/12.1.0/dbhome_1/root.sh

至此软件安装成功

 

直接编辑监听文件 不使用netca建立listener.ora

cat listener.ora

# listener.ora Network Configuration File:/u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora

# Generated by Oracle configuration tools.

LISTENER =

 (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST =node1)(PORT = 1521))

    )

  )

 

ADR_BASE_LISTENER = /u01/app/oracle

 

 

grep -Ev '^(#|$)' urfile

静默安装db

安装完成oracle软件之后还没创建db,我们可以继续使用静默方式创建数据库。

cd /mnt/hgfs/database/response

[oracle@test6 response]$ grep -Ev '^(#|$)' dbca.rsp

[GENERAL]

RESPONSEFILE_VERSION = "11.2.0"

OPERATION_TYPE = "createDatabase"

[CREATEDATABASE]

GDBNAME = "orcl11g.us.oracle.com"

SID = "orcl11g"

TEMPLATENAME = "General_Purpose.dbc"

[createTemplateFromDB]

SOURCEDB = "myhost:1521:orcl"

SYSDBAUSERNAME = "system"

TEMPLATENAME = "My Copy TEMPLATE"

[createCloneTemplate]

SOURCEDB = "orcl"

TEMPLATENAME = "My Clone TEMPLATE"

[DELETEDATABASE]

SOURCEDB = "orcl"

[generateScripts]

TEMPLATENAME = "New Database"

GDBNAME = "orcl11.us.oracle.com"

[CONFIGUREDATABASE]

[ADDINSTANCE]

DB_UNIQUE_NAME = "orcl11g.us.oracle.com"

NODELIST=

SYSDBAUSERNAME = "sys"

[DELETEINSTANCE]

DB_UNIQUE_NAME = "orcl11g.us.oracle.com"

INSTANCENAME = "orcl11g"

SYSDBAUSERNAME = "sys"

 

grep -Ev '^(#|$)' dbca.rsp  >> /home/oracle/dbca.rsp

 

cd /home/oracle

[oracle@node1 ~]$ vim dbca.rsp

[GENERAL]

RESPONSEFILE_VERSION = "12.1.0"

OPERATION_TYPE = "createDatabase"

[CREATEDATABASE]

GDBNAME = "demo"

SID = "demo"

TEMPLATENAME = "General_Purpose.dbc"

SYSPASSWORD = "oracle"

SYSTEMPASSWORD = "oracle"

SYSMANPASSWORD = "oracle"

DBSNMPPASSWORD = "oracle"

DATAFILEDESTINATION ="/u01/app/oracle/oradata"

STORAGETYPE=FS

CHARACTERSET = "AL32UTF8"

DATABASETYPE = "MULTIPURPOSE"

AUTOMATICMEMORYMANAGEMENT = "FALSE"

TOTALMEMORY =8192

 

 

运行:

[oracle@node1 ~]$ dbca -silent -responseFile/home/oracle/dbca.rsp

Copying database files

1% complete

3% complete

11% complete

18% complete

26% complete

33% complete

37% complete

Creating and starting Oracle instance

40% complete

45% complete

50% complete

55% complete

56% complete

60% complete

62% complete

Completing Database Creation

66% complete

70% complete

73% complete

85% complete

96% complete

100% complete

Look at the log file"/u01/app/oracle/cfgtoollogs/dbca/demo/demo.log" for further details.

 

[oracle@node1 admin]$ cat tnsnames.ora

# tnsnames.ora Network Configuration File:/u01/app/oracle/product/12.1.0/dbhome_1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

 

DEMO =

  (DESCRIPTION =

    (ADDRESS =(PROTOCOL = TCP)(HOST = node1)(PORT = 1521))

    (CONNECT_DATA=

      (SERVER =DEDICATED)

     (SERVICE_NAME = demo)

    )

  )

 

**********************参考

http://blog.itpub.net/22664653/viewspace-1062585/

附上oracle软件静默安装的参数含义如下:

-silent       表示以静默方式安装,不会有任何提示

-force        表示允许安装到一个非空目录

-noconfig     表示不运行配置助手netca

-responseFile 表示使用哪个响应文件,必需使用绝对路径

oracle.install.responseFileVersion  响应文件模板的版本,该参数不要更改

oracle.install.option               安装模式选项,本例只安装oracle软件,该参数不要更改

DECLINE_SECURITY_UPDATES            是否需要在线安全更新,设置为false,该参数不要更改

UNIX_GROUP_NAME oracle              用户用于安装软件的组名

INVENTORY_LOCATION                  oracle 产品清单目录

SELECTED_LANGUAGES                  oracle 运行语言环境,一般包括引文和简繁体中文

ORACLE_HOME                         oracle安装目录

ORACLE_BASE                         oracle基础目录

oracle.install.db.InstallEdition    安装版本类型,一般是企业版

oracle.install.db.isCustomInstall   是否定制安装,默认Partitioning,OLAP,RAT都选上。根据自己的需要选择组件。

oracle.install.db.customComponents  定制安装组件列表:除了以上默认的,可加上LabelSecurity和Database Vault

oracle.install.db.DBA_GROUP         oracle 用户用于授予osdba权限的组名

oracle.install.db.OPER_GROUP        oracle 用户用于授予osoper权限的组名

 

问题一 相信这个问题也是很多人也会遇到

[FATAL] [INS-32035] Unable to create a new centralinventory at the specified location.

CAUSE: The central inventory location provided is notempty.

ACTION: Please provide another location for theinventory, or clean up the current location.

解决方法:

使用root vim /etc/oraInst.doc 加入

inventory_loc=/u01/app/oraInventory

inst_group=oinstall

问题二

[WARNING] [INS-32055] The Central Inventory is locatedin the Oracle base.

CAUSE: The Central Inventory is located in the Oraclebase.

ACTION: Oracle recommends placing this Central Inventoryin a location outside the Oracle base directory.

解决方法:

 如提示所言 Inventory 目录安装在了$ORACLE_BASE 目录下了,所以调整Inventory 目录不在$ORACLE_BASE 目录下,即可解决问题。

 

oraInventory 存放Oracle软件安装的目录信息,Oralce的安装和升级都需要用到这个目录,删除或丢失oraInventory目录的内容就会导致安装/升级失败。

Oracle官方文档对oraInventory的说明:

All Oracle software installations rely on thisdirectory.

Ensure that you back it up regularly.

Do not delete this directory unless you have completelyremoved

all Oracle software from the system.

oraInventory 目录的位置是由oraInst.loc 文件决定的:

/etc/oraInst.loc                (AIX and Linux Platform)

/var/opt/oracle/OraInst.loc (Solaris and HP-UX platform)

 

 

安装配置TSM server参考

http://www.docin.com/p-220851378.html

安装具体TSMclient参考

http://blog.sina.com.cn/s/blog_7012bd080100lug9.html

安装TSM tdop

安装tsmclient

[root@node1 Packages]# rpm -ivhcompat-libstdc++-33-3.2.3-69.el6.x86_64.rpm

[root@node1 TSM]# rpm -ivh TIVsm-API64.rpmTIVsm-API.i386.rpm TIVsm-BA.i386.rpm

 

安装tdop

export DISPLAY=:0.0

xhost +

./TDP-Oracle.x86_64.bin

 

 

server:

REGISTER NODE node1 junshi DOMAIN=do_vtl ARCHDELETE=YESBACKDELETE=YES

 

测试备份文件

dsmc selective /home/ -subdir=yes

 

查看备份的文件

dsmc q backup /home/ -subdir=yes

 

配置Oracle目录下

 

将ba下dsm.opt与dsm.sys拷贝到oracle目录下,并将TSMSERVER相关删除

修改tdpo.conf文件

# more tdpo.opt

***************************************************************************

* IBM Tivoli Storage Manager for Databases

* Data Protection for Oracle

*

* Sample tdpo.opt for the Linux86 Data Protection forOracle

*********************************************************************

DSMI_ORC_CONFIG/opt/tivoli/tsm/client/oracle/bin/dsm.opt

DSMI_LOG /opt/tivoli/tsm/client/oracle/bin

*TDPO_FS adsmorc

TDPO_NODE ORA_JYPDGD

*TDPO_OWNER <username>

*TDPO_PSWDPATH /opt/tivoli/tsm/client/oracle/bin

*TDPO_DATE_FMT 1

*TDPO_NUM_FMT 1

*TDPO_TIME_FMT 1

*TDPO_MGMT_CLASS_2 mgmtclass2

*TDPO_MGMT_CLASS_3 mgmtclass3

*TDPO_MGMT_CLASS_4 mgmtclass4

 

 

为TSM目录赋oracle用户执行权限

chown -R oracle.oinstall/opt/tivoli/tsm/client/oracle/bin64

chmod -R 755 /opt/tivoli/tsm/client/oracle/bin64

chmod -R 755 /opt/tivoli/tsm/client

chown -R oracle.oinstall /opt/tivoli/tsm/client

 

链接libobk.so

ln -sf /opt/tivoli/tsm/client/oracle/bin64/libobk.so/usr/lib/libobk.so

ln -sf /usr/lib/libobk.so/u01/app/oracle/product/12.1.0/dbhome_1/lib/libobk.so

生成password文件

[root@node1 bin64]# ./tdpoconf password

 

 

IBM Tivoli Storage Manager for Databases:

Data Protection for Oracle

Version 5, Release 5, Level 1.0

(C) Copyright IBM Corporation 1997, 2008. All rightsreserved.

 

 

***************************************************************

*   IBM TivoliStorage Manager for Databases Utility

*   Password fileinitialization/update program

***************************************************************

 

Please enter current password:

 

Please enter new password:

 

Please reenter new password for verification:

 

ANU0260I Password successfully changed.

 

[root@node1 bin64]# ls -la

total 1580

drwxrwxrwx 3 oracle oinstall   4096 Jul 31 17:01 .

drwxrwxrwx 5 oracle oinstall   4096 Jul 31 16:11 ..

-rwxrwxrwx 1 oracle oinstall     67 Mar 28 2008 agent.lic

-rwxrwxrwx 1 oracle oinstall    806 Jul 31 16:35 dsm.opt

-rwxrwxrwx 1 oracle oinstall   1017 Jul 31 16:52 dsm.sys

drwxrwxrwx 2 oracle oinstall   4096 Jul 31 16:11 en_US

-rwxrwxrwx 1 oracle oinstall 604488 Mar 28  2008 libobk.so

-rwxrwxrwx 1 oracle oinstall 507072 Mar 28  2008 tdpoconf

-rwxrwxrwx 1 oracle oinstall    114 Jul 31 16:53 tdpoerror.log

-rw-r--r-- 1 root  root         48 Jul 31 17:01TDPO.node1

-rwxrwxrwx 1 oracle oinstall    712 Jul 31 16:53 tdpo.opt

-rwxrwxrwx 1 oracle oinstall    721 Mar 28 2008 tdpo.opt.smp

-rwxrwxrwx 1 oracle oinstall 460712 Mar 28  2008 tdposync

 

几个dsm.opt 都是一样的

/opt/tivoli/tsm/client/oracle/bin64/dsm.opt

/opt/tivoli/tsm/client/ba/bin/dsm.opt

/opt/tivoli/tsm/client/api/bin/dsm.opt

/opt/tivoli/tsm/client/api/bin64/dsm.opt

[root@node1 bin64]# cat dsm.opt

************************************************************************

* IBM Tivoli Storage Manager                                           *

*                                                                     *

* Sample Client User Options file for UNIX(dsm.opt.smp)               *

************************************************************************

 

*  This filecontains an option you can use to specify the TSM

*  server tocontact if more than one is defined in your client

*  system options file(dsm.sys).  Copy dsm.opt.smp to dsm.opt.

*  If you enter aserver name for the option below, remove the

*  leadingasterisk (*).

 

************************************************************************

 

* SErvername      A server name defined in the dsm.sys file

SErvername     TSM_SVR1

 

dsm.sys:

 

/opt/tivoli/tsm/client/api/bin/dsm.sys

/opt/tivoli/tsm/client/api/bin64/dsm.sys

[root@node1 bin]# cat dsm.sys

************************************************************************

* IBM Tivoli Storage Manager                                           *

*                                                                     *

* Sample Client System Options file for UNIX(dsm.sys.smp)             *

************************************************************************

 

*  This filecontains the minimum options required to get started

*  using TSM.  Copy dsm.sys.smp to dsm.sys.  In the dsm.sys file,

*  enter theappropriate values for each option listed below and

*  remove theleading asterisk (*) for each one.

 

*  If your clientnode communicates with multiple TSM servers, be

*  sure to add astanza, beginning with the SERVERNAME option, for

*  each additionalserver.

 

************************************************************************

 

SErvername TSM_SVR1

   COMMMethod         TCPip

   TCPPort            1500

  TCPServeraddress   192.168.80.90

   NODEName             node1

  passwordaccess     prompt

[root@node1 bin]#

 

 

/opt/tivoli/tsm/client/ba/bin

[root@node1 bin]# cat dsm.sys

************************************************************************

* IBM Tivoli Storage Manager                                           *

*                                                                     *

* Sample Client System Options file for UNIX(dsm.sys.smp)             *

************************************************************************

 

*  This filecontains the minimum options required to get started

*  using TSM.  Copy dsm.sys.smp to dsm.sys.  In the dsm.sys file,

*  enter theappropriate values for each option listed below and

*  remove theleading asterisk (*) for each one.

 

*  If your clientnode communicates with multiple TSM servers, be

*  sure to add astanza, beginning with the SERVERNAME option, for

*  each additionalserver.

 

************************************************************************

 

SErvername TSM_SVR1

   COMMMethod         TCPip

   TCPPort            1500

  TCPServeraddress   192.168.80.90

   NODEName             node1

  passwordaccess     generate

 

 

/opt/tivoli/tsm/client/oracle/bin64

[root@node1 bin64]# cat dsm.sys

************************************************************************

* IBM Tivoli Storage Manager                                           *

*                                                                      *

* Sample Client System Options file for UNIX(dsm.sys.smp)             *

************************************************************************

 

*  This filecontains the minimum options required to get started

*  using TSM.  Copy dsm.sys.smp to dsm.sys.  In the dsm.sys file,

*  enter theappropriate values for each option listed below and

*  remove theleading asterisk (*) for each one.

 

*  If your clientnode communicates with multiple TSM servers, be

*  sure to add astanza, beginning with the SERVERNAME option, for

*  each additionalserver.

 

************************************************************************

 

SErvername TSM_SVR1

   COMMMethod         TCPip

   TCPPort            1500

   TCPServeraddress   192.168.80.90

       NODEName             node1

       passwordaccess     generate

 

 

tdpo.opt:

[root@node1 bin64]# cat tdpo.opt

***************************************************************************

* IBM Tivoli Storage Manager for Databases

*    DataProtection for Oracle

*

* Sample tdpo.opt for the LinuxAMD64 Data Protection forOracle

*********************************************************************

 

DSMI_ORC_CONFIG   /opt/tivoli/tsm/client/oracle/bin64/dsm.opt

DSMI_LOG          /opt/tivoli/tsm/client/oracle/bin64

 

*TDPO_FS           /adsmorc

TDPO_NODE         node1

*TDPO_OWNER        <username>

TDPO_PSWDPATH     /opt/tivoli/tsm/client/oracle/bin64

 

*TDPO_DATE_FMT     1

*TDPO_NUM_FMT      1

*TDPO_TIME_FMT     1

 

*TDPO_MGMT_CLASS_2  mgmtclass2

*TDPO_MGMT_CLASS_3  mgmtclass3

*TDPO_MGMT_CLASS_4  mgmtclass4

 

[root@node1 bin64]# ./tdpoconf showenv

 

 

IBM Tivoli Storage Manager for Databases:

Data Protection for Oracle

Version 5, Release 5, Level 1.0

(C) Copyright IBM Corporation 1997, 2008. All rightsreserved.

 

 

Data Protection for Oracle Information

 Version:              5

 Release:              5

 Level:                1

 Sublevel:             0

 Platform:             64bit TDPO LinuxAMD64

 

Tivoli Storage Manager Server Information

 Server Name:          TSM_SVR1

 ServerAddress:       192.168.80.90

 Server Type:          Linux/i386

 Server Port:          1500

 CommunicationMethod: TCP/IP

 

Session Information

 Owner Name:          

 Node Name:            node1

 Node Type:            TDPO LinuxAMD64

 DSMI_DIR:             /opt/tivoli/tsm/client/api/bin64

 DSMI_ORC_CONFIG:     /opt/tivoli/tsm/client/oracle/bin64/dsm.opt

 TDPO_OPTFILE:        /opt/tivoli/tsm/client/oracle/bin64/tdpo.opt

 PasswordDirectory:  /opt/tivoli/tsm/client/oracle/bin64

 Compression:          FALSE

 LicenseInformation:  License file exists andcontains valid license data.

 

 

做一次备份测试

脚本:

run{

allocate channel c1 type 'sbt_tape' parms

'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';

backup

incremental level 0 cumulative

format "%d_full_%s_%p"

filesperset 5

database include current controlfile;

sql "alter system archive log current";

backup

format "%d_arch_%s_%p"

filesperset 20

(archivelog all delete input);

release channel c1;

}

记录:

数据库开启归档

cd /u01/app/

mkdir arch

chmod -R 777 arch

chown -R oracle:oinstall ./arch

SQL> alter system setlog_archive_dest_1='location=/u01/app/arch' scope=both;

SQL> shutdown immediate;

SQL> startup mount;

SQL> alter database archivelog;

SQL> alter database open;

SQL> archive log list;

SQL> alter system switch logfile;

/

/

 

[oracle@node1 ~]$ rman target /

 

Recovery Manager: Release 12.1.0.1.0 - Production on ThuJul 31 17:20:58 2014

 

Copyright (c) 1982, 2013, Oracle and/or itsaffiliates.  All rights reserved.

 

connected to target database: DEMO (DBID=3598448651)

 

RMAN> run{

2> allocate channel c1 type 'sbt_tape' parms

3>'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';

4> backup

5> incremental level 0 cumulative

6> format "%d_full_%s_%p"

7> filesperset 5

8> database include current controlfile;

9> sql "alter system archive log current";

10> backup

11> format "%d_arch_%s_%p"

12> filesperset 20

13> (archivelog all delete input);

14> release channel c1;

15> }

 

using target database control file instead of recoverycatalog

allocated channel: c1

channel c1: SID=247 device type=SBT_TAPE

channel c1: Data Protection for Oracle: version 5.5.1.0

 

Starting backup at 31-JUL-14

channel c1: starting incremental level 0 datafile backupset

channel c1: specifying datafile(s) in backup set

input datafile file number=00001name=/u01/app/oracle/oradata/demo/system01.dbf

input datafile file number=00003name=/u01/app/oracle/oradata/demo/sysaux01.dbf

input datafile file number=00004name=/u01/app/oracle/oradata/demo/undotbs01.dbf

input datafile file number=00006name=/u01/app/oracle/oradata/demo/users01.dbf

channel c1: starting piece 1 at 31-JUL-14

channel c1: finished piece 1 at 31-JUL-14

piece handle=DEMO_full_3_1 tag=TAG20140731T172111comment=API Version 2.0,MMS Version 5.5.1.0

channel c1: backup set complete, elapsed time: 00:07:05

channel c1: starting incremental level 0 datafile backupset

channel c1: specifying datafile(s) in backup set

including current control file in backup set

including current SPFILE in backup set

channel c1: starting piece 1 at 31-JUL-14

channel c1: finished piece 1 at 31-JUL-14

piece handle=DEMO_full_4_1 tag=TAG20140731T172111comment=API Version 2.0,MMS Version 5.5.1.0

channel c1: backup set complete, elapsed time: 00:00:03

Finished backup at 31-JUL-14

 

sql statement: alter system archive log current

 

Starting backup at 31-JUL-14

current log archived

channel c1: starting archived log backup set

channel c1: specifying archived log(s) in backup set

input archived log thread=1 sequence=10 RECID=1STAMP=854385647

input archived log thread=1 sequence=11 RECID=2STAMP=854385648

input archived log thread=1 sequence=12 RECID=3STAMP=854385653

input archived log thread=1 sequence=13 RECID=4STAMP=854385653

input archived log thread=1 sequence=14 RECID=5STAMP=854385653

input archived log thread=1 sequence=15 RECID=6STAMP=854386103

input archived log thread=1 sequence=16 RECID=7STAMP=854386104

channel c1: starting piece 1 at 31-JUL-14

channel c1: finished piece 1 at 31-JUL-14

piece handle=DEMO_arch_5_1 tag=TAG20140731T172824comment=API Version 2.0,MMS Version 5.5.1.0

channel c1: backup set complete, elapsed time: 00:00:01

channel c1: deleting archived log(s)

archived log file name=/u01/app/arch/1_10_854378318.dbfRECID=1 STAMP=854385647

archived log file name=/u01/app/arch/1_11_854378318.dbfRECID=2 STAMP=854385648

archived log file name=/u01/app/arch/1_12_854378318.dbfRECID=3 STAMP=854385653

archived log file name=/u01/app/arch/1_13_854378318.dbfRECID=4 STAMP=854385653

archived log file name=/u01/app/arch/1_14_854378318.dbfRECID=5 STAMP=854385653

archived log file name=/u01/app/arch/1_15_854378318.dbfRECID=6 STAMP=854386103

archived log file name=/u01/app/arch/1_16_854378318.dbfRECID=7 STAMP=854386104

Finished backup at 31-JUL-14

 

released channel: c1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值