SAP中oracle数据库的备份恢复
- 格式:doc
- 大小:1.06 MB
- 文档页数:19
1. 备份数据库 进入T-code DB13 备份在线数据库 去 DB12可以看进度 查看日志 这是成功了 2.备份数据库归档文件 执行DB13的TCODE,创建计划,设定计划时间,选择redolog backup. 利用命令备份:brarchive -u / -c force -p initPRD.sap -sd Zzxc
报错,说Function中写的BRARCHIVE出错了,所以这里要用 -sd 这样就可以了,去DB14中查看日志备份状态 成功了 备份更改路径 3.SAP数据恢复 在运行中输入sqlplus /nolog打开cmd界面,登陆oracle Windows切换为devadm用户登录 关闭数据库服务 Linux下备份数据库 使用rdvadm用户登录 用chmod –R 777 /oracle 给权限 修改/oracle/RDV/102_64/dbs/initRDV.sap 备份日志文件路径
备份数据库时报错 解决方法: [root@vm ~]# su - oracle [oracle@vm ~]$ cd $ORACLE_HOME/bin [oracle@vm bin]$ chmod +s oracle [oracle@vm bin]$ ll oracle -rwsrwsr-x 1 oracle oinstall 152028761 Aug 30 19:06 oracle [oracle@vm bin]$ 关于s权限的说明: s表示setUID 和setGID 。位于user和group权限组的第三位置。如果在user权限组中设置了s权限。那么当该文件被执行时,是以文件所有者的GID,而不是用户的GID执行文件,因此可执行的文件搭配这个权限,便能得到特权,任意存取该文件的所有者能使用全部系统资源
NOTE: 776505
Symptom 1. BRARCHIVE, BRBACKUP, and BRCONNECT - started with the user adm when using the OPS$ connection (option "-u /") - terminate on Linux or Solaris 11 with the following error messages: BR0301E SQL error -1017 at location BrDbConnect-2 ORA-01017: invalid username/password; logon denied BR0310E Connect to database instance QO1 failed
2. BRBACKUP or BRARCHIVE backup with RMAN - started with the user adm - fails on Linux or Solaris 11 with the following error messages: BR0278E Command output of 'SHELL=/bin/sh /oracle/I20/920_32/bin/rman nocatalog': Recovery Manager: Release 9.2.0.4.0 - Production Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved. RMAN> RMAN> connect target /; RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== ORA-01031: insufficient privileges RMAN> **end-of-file**
3. BRBACKUP or BRARCHIVE fail with ORA-01031 during an attempt to connect to the database using the SYSOPER authorization, for example: BR0301E SQL error -1031 at location BrInitOraCreate-2, SQL statement: 'CONNECT / AT PROF_CONN IN SYSOPER MODE' ORA-01031: insufficient privileges BR0303E Determination of Oracle version failed
Other Terms BR*Tools
Reason and Prerequisites The BR executables are assigned an s-bit. The problem is related to the special processing of the s-bit by Linux and Solaris 11 operating systems. 1. The problem does not occur if the BR*Tools are called with the SYSTEM database user, for example: brbackup -u SYSTEM/ -q 2+3. The problem occurs for every database user if the backup was started with the OS user adm.
Solution 1. Although the BR*Tools are called with the OS adm, the relevant database user for the OPS$ connection must be called OPS$ORA. If it does not exist yet, create it as follows: sqlplus /nolog SQL> connect / as sysdba SQL> create user ops$ora identified externally temporary tablespace psaptemp; SQL> grant sapdba to ops$ora;
2+3. To solve the problem, set the SGID bit for the brarchive, brbackup, and brconnect executables (they must belong to ora): su - root cd /usr/sap//SYS/exe/run 改变文件所有者为ora chown ora brarchive brbackup brconnect 改变所属用户组为 dba
chgrp dba brarchive brbackup brconnect 改变文件权限为6754 chmod 6754 brarchive brbackup brconnect
These commands should result in the following file authorizations: -rwsr-sr-- 1 ora dba 9325374 2012-12-19 04:52 brarchive -rwsr-sr-- 1 ora dba 9443223 2012-12-19 04:52 brbackupLS -rwsr-sr-- 1 ora dba 11333756 2012-12-19 04:55 brconnect -rwxr-xr-x 1 adm sapsys 9893702 2012-12-19 04:56 brrecover -rwxr-xr-x 1 adm sapsys 6203096 2012-12-19 04:56 brrestore -rwxr-xr-x 1 adm sapsys 11766827 2012-12-19 04:58 brspace -rwxr-xr-x 1 adm sapsys 6797524 2012-12-19 04:58 brtools
The authorization ***4 should prevent just anybody from being able to perform an offline backup, which could disrupt the availability of the SAP system.
Header Data Released On 27.07.2015 14:33:10 Release Status Released for Customer Component BC-DB-ORA-DBA Database Administration with Oracle