Oracle Database Backup and Restore Guide PowerSchool Student Information System

or its affiliate(s). The data and names used to illustrate the reports and screen images may include names of individuals. All rights reserved. or its affiliates. 2009 Document Owner: Documentation Services This edition applies to Release 5. All of the data and names are fictitious.2 of the PowerSchool Premier software and to all subsequent releases and modifications until otherwise indicated in new editions or updates. or its affiliates. Inc. Other brands and names are the property of their respective owners. and products. and/or other countries. Inc. Inc. companies. All trademarks are either owned or licensed by Pearson Education. in the U. Copyright © 2008 Pearson Education.Released April 22. any similarities to actual names are entirely coincidental. of Pearson Education. PowerSchool is a trademark.S. brands. .

....... 1 Terminology ...................................... 3 How to Alter Retention for Full and Incremental Backups .................. 1 Backup and Restore Setup .................................Oracle Database Backup and Restore Guide Contents Introduction ...................................... 3 How to Alter Retention for Flashback Recovery ............................................................................. 11 How to Restore and Recover to a Different Server................................................................. 9 Restore and Recovery Scenarios............................................................................................ 11 Data Pump Directory ................................................................................................................................................................................................ 10 How to Unlock the Database ................................................................................................................................................................................... 13 How to Remove Previous Server Information on a Test Server .................................. 10 Preventing Database Lockout ........................................... 7 Restore and Recovery .............................................................................. 9 How to Restore and Recover from a Specific Backup Date and Time .................. 14 Contents iii ............................................................................. 6 How To Manually Perform a Full Backup........................................................................... 9 Restore and Recovery to a Test Server......... 2 Backup Retention Policies ........................................... 2 How to Change the Flash Recovery Area Size ............................................................. 2 Flash Recovery Area .................................................................................................................................. 14 Modifying Oracle User Permissions............... 4 Backup Process ........................................................................................... 12 Removing Previous Server Information.........

Note: Archive logs are included in the backup and are deleted each time a backup is created. An operation that backs up all database files. Incremental Backup An operation that backs up only the database files that have changed since a previous backup. contact PowerSchool Technical Support. Please refer to the appropriate section for step-by-step instructions: • • Database Restore for Mac OS X Database Restore for Windows 2003 Terminology The following table describes terminology used in this document. The length of time that data in a backup set (a set being a full backup and all of its subsequent incremental backups) is not eligible to be overwritten. Term Flashback Full Backup Definition A technology supplied with Oracle used to back up. Retention Policy Introduction 1 . You must also have PowerSchool 5. This guide is intended for PowerSchool system administrators. A differential incremental backup copies data that changed since an incremental backup at the same or lower level. restore. and recover the database.2 installed and operating correctly.Oracle Database Backup and Restore Guide Introduction This guide describes the backup and recovery process and the steps necessary to restore the PowerSchool 5. For recoveries that require data older than seven days. or to restore data to a different server. Oracle supports nine different incremental backup levels for file system backups. you must be familiar with Mac OS X and/or Windows 2003 and the Oracle database. To use this guide. Files are backed up whether or not they have changed since the last backup.2 database server from a database backup created within the previous seven days.

During the Oracle Jobs installation. Open the Command Prompt. The following formula can be used to adjust the flash recovery area: 100GB + ([Remaining free hard drive space on the flash recovery drive ] X 80%) For example. Flash Recovery Area PowerSchool is installed with a default limit of 100GB of backup space. which determine who receives notification that the backup has completed. perform the following procedure. The location is dependent on how many drives were selected during the initial Oracle installation. the email parameters are entered.2 is complete. this value may need to be increased. Enter sqlplus / as sysdba Backup and Restore Setup 2 . Mac • /u03/oradata/flash_recovery_area/ How to Change the Flash Recovery Area Size To change the flash recovery area size.2 Installation Guide on the PowerSchool Customer Support Web site. there is 600GB of hard drive space left. resulting in server downtime and the need for PowerSchool Support intervention. the flash recovery area should be set to 580GB: 100GB + (600GB X . The oradata directory may be located on multiple drives. After migration to PowerSchool 5. after PowerSchool is installed. Based on the above calculation.Oracle Database Backup and Restore Guide Backup and Restore Setup Backups are automatically set and configured during the Oracle Jobs installation process. There are some configuration options that you can change to meet your needs. it is recommended that the flash recovery area limit be adjusted while considering overhead for the operating system and other processes. Note: If you do not perform this procedure. but only one of these directories will contain the flash_recovery_area folder. 2. Windows 1. This directory may contain a folder called flash_recovery_area. backup space on the server could reach capacity limit. see the Sybase to Oracle Migration Guide or the PowerSchool 5. Depending on usage of the application and retention policy. For more information.80) = 580GB The flash_recovery_area folder is located in the following directory: Windows • Search the root of all the drives for oradata.

Backup and Restore Setup 3 . Enter UPDATE PS_MGMT. How to Alter Retention for Full and Incremental Backups Windows 1. For example: ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE=580G. Enter Exit. Press Enter/Return. Press Enter/Return. Press Enter/Return. 7. Use the following procedures to alter these backup retention policies. The data that allows you to do this is kept for seven days and takes more storage space than the daily snapshots. 6. Backup Retention Policies By default PowerSchool sets the retention policy for backups to 31 days for full and incremental backups and seven days for flash recovery. Press Enter/Return.RMAN_PROPERTIES SET PROPERTY_VALUE = [X] WHERE PROPERTY_NAME = 'rman_retention_window'. Flash recovery is used to transform your database into what it looked like on a certain day at a specific time. For example: UPDATE PS_MGMT. Open Terminal. Enter Exit. Press Enter/Return. Mac 1. 2. For example: ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE=580G. Full and incremental backups are snapshots of the database taken daily at 1:15 a. Enter ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE=[new_size].m. 4. 7. enter sqlplus / as sysdba 3. 6. (where [new_size] is the size decided on using the formula above). Enter ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE=[new_size]. Enter sudo su – oracle 3. Press Enter/Return.RMAN_PROPERTIES SET PROPERTY_VALUE = 7 WHERE PROPERTY_NAME = 'RMAN_RETENTION_WINDOW'.Oracle Database Backup and Restore Guide 3. 5. Enter sqlplus / as sysdba 5. (where [new_size] is the size decided on using the formula above). where [X] is the number of days you would like to retain your daily backups. 8. 2. To log into SQLPLUS. 4. Press Enter/Return. Open the Command Prompt. 4.

Press Enter/Return. 7. Press Enter/Return. Open Terminal. Open the Command Prompt. 8. Press Enter/Return. Enter sudo su – oracle. 2. Press Enter/Return. Enter sqlplus / as sysdba 3. Enter ALTER SYSTEM SET DB_FLASHBACK_RETENTION_TARGET=[X]. enter sqlplus / as sysdba 5. Open Terminal. Enter Exit. 7. 3.RMAN_PROPERTIES SET PROPERTY_VALUE = [X] WHERE PROPERTY_NAME = 'rman_retention_window'. Enter sqlplus / as sysdba 5. Press Enter/Return. 6. 4. 3.rman_properties set property_value = 7 where property_name = 'rman_retention_window'. 6. Mac 1. Press Enter/Return. How to Alter Retention for Flashback Recovery Windows 1. Enter Exit. 6. flash Backup and Restore Setup 4 . 2. Press Enter/Return. ALTER SYSTEM SET DB_FLASHBACK_RETENTION_TARGET=4320.Oracle Database Backup and Restore Guide 5. To log into SQLPLUS. Press Enter/Return. where [X] is the number of days you would like to retain your daily backups. 6. The default is 10080 minutes. or 7 days. Press Enter/Return. For example. 4. Enter sudo su – oracle. Mac 1. Enter Exit. 2. 4. 5. where [X] is the number of minutes you would like to retain your moment in time. Press Enter/Return. Enter UPDATE PS_MGMT. For example. 7. Update ps_mgmt. where [X] is the number of minutes you would like to retain your moment in time. flash recovery area. Enter ALTER SYSTEM SET DB_FLASHBACK_RETENTION_TARGET=[X].

Enter Exit. Press Enter/Return. 7.Oracle Database Backup and Restore Guide recovery area. Backup and Restore Setup 5 . or 7 days. The default is 10080 minutes. ALTER SYSTEM SET DB_FLASHBACK_RETENTION_TARGET=4320. For example. 8.

The Oracle scheduler executes the backup scripts. which means that backups can be recovered up to 31 days in the past. possible data corruption can occur within Oracle tablespaces (datafiles) resulting in the need for server downtime while PowerSchool Technical Support repairs the database or recovers a backup from before the incident occurred. a snapshot is taken of archive (redo) logs. which allows the database to be fully restored to any point in time. and will backup all data changed since the most recent full backup. An incremental backup runs nightly at 1:15 a. Important: If other Oracle related files are backed up while PowerSchool and Oracle are online.Oracle Database Backup and Restore Guide Backup Process A full backup is performed automatically every Saturday at 1:15 a. The following tables list the directory locations for backing up Oracle data: Backup Process 6 . Note: The steps outlined in this document address recoveries that require data from the past seven days. flash recovery logs and the weekly and nightly backups that occur at 1 a. are created while PowerSchool is not running and not accessible. All files can be backed up in offline status. • Offline backups. • Online backups are created while PowerSchool is running and accessible. With both PowerSchool and Oracle not running. With PowerSchool and Oracle running there are several directories to backup to assure recovery in the event of disaster. every morning. When generating offline or online backups. Oracle keeps a running log. There are several ways to back up PowerSchool’s associated database files. Pearson recommends moving a copy of the backup to a separate physical location such as an establishment that specializes in media storage.m. it is recommended that you move the backups from the nightly volume to a separate storage area in case of a disaster. there are several directories to backup.m. The default recovery span is 31 days. An email notifies the designated administrator that a backup is completed and directs the administrator to check the log output. The Flash recovery area location is based on the database layout configured during installation. By backing up these directories. For more information. Log files are available in the Flash recovery area. These directories are locked while Oracle is running and the operating system does not allow them to be backed up. see the Database Layout section of the PowerSchool Installation Guide or the Sybase to Oracle Migration Guide on the PowerSchool Customer Support Web site. or “cold backups”.m. Any recoveries older than seven days may require PowerSchool Technical Support’s intervention.

1. open the Command Prompt. Check the RMAN output log for any errors: • Windows: [Oracle binaries drive]\oracle\scripts\[SID]\backup\rmanlog.sh 3.0/db_1/network/admin /u01/app/oracle/product/10.2. Online Backup Online Backup • • • • • • How To Manually Perform a Full Backup 1.0\db_1\database oradata\flash_recovery_area\[SID]\backupset oradata\flash_recovery_area\[SID] Note: [SID] is the SID entered during the Oracle installation (commonly and by default PSPRODDB). On Mac.bat Mac: Log in to Oracle using the following command: sudo su – oracle Press Enter/Return.1.log 7 • Backup Process . Enter the following command: /Users/oracle/scripts/[SID]/backup/ps_weekly_backup. 2. 4. On Windows.Oracle Database Backup and Restore Guide Windows Directory Location oracle\product\10. Press Enter/Return. Enter the following: • Windows: [Oracle binaries drive]\oracle\scripts\[SID]\backup\ps_weekly_backup. open Terminal.0\db_1\network\admin oracle\product\10.0/db_1/dbs /u03/oradata/flash_recovery_area/[SID]/backupset /u03/oradata/flash_recovery_area/[SID] Note: [SID] is the SID entered during the Oracle installation (commonly and by default PSPRODDB). Mac Directory Location /u01/app/oracle/product/10.2. Use the following procedure to manually perform a backup of the database.

log Backup Process 8 .Oracle Database Backup and Restore Guide • Mac: [Oracle binaries volume]/oracle/scripts/[SID]/backup/rmanlog.

4. Mac 1. Open Terminal. Enter sudo su – oracle. perform the first part of the Restore process to make a backup of any existing databases. 2. Open the Command Prompt. To remedy an accidental erasure of the database. To import a backup to a test server (for example. Press Enter/Return. Enter cd scripts. a test server). 5. perform the procedure How to Restore and Recover to a Different Server. Be sure you have a full backup before running any restore and recovery scenarios. 3. 2. which is a set of features for simple data recovery. Enter FlashbackToTime. See How To Manually Perform a Full Backup for more information. 7. where [drive] is the drive on which the Oracle binaries are installed. Restore and Recovery Scenarios To recover to a specific date and time from the previous seven days. Enter [drive]:. Restore and Recovery 9 . Press Enter/Return.bat [SID] yyyy-mm-dd hh:mm:ss where [SID] is the SID entered during the Oracle installation (commonly and by default PSPRODDB) and yyyy-mm-dd hh:mm:ss is the exact date and time you want to restore to. Backups retained from the previous seven-day period allow restoration from anytime within that time period.Oracle Database Backup and Restore Guide Restore and Recovery The database restoration process is a user-initiated process utilizing Flashback. 6. contact PowerSchool Technical Support. Press Enter/Return. How to Restore and Recover from a Specific Backup Date and Time Windows 1. 5. 3. Press Enter/Return. Enter cd \oracle\scripts. It is also possible to restore the backup onto a different computer running PowerSchool 5. For all other recovery scenarios. Press Enter/Return. 4.2. perform the procedure How to Restore and Recover from a Specific Backup Date and Time.

sh [SID] yyyy-mm-dd hh:mm:ss where [SID] is the SID entered during the Oracle installation (commonly and by default PSPRODDB) and yyyy-mm-dd hh:mm:ss is the exact date and time you want to restore to. Remove any existing data on your test server. execute the DBPasswordUtil-DBNode script.1 to be used with a post 5./FlashbackToTime. some additional steps are required to prevent database lockout.1 release. After restoring the backup. Press Enter/Return.bat [drive]:\oracle\scripts\Import. Remove previous server information.bat [drive]:\oracle\scripts\DropSchema. Enter . available on the database server in the following directory: 10 Restore and Recovery . the scripts are located in the Oracle user’s home directory.sh /Users/oracle/scripts/DropSchema. Restore and Recovery to a Test Server Restoration and recovery of the database to a test server requires the use of Oracle’s data pump technology. These scripts are located on the same drive on which the Oracle binaries are installed (Drive 1 or Volume 1). Windows • • • Mac • • • /Users/oracle/scripts/Export. Preventing Database Lockout When Restoring Older Backups When restoring a database backup created prior to PowerSchool version 5. The three scripts listed below are included in the Oracle installer to simplify the import and export process. Import data into your test server. On a Mac.sh /Users/oracle/scripts/Import. • • Run the latest PowerSchool Database Jobs Installer (available on PowerSource). which is necessary when importing into an Oracle database with an existing dataset. The following steps are used to create a test server: • • • • • Export data from your production server. 7.bat Two of the scripts execute the export or import of data.2. The DropSchema script deletes existing schema.Oracle Database Backup and Restore Guide 6. Modify the PS user password (if applicable).2.sh [drive]:\oracle\scripts\Export.

1.properties files on the server.C:\Program Files\PowerSchool Database Tools Mac . 5. a generic error stating that PowerSchool cannot connect to the database appears.props or powerschool-config. Enter a new password when prompted.Applications\PowerSchool Database Tools Enter the current PowerSchool database user password when prompted. 9. delete any usernames or passwords listed in these files. or enter the same password again. Data Pump Directory The scripts rely on the data pump directory. and repeat the How to Unlock the Database procedure. Execute the DBPasswordUtil-DBNode script. 4. Press Enter. The following procedure is used to unlock the database. Press Enter. 2. There are several reasons why this error occurs. and the import script automatically looks for files to import in that same directory. The export script automatically exports files to the data pump directory. 6.Oracle Database Backup and Restore Guide o o • • Windows . Restore and Recovery 11 . on the command prompt type sqlplus /@PSPRODDB as sysdba Note: If you used a Database SID other than PSPRODDB. 3. How to Unlock the Database If you have been locked out of the database. Type Alter user PS_MGMT account unlock. If one drive was selected for the database installation. On the command prompt type Alter user PS account unlock. type gen to generate a random password. the data pump directory is located on the second drive in the same path listed above. Type exit 7. the directory is located on that drive in the following directory: • [drive]:\oradata\PSPRODDB\data_pump_dir If two or more drives were selected for the database installation. On the database server. The data pump directory is found in the following locations: Windows The drive location is dependent on the database layout selected during installation. Enter the password when prompted. locate the serverconfig. You are now logged into Oracle using local authentication. Note: If database is still locked when PowerSchool is launched. substitute it in the above command. Press Enter. 8.

Oracle Database Backup and Restore Guide Mac The volume location is dependent on the database layout selected during installation. On the test server. see Knowledgebase Article 5919: Stop and Start Tomcat on the PowerSchool Customer Support Web site. open the Command Prompt and enter [drive]:. 7. For more information. where [drive] is the drive on which the Oracle binaries are installed. On the server that contains the latest backup. 9.bat [SID] and press Enter/Return. Note: For more information. Enter cd \oracle\scripts. [Filename] is the name you provide for the file that includes the export dataset. 13. stop Tomcat and the PowerSchool application. start Tomcat and the PowerSchool application. the directory is located on that volume in the following directory: • [volume]:/u02/oradata/PSPRODDB/data_pump_dir If two or more volumes were selected for the database installation. Enter Export. Copy the export file and paste it to [drive]:\oradata\[SID]\data_pump_dir on the other server. If this is the first time a PowerSchool database is installed. Navigate to [drive]:\oradata\[SID]\data_pump_dir. On the test server. 17. Enter [drive]:. 16. Restore and Recovery 12 . For more information. see Data Pump Directory. How to Restore and Recover to a Different Server Windows 1. If one volume was selected for the database installation. Press Enter/Return. 6. 18. Press Enter/Return. 5. 8. 11. 10. Enter Import. Press Enter/Return. 12. enter DropSchema. Press Enter/Return. where [SID] is the SID entered during the Oracle installation (commonly and by default PSPRODDB). 3.bat [SID] [Filename]. Press Enter/Return. Enter cd \oracle\scripts. On the test server.bat [SID] [Filename]. continue to the next step. 4. 2. where [drive] is the drive on which the Oracle binaries are installed. open the Command Prompt. The filename can be anything you choose in any format. see Knowledgebase Article 5919: Stop and Start Tomcat on the PowerSchool Customer Support Web site. 15. the data pump directory is located on the second volume in the same path listed above. If this server currently has a PowerSchool database installed. 14. Press Enter/Return.

On the test server. 17. The filename is the name you provide for the file that includes the export dataset. 4.Oracle Database Backup and Restore Guide 19. see Knowledgebase Article 5919: Stop and Start Tomcat on the PowerSchool Customer Support Web site. Press Enter/Return. Enter . Press Enter/Return. the production server information is stored within two tables in the database. Press Enter/Return. 6. Navigate to /u02/oradata/[SID]/data_pump_dir. stop Tomcat and the PowerSchool application. If this server currently has a PowerSchool database installed. Removing Previous Server Information When using a datapump to restore data to a test server. 18. enter . continue to the next step. Reinstall Oracle Jobs. Enter sudo su – oracle. 16. Note: SID is the name of the Oracle instance on the server. 10. For more information. To allow the new server to be recognized and configured correctly. On the test server. 7. This procedure should only be completed on the server on which the data has just be recovered. start Tomcat and the PowerSchool application. 12. 8. For more information. Press Enter/Return. 13. Restore and Recovery 13 . Enter cd scripts. Note: For more information.sh [SID] [Filename].sh [SID] and press Enter/Return. see Data Pump Directory. 14. On the test server. 15. 5. Mac 1. Copy the export file and paste it to /u02/oradata/[SID]/data_pump_dir on the other server. On the server that contains the latest backup. Press Enter/Return. Enter cd scripts.sh [SID] [Filename]. Enter . 2. Press Enter/Return. 9./Export. Note: Do not use this procedure on an existing server that must remain online running the same data set. 3./DropSchema. complete the following procedure prior to starting PowerSchool. 19. open Terminal. If this is the first time a PowerSchool database is installed. 11. open Terminal and enter sudo su – oracle. in most cases it is PSDRODDB. see Knowledgebase Article 5919: Stop and Start Tomcat on the PowerSchool Customer Support Web site./Import. Reinstall Oracle Jobs.

perform the following procedure to modify the password on the test server. Press Enter/Return. When you launch PowerSchool for the first time. 4.server_config. Press Enter/Return. 4.server_config. Enter truncate table ps. navigate to the System > System Settings > Server Settings page and enter values that mimic your production server. 11. Enter sqlplus / as sysdba 7. Open Terminal. If the default passwords were selected on both test and production servers. Enter sqlplus / as sysdba 3. Click Submit. Modifying Oracle User Permissions During the creation of a test server. the DropSchema process removes the PS user from the database. Enter Exit These settings will be recreated the first time you launch PowerSchool on your test server. Open a Command prompt. 7. Enter the password for the admin account you are using. then restart PowerSchool. Press Enter/Return. 9. 6. 6. Press Enter/Return. Enter truncate table ps. 2.server_instance. Ensure that the PowerTeacher gradebook settings at the bottom of the page match the address of your test server. Press Enter/Return. 9. Enter sudo su – oracle 3. 2. 10. 5. Enter truncate table ps. 8. Enter Exit Mac 1. Restore and Recovery 14 . The Import process recreates it using the information from the production server. Enter truncate table ps. Press Enter/Return. Press Enter/Return. Press Enter/Return. do not perform this procedure. Press Enter/Return. 8. If the PS password set during the installation of Oracle is different than the one existing on the test server. 5. 12.Oracle Database Backup and Restore Guide How to Remove Previous Server Information on a Test Server Windows 1.server_instance.

Open the Command Prompt. where [username] is the name of the user you are changing and [password] is the password you are changing it to. 4. Mac 1. Press Enter/Return. Open Terminal. Press Enter/Return. Enter sqlplus / as sysdba 5. Press Enter/Return. 5. Press Enter/Return. 3. ALTER USER PS identified by PS_SUPPORT. Enter ALTER USER [username] identified by [password]. 2.Oracle Database Backup and Restore Guide Windows 1. 4. 8. Press Enter/Return. Press Enter/Return. Enter Exit. Enter Exit 7. ALTER USER PS identified by PS_SUPPORT. Restore and Recovery 15 . 7. For example. where [username] is the name of the user you are changing and [password] is the password you are changing it to. 6. Enter sqlplus / as sysdba 3. 2. 6. Enter sudo su – oracle. For example. Enter ALTER USER [username] identified by [password].

www.PearsonSchoolSystems.com .

Sign up to vote on this title
UsefulNot useful