Sie sind auf Seite 1von 9

Europe, Africa and Middle East

Simphony Manual
Data Pump export / import

Simphony Version 2

Simphony Installation Manual Oracle Database Platform


MICROS EAME
Product Management Simphony

Doc version 1.2


Index Europe, Africa and Middle East

Index.................................................................................................................................................................................................... 2
Requirements ................................................................................................................................................................................. 3
Export data out of source database ................................................................................................................................................ 3
Drop all the Micros users in target database .................................................................................................................................. 3
Create table spaces in target database (optional) .......................................................................................................................... 4
Create the users ............................................................................................................................................................................. 4
Create the Data Pump directory in target database ........................................................................................................................ 5
Import the Data Pump file ............................................................................................................................................................... 5
Additional optional steps ................................................................................................................................................................. 6
Appendix 1 ...................................................................................................................................................................................... 7

Simphony Manual
MICROS EAME
Product Management Simphony

Doc version 1.2 2/9


Europe, Africa and Middle East

This document outline the steps to export and restore a Data Pump Oracle 11G export file to another system.

Requirements
Oracle 11g 11.2.0.2.0 or higher
Simphony 2.4 or higher
Simphony system running the same version as the one which was running the exported database
and completely setup with corrected database setup (tablespaces, users, constraints, etc.)
Oracle database (11.2.x) the same version as the one which was running for the exported database
Database on Windows Server 2008 R2 64-Bit
Target database and source database must have the character set AL32UTF8

Export data out of source database


If necessary create directory in source database with SQL-Plus, Open a command line window and enter the
following command:
sqlplus sys/***** as sysdba (Where ***** is the password), this is a sample command for a database running on the
same server, a different command is needed if the database will reside on a different server.
create directory datapump as D:\ backup;

The operating system directory D:\ backup must exist. Open a command line window and enter the following command:

expdp SYSTEM/***** DIRECTORY=datapump DUMPFILE=SB.dmp LOGFILE=SB.log full=y


(Where ***** is the password)

The export file will be created in the operating system directory D:\ backup.

Drop all the Micros users in target database

The commands below will drop all of the micros users available in the database including the related
schemas. Before running this command write down the passwords of these users which are configured for the
receiver machine, we need to enter the passwords when the users will be recreated.
ALL micros services & webservice needs to be stopped otherwise you will get this error message when you try to
drop the users): ORA-01940: cannot drop a user that is currently connected

Open a command line window and enter the following command:


sqlplus sys/***** as sysdba (Where ***** is the password), this is a sample command for a database running on the
same server, a different command is needed if the database will reside on a different server.

Enter this command in sqlplus:

drop user MICROSDB cascade;


drop user PORTALDB cascade;
drop user BIREPOS cascade;
drop user LOCATION_ACTIVITY_DB cascade;
drop user QUARTZ cascade;
drop user COREDB cascade;
drop user RTA cascade;
drop user SA cascade;
drop user MCRSCACHE cascade;
drop user MF_EAME cascade; --(If available)

Simphony Manual
MICROS EAME
Product Management Simphony

Doc version 1.2 3/9


Europe, Africa and Middle East

Create table spaces in target database (optional)

If the tablespaces in the target oracle database doesnt exist, they must be created before the import and the user
creation:

MCRSCACHE
MCRSPOS
PENTAHO
USERS
COREDB
LOCDB
PORTALDB
RTA

Open a command line window and enter the following command:


sqlplus sys/***** as sysdba (Where ***** is the password), this is a sample command for a database running on the
same server, a different command is needed if the database will reside on a different server.
For example, if you use a file system:

create tablespace MCRSCACHE datafile 'd:\oracle\ORADATA\MCRCACHE01.dbf' size 100M autoextend on next 500M
maxsize 30G;

For example, if you use ASM:

create tablespace MCRSCACHE datafile +ORADATA\MCRCACHE01.dbf size 100M autoextend on next 500M maxsize
30G;

Create the users


Create the users see script in appendix 1 (Replace the string ###REPLACE_WITH_PASSWORD### with the right
password). If your system has been set up with different table spaces or different settings as outlined in the Oracle
installation manual, the scripts in appendix 1 need to be adapted.
The users can also be created by the import tool, we prefer to do this manually, see needing a different password as
the one available.

Open a command line window and enter the following command:


sqlplus sys/***** as sysdba (Where ***** is the password), this is a sample command for a database running on the
same server, a different command is needed if the database will reside on a different server.

Simphony Manual
MICROS EAME
Product Management Simphony

Doc version 1.2 4/9


Europe, Africa and Middle East

Create the Data Pump directory in target database

To be able to import or export with Data Pump files, you can use an available directory or create a new one.
Open a command line window and enter the following command:
sqlplus sys/***** as sysdba (Where ***** is the password), this is a sample command for a database running on the
same server, a different command is needed if the database will reside on a different server.

select * from dba_directories;

The output should look like:

OWNER DIRECTORY_NAME
------------------------------ ------------------------------
DIRECTORY_PATH
--------------------------------------------------------------------------------
SYS ORACLE_OCM_CONFIG_DIR
D:\oracle\product\11.2.0\dbhome_1/ccr/state
SYS DATA_PUMP_DIR
D:\oracle/admin/simphony/dpdump/
SYS XMLDIR
c:\ade\aime_dadvfh0169\oracle/rdbms/xml

Create a new folder for the import file, we assume the import file will reside in D:\backup

create directory impdp as 'D:\backup';

Result: Directory created. (D:\impdp)

Login to sqlplus with sysdba


select directory_name, directory_path from dba_directories where directory_name='IMPDP';

if result is : No rows selected then apply the 2 script below:


CREATE OR REPLACE DIRECTORY IMPDP AS 'D:\impdp';
GRANT READ, WRITE ON DIRECTORY IMPDP TO PUBLIC;

Import the Data Pump file


Copy the export file into the directory path for example here D:\backup
Open a command line window and enter the following command:

impdp system/****** directory=impdp dumpfile=FILE_NAME.dmp logfile=FILE_NAME.log


schemas=(microsdb,portaldb,birepos,location_activity_db,quartz,coredb,rta,sa,mcrscache,mf_eame)

(Where ***** is the password), this is a sample command for a database running on the same server, a different
command is needed if the database will reside on a different server. Replace FILE_NAME with the correct file name.

Check the results of the import in the log file, there might be some errors listed, please ignore the errors such as:
ORA-31684: Object type USER:"XY" already exists

Simphony Manual
MICROS EAME
Product Management Simphony

Doc version 1.2 5/9


Europe, Africa and Middle East

Additional optional steps

Recompile all invalid database objects


Open a command line window and enter the following command:
sqlplus sys/***** as sysdba (Where ***** is the password), this is a sample command for a database running on the
same server, a different command is needed if the database will reside on a different server.

@?/rdbms/admin/utlrp;

Calculate new oracle optimizer statistics out of performance reasons:

exec dbms_stats.gather_schema_stats(RTA);
exec dbms_stats.gather_schema_stats(MF_EAME);
exec dbms_stats.gather_schema_stats(COREDB);
exec dbms_stats.gather_schema_stats(PORTALDB);
exec dbms_stats.gather_schema_stats(LOCATION_ACTIVITY_DB);
exec dbms_stats.gather_schema_stats(QUARTZ);
exec dbms_stats.gather_schema_stats(BIREPOS);
exec dbms_stats.gather_schema_stats(MCRSCACHE);
exec dbms_stats.gather_schema_stats(MICROSDB);
exec dbms_stats.gather_schema_stats(SA);

Simphony Manual
MICROS EAME
Product Management Simphony

Doc version 1.2 6/9


Europe, Africa and Middle East

Appendix 1

CREATE USER "MCRSCACHE" PROFILE "DEFAULT" IDENTIFIED BY "###REPLACE_WITH_PASSWORD###"


DEFAULT TABLESPACE "MCRSCACHE"
TEMPORARY TABLESPACE "TEMP"
ACCOUNT UNLOCK;
GRANT ALTER SESSION TO "MCRSCACHE";
GRANT CREATE ANY INDEX TO "MCRSCACHE";
GRANT CREATE ANY PROCEDURE TO "MCRSCACHE";
GRANT CREATE ANY SEQUENCE TO "MCRSCACHE";
GRANT CREATE ANY SYNONYM TO "MCRSCACHE";
GRANT CREATE ANY TABLE TO "MCRSCACHE";
GRANT CREATE ANY TRIGGER TO "MCRSCACHE";
GRANT CREATE ANY TYPE TO "MCRSCACHE";
GRANT CREATE ANY VIEW TO "MCRSCACHE";
GRANT CREATE CLUSTER TO "MCRSCACHE";
GRANT CREATE DATABASE LINK TO "MCRSCACHE";
GRANT CREATE PROCEDURE TO "MCRSCACHE";
GRANT CREATE PUBLIC SYNONYM TO "MCRSCACHE";
GRANT CREATE SEQUENCE TO "MCRSCACHE";
GRANT CREATE SYNONYM TO "MCRSCACHE";
GRANT CREATE TABLE TO "MCRSCACHE";
GRANT CREATE TRIGGER TO "MCRSCACHE";
GRANT CREATE VIEW TO "MCRSCACHE";
GRANT DROP PUBLIC SYNONYM TO "MCRSCACHE";
GRANT UNLIMITED TABLESPACE TO "MCRSCACHE";
GRANT "RESOURCE" TO "MCRSCACHE";
GRANT "CONNECT" TO "MCRSCACHE";

CREATE USER "MICROSDB" PROFILE "DEFAULT" IDENTIFIED BY "###REPLACE_WITH_PASSWORD###"


DEFAULT TABLESPACE "MCRSPOS"
TEMPORARY TABLESPACE "TEMP"
ACCOUNT UNLOCK;
GRANT ALTER SESSION TO "MICROSDB";
GRANT CREATE ANY INDEX TO "MICROSDB";
GRANT CREATE ANY PROCEDURE TO "MICROSDB";
GRANT CREATE ANY SEQUENCE TO "MICROSDB";
GRANT CREATE ANY SYNONYM TO "MICROSDB";
GRANT CREATE ANY TABLE TO "MICROSDB";
GRANT CREATE ANY TRIGGER TO "MICROSDB";
GRANT CREATE ANY TYPE TO "MICROSDB";
GRANT CREATE ANY VIEW TO "MICROSDB";
GRANT CREATE CLUSTER TO "MICROSDB";
GRANT CREATE DATABASE LINK TO "MICROSDB";
GRANT CREATE PROCEDURE TO "MICROSDB";
GRANT CREATE PUBLIC SYNONYM TO "MICROSDB";
GRANT CREATE SEQUENCE TO "MICROSDB";
GRANT CREATE SYNONYM TO "MICROSDB";
GRANT CREATE TABLE TO "MICROSDB";
GRANT CREATE TRIGGER TO "MICROSDB";
GRANT CREATE VIEW TO "MICROSDB";

Simphony Manual
MICROS EAME
Product Management Simphony

Doc version 1.2 7/9


Europe, Africa and Middle East
GRANT DROP PUBLIC SYNONYM TO "MICROSDB";
GRANT UNLIMITED TABLESPACE TO "MICROSDB";
GRANT "RESOURCE" TO "MICROSDB";
GRANT "CONNECT" TO "MICROSDB";

CREATE USER "BIREPOS" PROFILE "DEFAULT" IDENTIFIED BY "###REPLACE_WITH_PASSWORD###"


DEFAULT TABLESPACE "PENTAHO"
TEMPORARY TABLESPACE "TEMP"
ACCOUNT UNLOCK;
GRANT CREATE PROCEDURE TO "BIREPOS";
GRANT CREATE SEQUENCE TO "BIREPOS";
GRANT CREATE SESSION TO "BIREPOS";
GRANT CREATE TABLE TO "BIREPOS";
GRANT CREATE TRIGGER TO "BIREPOS";
GRANT "CONNECT" TO "BIREPOS";

CREATE USER "MF_EAME" PROFILE "DEFAULT" IDENTIFIED BY "###REPLACE_WITH_PASSWORD###" DEFAULT TABLESPACE


"MF_EAME"
DEFAULT TABLESPACE "MF_EAME"
TEMPORARY TABLESPACE "TEMP"
ACCOUNT UNLOCK;
GRANT UNLIMITED TABLESPACE TO "MFEAME";
GRANT "CONNECT" TO "MFEAME";

CREATE USER "QUARTZ" PROFILE "DEFAULT" IDENTIFIED BY "###REPLACE_WITH_PASSWORD###"


DEFAULT TABLESPACE "PENTAHO"
TEMPORARY TABLESPACE "TEMP"
ACCOUNT UNLOCK;
GRANT UNLIMITED TABLESPACE TO "QUARTZ";
GRANT "CONNECT" TO "QUARTZ";
GRANT "DBA" TO "QUARTZ";

CREATE USER "SA" PROFILE "DEFAULT" IDENTIFIED BY "###REPLACE_WITH_PASSWORD###"


DEFAULT TABLESPACE "USERS"
TEMPORARY TABLESPACE "TEMP"
ACCOUNT UNLOCK;
GRANT UNLIMITED TABLESPACE TO "SA";
GRANT "CONNECT" TO "SA";
GRANT "DBA" TO "SA";

CREATE USER "COREDB" PROFILE "DEFAULT" IDENTIFIED BY "###REPLACE_WITH_PASSWORD###"


DEFAULT TABLESPACE "COREDB"
TEMPORARY TABLESPACE "TEMP"
ACCOUNT UNLOCK;
GRANT UNLIMITED TABLESPACE TO "COREDB";
GRANT "CONNECT" TO "COREDB";

CREATE USER "PORTALDB" PROFILE "DEFAULT" IDENTIFIED BY "###REPLACE_WITH_PASSWORD###"


DEFAULT TABLESPACE "PORTALDB"

Simphony Manual
MICROS EAME
Product Management Simphony

Doc version 1.2 8/9


Europe, Africa and Middle East
TEMPORARY TABLESPACE "TEMP"
ACCOUNT UNLOCK;
GRANT UNLIMITED TABLESPACE TO "PORTALDB";
GRANT "CONNECT" TO "PORTALDB";

CREATE USER "LOCATION_ACTIVITY_DB" PROFILE "DEFAULT" IDENTIFIED BY "###REPLACE_WITH_PASSWORD###"


DEFAULT TABLESPACE "LOCDB"
TEMPORARY TABLESPACE "TEMP"
ACCOUNT UNLOCK;
GRANT UNLIMITED TABLESPACE TO "LOCATION_ACTIVITY_DB";
GRANT "CONNECT" TO "LOCATION_ACTIVITY_DB";

CREATE USER "RTA" PROFILE "DEFAULT" IDENTIFIED BY "###REPLACE_WITH_PASSWORD###"


DEFAULT TABLESPACE "RTA"
TEMPORARY TABLESPACE "TEMP"
ACCOUNT UNLOCK;
GRANT UNLIMITED TABLESPACE TO "RTA";
GRANT "CONNECT" TO "RTA";

Copyright

2012 MICROS-FIDELIO GmbH All rights reserved. No part of this publication may be reproduced,
photocopied, stored on a retrieval system, or transmitted without the express prior written consent of
the publisher. MICROS-FIDELIO GmbH retains the right to update or change the contents of this
document without prior notice. MICROS-FIDELIO GmbH assumes no responsibility for the contents of
this document.

SIMPHONY is a trademark of MICROS-FIDELIO GmbH

Disclaimer: This document or any part of it is for the sole purpose of MICROS-FIDELIO GmbH and the
vendor reviewing and following the rules of the Certification Process. It is not intended for Public
distribution in any form and is regulated by a Confidentiality Agreement in place between both parties.

Simphony Manual
MICROS EAME
Product Management Simphony

Doc version 1.2 9/9

Das könnte Ihnen auch gefallen