How to install olaptrain sample schema on oracle 12c?

Posted on

Question :

I need to install the sample schema available from the Oracle website:

I am trying to run the commands as given here:

But I get this error:

ORA-01537: cannot add file 'dm.dbf' - file already part of database

Given below is the copy of the screen:


Session altered.

SQL> @install_olaptrain.sql

Specify file system directory containing this installation program.

Directory: C:UsersAshishDesktopolaptrain_install

Specify a password for the OLAPTRAIN user.

Begin installation
... creating tablespaces
ERROR at line 1:
ORA-01537: cannot add file 'dm.dbf' - file already part of database
ORA-06512: at line 31

How can I resolve this error?

Answer :

The problem is solved after changing the location for datafile in ‘install_olaptrain.sql’, and

changing the ‘ho impdp’ statement to the given below string resolves any login error in Oracle 12c:

ho impdp olaptrain/manager@//localhost:1521/my_pdb dumpfile=OLAPTRAIN12232009.DMP directory=OLAPTRAIN_INSTALL

But then “ORA-06512: at “SYS.UTL_FILE”, line 536″ occurs.

I’ve create the olaptrain user using the script in install_olaptrain.sql with tablespace default users.

Then imported with this string :

impdpd dwhadmin/********@svildwh directory=expdp_dir 
  dumpfile=OLAPTRAIN12232009.DMP logfile=test.log 
  schemas=olaptrain remap_tablespace=DM:USERS  

Import in pluggable database 12c.

All ok.

Leave a Reply

Your email address will not be published. Required fields are marked *