Skip to Content
Author's profile photo Former Member

SAP oracle DB Backup in Symantec netbackup 7.6

When i tried to configure the sap backup in netbackup 7.6, i don’t get any step by step procedures in online.

i goggled lot of articles from symantec, sap and administration guide of netbackup and configured the backup our self. also logged a support case with symantec also for the issues and got help from them.

so i write the detailed steps of how to configure the sap oracle db backup in NBU for the persons like me. thanks for opportunity.

My environment:

Appl – SAP EHP 6

DB – Oracle DB (without RMAN)

OS – HP-unix/Linux

Steps involved:

1. Download the required netbackup client based on the OS

2. Install the netbackup client in the server which need to be backup. follow the client procedures as per symantec guide.

3. Copy the below files to /oracle/<SID>/112_64/dbs location from /usr/openv/netbackup/ext/db_ext/sap/scripts/sap_oracle.

  1. initSAP.utl
  2. initSAP.sap
  3. sap_online_backup
  4. sap_offline_backup

/wp-content/uploads/2015/03/screenshot1_673755.png

4. In /oracle/<SID>/112_64/dbs rename the initSAP.utl and initSAP.sap as init<SID>.utl and init<SID>.sap

/wp-content/uploads/2015/03/screenshot2_673756.png

5. Edit the files init<SID>.sap, init<SID>.utl, sap_online_backup, as per required values. Here we need to choose the policy name that we going to create later. i choose as SCD_Online


must set the values in .utl file as below screenshot


/wp-content/uploads/2015/03/screenshot15_673768.png


Server – your master server name

Client – backup client

policy – policy name we are going to create in step 7


6.For netbackup backup, we need to link backint file with kernel.

   

       For Unix or linux machines we need to create a symbolic link. Link backint from the NetBackup install directory to the SAP tools directory.

       ln -s /usr/openv/netbackup/bin/backint  /usr/sap/<SID>/SYS/exe/run/backint

7.  Create the policy for new backup as choose earlier (in step 5)

  /wp-content/uploads/2015/03/screenshot6_673760.png

/wp-content/uploads/2015/03/screenshot7_673761.png

use the same policy name what we choose in step 5

/wp-content/uploads/2015/03/screenshot8_673762.png

/wp-content/uploads/2015/03/screenshot9_673763.png

/wp-content/uploads/2015/03/screenshot10_673767.png

/wp-content/uploads/2015/03/screenshot11_673766.png

in the above step, we need to mentioned the exact path of script file.

Next make a backup schedule as your wish and finish the process.

Pointsneed to check before start the backup.

1. Parameter values in init<SID>.sap, init<SID>.utl and script file.

2. permission of the above files must be ora<sid>:dba

3. permission of backint file as ora<sid>

by editing the commands in script file, we can able to take online backup along with archive files and on database backup. also we can able to take archivelog backup alone.

—————————————————————————————————————————————————————————————————————————————

Please give your valuable comments and add any points i missed.

Thanks

Balaji

Note – my next story will be restoration of sap backups to the same client and different client

Assigned Tags

      14 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Dear Balaji,

      I just followed above mentioned steps and successfully configured sap_online_backup. backups are running now, now I need to configure offline backups by using sap_offline_backup script on the same server. Should I follow the same procedure? with same utl and sap files? I need to run both online (week days) and offline (sunday) backups for this server.

      I really appreciate the effort you put. It is just to the point.

      If sap uses c shell, we need to modify sap_online_backup like below mentioned:

      Edit /usr/openv/netbackup/ext/db_ext/sap/scripts/sap_oracle
      -->   Comment and Uncomment because default command is for C-shell
      Comment SAP_ENV="$SAP_ENV SAP_SERVER=$SAP_SERVER; export SAP_SERVER;"
      Uncomment SAP_ENV="$SAP_ENV setenv SAP_SERVER $SAP_SERVER;"
      Comment SAP_ENV="$SAP_ENV SAP_POLICY=$SAP_POLICY; export SAP_POLICY;"
      Uncomment SAP_ENV="$SAP_ENV setenv SAP_POLICY $SAP_POLICY;"
      Comment SAP_ENV="$SAP_ENV SAP_SCHED=$SAP_SCHED; export SAP_SCHED;"
      Uncomment SAP_ENV="$SAP_ENV setenv SAP_SCHED $SAP_SCHED;"
          

      -->  Change option in brbacku if need , this case add " -u / " for force no need enter oracle password
      CMD_LINE="$SAP_ENV brbackup -u / -c -d util_file_online -t online -m all"
        --> Change option in brbacku if need , this case add " -u / " for force no need enter oracle password
      CMD_LINE="$SAP_ENV brarchive -u / -c -d util_file -sd > archive_out"
             Edit username : "orasap" become your default Oracle system (oraPRD) PRD is the SID of your server


      Reference:


      http://kmit4u.blogspot.com/2010/07/backup-netbackup-shortconfiguration-for.html

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Dear Moaz,

      Thanks for your valuable feedback and happy to hear you have configured backup successfully.

      for the offline backup, you need to use separate utl and sap files, also need to use separate policy in netbackup side. use the example script provided in the netbackup folder for offline. if anything help required, reply backup.

      Thanks

      Balaji

      Author's profile photo Former Member
      Former Member

      1) If I use separate utl and sap files, where should I copy them after rename? because I already have utl and sap files for online backups in the /oracle/<SID>/112_64/dbs location.


      2) if I create a new policy for offline backup for each server, would there be any change in policy settings except policy name, script and scheduled full backup timings?


      3) Should I choose calender option instead of frequency, if I need offline backups to start at every weekend saturday and sunday?

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      1) you can use separate utl and sap in same location by using different naming.

      screen.JPG

      after that you have change the configuration as per new naming in the offline script file.

      2) you need to provide offline backup script in the offline policy, and timings based on your convinent.

      3) yes you can use calendar option also.

      Author's profile photo Former Member
      Former Member

      Hi balaji,

      Thanks for sharing the stuff.

      Environment,

      Windows 2003

      SAP r/3 4.6b

      Oracle 9.2

      I heard that net backup was not supporting the SAP R/3 4.6 b with oracle 9.X as they are not supporting from the main vendors itself.But we just installed and took online backup successfully.

      As we spoke with Symantec person he said that backup will be successful but restore is not posible in r/3 4.6b and we have to do it in ecc6 to make it working.

      we are trying to restore it now.

      i'll let you know whether it works or not.

      Thanks and regards

      Siddhu

      Author's profile photo Former Member
      Former Member

      HI balaji,

      1.

      Shall we can use the same init.sap, init.utl files for both offline and online backup or we have to create different files for offline and online.

      2.

      How to take archive log backup can you please suggest procedure as above.

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Arun

      Answers for your questions:

      1. No we cant able to use same init.sap and init.utl files for offline and online backups. because we need separate policies for offline and online backups, if policy is separate .sap and .utl files also need different files.

      2. we can use the brarchive command in the separate script file for archive backup.

      Capture.JPG

      Author's profile photo Former Member
      Former Member

      Hi balaji,

      I am trying to take online backup with the script for IDES(training system). I am getting error code:6 even I have configured everything right.

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      is it possible to attach the error screenshot?

      Author's profile photo Former Member
      Former Member

      5/02/2016 19:59:12 - connected; connect time: 0:00:00

      05/02/2016 19:59:13 - Info bpbrm (pid=18984) starting bphdb on client

      05/02/2016 19:59:13 - Info bphdb (pid=9617) Backup started

      05/02/2016 19:59:13 - Info bphdb (pid=9617) Processing /root/bckscript/sap_offline_backup

      05/02/2016 19:59:13 - Info bphdb (pid=9617) Waiting for the child status

      05/02/2016 19:59:14 - Error bpbrm (pid=18984) from client DCSAPIDES001.otpcindia.local: ERR - Script exited with status = 1 <the requested operation was partially successful>

      05/02/2016 19:59:14 - Error bpbrm (pid=18984) from client DCSAPIDES001.otpcindia.local: ERR - bphdb exit status = 6: the backup failed to back up the requested files

      05/02/2016 19:59:14 - end writing

      05/02/2016 19:59:15 - Info bphdb (pid=9617) done. status: 6: the backup failed to back up the requested files

      the backup failed to back up the requested files  (6)

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      is there any logs created in SAP side? also please check the permission of /root/bckscript/sap_offline_backup. make it as <sid>adm user and try again.

      Author's profile photo Former Member
      Former Member

      Problem is resolved: The Sql System password is expired that is the reason of failure.

      Thanks balaji for your help.

      Author's profile photo Former Member
      Former Member

      Hi Balaji,

      I can't do the backup with SAP agent but I have followed when you have said. So I need your help.

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Eric,

      you may please share any error screenshot, it will help me identify the issue.