1

Setup:

Problem:

After installation I do /etc/init.d/oracle-xe configure all default values. All went well.

And what comes next?

I have to import db.dmp.

But there isn't any db mounted.

So I tried createdb.sh from /u01/app/oracle/product/11.2.0/xe/config/scripts

It goes well.

Next I execute sqls that creates scheme.

Next I would like to import dump file. But the impdp \"/ as sysdba\" schemas=DBV remap_schema=DBV:application directory=DATA_PUMP_DIR dumpfile=db.dmp logfile=db-import-$(date +%d-%b-%H_%M).log EXCLUDE=ROLE_GRANT reports the following:

UDI-01034: operation generated ORACLE error 1034
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
UDI-00003: all allowable logon attempts failed

When I execute createdb.sh and then startdb.sh impdp reports:

Import: Release 11.2.0.2.0 - Production on So Lut 23 17:55:32 2019

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
ORA-39006: internal error
ORA-39213: Metadata processing is not available

I can connect to DB via sqldeveloper. The dump file is verified to be working.

My question is, what steps should I take after installation with dkpg to create empty oracle-xe db ready to use and import dumps?

Below I provide outputs for some commands suggested in comments:

$ ps -ef | grep smon
oracle   16930  2196  0 17:04 ?        00:00:00 xe_smon_XE
oracle   18847 14970  0 17:56 pts/0    00:00:00 grep --color=auto smon
$ env | grep ORA
ORACLE_SID=XE
ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
SQL> exec dbms_metadata_util.load_stylesheets;
BEGIN dbms_metadata_util.load_stylesheets; END;

*
ERROR at line 1:
ORA-31609: error loading file "kualter.xsl" from file system directory
"/u01/app/oracle/product/11.2.0/xe/rdbms/xml/xsl"
ORA-06512: at "SYS.DBMS_METADATA_UTIL", line 2397
ORA-06512: at line 1
SQL> Select comp_id, comp_name, version from dba_registry ;

COMP_ID
--------------------------------------------------------------------------------
COMP_NAME
--------------------------------------------------------------------------------
VERSION
--------------------------------------------------------------------------------
XDB
Oracle XML Database
11.2.0.2.0

CONTEXT
Oracle Text
11.2.0.2.0

COMP_ID
--------------------------------------------------------------------------------
COMP_NAME
--------------------------------------------------------------------------------
VERSION
--------------------------------------------------------------------------------

CATALOG
Oracle Database Catalog Views
11.2.0.2.0

CATPROC
Oracle Database Packages and Types

COMP_ID
--------------------------------------------------------------------------------
COMP_NAME
--------------------------------------------------------------------------------
VERSION
--------------------------------------------------------------------------------
11.2.0.2.0
  • 1
    Those are at least 2 different problems. The last issue can be fixed by running exec dbms_metadata_util.load_stylesheets;. – Balazs Papp Feb 24 '19 at 9:16
  • Thank you @BalazsPapp for commenting. The command you provided resolved with error. I have added it at the end of question. – Piotr Dajlido Feb 24 '19 at 11:52
1
  1. Ubuntu is not a supported distribution for running Oracle databases. Just use a supported distribution.

Operating System Requirements

  1. The database should be configured and created with /etc/init.d/oracle-xe configure. If you do not have a working databases after that, that is an environmental issue: use a supported environment.

  2. I had to check and run createdb.sh. It created an incomplete database that gave the same error. Instead of it use the above method for creating the database. If it does not work: use a supported environment.

At this point you can start over and try to get the official steps working by folowing random blog posts and forum comments like above. Maybe it will work if you do not use createdb.sh. Or you can save a lot of time by using a supported environment.

| improve this answer | |
  • Since you are well certified in Ora products maybe you can shed some light on scrips that are placed in bin folder. What they do? how and when to use them ? – Piotr Dajlido Mar 4 '19 at 11:02
  • 1
    @PiotrDajlido Just re-install then run /etc/init.d/oracle-xe configure. That creates your database. Do not run createdb.sh, as that deletes your database then re-creates an incomplete database, that is what happened in my sandbox. I know about those script as much as the readme/documentation/source contains, because they are specific to XE, and in enterprise environments I encounter XE databases about once every 2 years. – Balazs Papp Mar 4 '19 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.