Backup Recovery
Backup Recovery
Backup Recovery
Before upgrading your Palantir instance, backing up your instance is recommended. Please follow the instructions below to backup and restore your palantir oracle schemas.
[oracle]$ expdp palantir_user/password schemas=palantir_user directory=dmp_dir dumpfile=palantir_031707.dmp logfile=palantir_031707.log Export: Release 10.2.0.1.0 - 64bit Production on Saturday, 17 March, 2007 15:15:24 Copyright (c) 2003, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options Starting "PALANTIR_USER"."SYS_EXPORT_SCHEMA_01": palantir_user/**** schemas=palantir_user directory=dmp_dir dumpfile=palantir_031707.dmp logfile=palantir_031707.log Estimate in progress using BLOCKS method... Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA ... Total estimation using BLOCKS method: 14.20 GB ... . . exported "PALANTIR_USER"."PT_DATASOURCE_RECORD" 1.025 GB 10743004 rows . . exported "PALANTIR_USER"."PT_PROPERTY" 384.1 MB 2768318 rows ... This will use 4 workers to export your aci_user schema to the palantir_031707.dmp file in the dmp_dir you setup in the last step.
Once the schema is cleared out, you need to imp the new dump: [oracle]$ impdp palantir_user/password schemas=palantir_user directory=dmp_dir dumpfile=palantir_031707.dmp logfile=imp_palantir_031707.log Import: Release 10.2.0.1.0 - 64bit Production on Saturday, 17 March, 2007 20:26:57 Copyright (c) 2003, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options Master table "PALANTIR_USER"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded Starting "PALANTIR_USER"."SYS_IMPORT_SCHEMA_01": palantir_user/***** schemas=palantir_user directory=dmp_dir dumpfile=palantir_031707.dmp logfile=imp_palantir_031707.log* Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA Processing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC ORA-31684: Object type TYPE:"PALANTIR_USER"."SGYTPCSEL" already exists Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE Processing object type SCHEMA_EXPORT/TABLE/TABLE ORA-39151: Table "PALANTIR_USER"."PLAN_TABLE" exists. All dependent metadata and data will be skipped due to table_exists_action of skip Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA . . imported "PALANTIR_USER"."PT_DATASOURCE" 7.261 GB 638809 rows . . imported "PALANTIR_USER"."PT_MEDIA" 1.688 GB 970442 rows . . imported "PALANTIR_USER"."PT_DATASOURCE_RECORD" 1.025 GB 10743004 rows . . imported "PALANTIR_USER"."PT_PROPERTY" 384.1 MB 2768318 rows ... Some dumps are done as one user and imported as another. If you are not importing as the same user, then you need to explicitly state this by adding the following parameter to your command line: REMAP_SCHEMA=palantir_user:new_user Thus the total command line would look as follows: [oracle]$ impdp palantir_user/password schemas=palantir_user directory=dmp_dir dumpfile=palantir_031707.dmp logfile=imp_palantir_031707.log REMAP_SCHEMA=palantir_user:new_user In addition, if you are switching tablespaces, you'll need to remap tablespaces: REMAP_TABLESPACE=support:users Lastly, always run dbms stats after an imp: [oracle]$ . oraenv ORACLE_SID = oracle ? oracle [oracle]$ sqlplus new_user/password SQL*Plus: Release 10.2.0.1.0 - Production on Sat Feb 17 17:05:17 2007 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options SQL> exec dbms_stats.gather_schema_stats('new_user');