5 Replies Latest reply on Nov 10, 2009 1:56 PM by 558383

    unknown command

    729731
      Hi,

      I've installed 10g XE on a winxp computer locally, to test things before using them on production DB, which is 10g EE. When I try to import data with imp command at command line, I get error: unknown command.

      Variables seem to be OK as far as I know.

      User varialble Oracle_home:
      C:\oraclexe\app\oracle\product\10.2.0\server
      Environment variable PATH:
      C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\oracle\product\10.2.0\client_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SystemRoot%\system32\nls;%SystemRoot%\system32\nls\ENGLISH;C:\Program\Novell\ZENworks\;C:\Program\QuickTime\QTSystem\

      Path is correct and I''ve checked that both imp.exe and exp.exe reside in the bin catalogue.

      I've tested connecting both as 'gisuser' and sysdba with the same results.

      Gratefull for any ideas about what can be wrong.

      Eija
        • 1. Re: unknown command
          558383
          Under Windows imp.exe is a Windows executable and not a SQL statement: please run it from cmd.exe command line.
          • 2. Re: unknown command
            Damir Vadas
            Hi!

            Find full path "app\oracle\product\10.2.0\server\BIN\" should be part of path ...where your installation resides...
            If I do remember well, default path is:
            c:\oracle_xe\app\oracle\product\10.2.0\server\BIN\

            in that dir you should find exp.exe and imp.exe files.

            So try (for previous example):
            c:\oracle_xe\app\oracle\product\10.2.0\server\BIN\exp.exe --help
            c:\oracle_xe\app\oracle\product\10.2.0\server\BIN\imp.exe --help

            If you do not get the result then something with your XE installation is wrong...

            Also check from your "10gEE" :
            select * from v$version;
            Here is the result of XE:
            SQL> select * from v$version;

            BANNER
            ----------------------------------------------------------------
            Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
            PL/SQL Release 10.2.0.1.0 - Production
            CORE    10.2.0.1.0      Production
            TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
            NLSRTL Version 10.2.0.1.0 - Production
            SQL>
            As you can see XE is 10.2.0.1 and only this version and lower may be imported into XE. If your 10gEE is higher then this (i.e. 10.2.0.2) then there is not possible to import into XE!

            Hope this helps,

            Damir Vadas
            http://damir-vadas.blogspot.com/
            • 3. Re: unknown command
              558383
              Are you sure that you cannot import from 10.2.0.2 into XE ?

              I have made the following test from 10.2.0.4 Entreprise Edition in 10.2.0.1 XE on Windows XP Pro. Source schema SCOTT has 1 table and is successfully imported from 10.2.0.4 into XE:
              D:\>d:\oracle\product\server\102\bin\expdp scott/tiger schemas=scott dumpfile=scott.dp directory=
              data_pump_dir
              
              Export: Release 10.2.0.4.0 - Production on Tuesday, 10 November, 2009 14:05:33
              
              Copyright (c) 2003, 2007, Oracle.  All rights reserved.
              
              Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
              With the Partitioning, OLAP, Data Mining and Real Application Testing options
              Starting "SCOTT"."SYS_EXPORT_SCHEMA_01":  scott/******** schemas=scott dumpfile=scott.dp directory=data_pump_dir
              Estimate in progress using BLOCKS method...
              Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
              Total estimation using BLOCKS method: 128 KB
              Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
              Processing object type SCHEMA_EXPORT/TABLE/TABLE
              Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
              Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
              Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
              Processing object type SCHEMA_EXPORT/TABLE/COMMENT
              . . exported "SCOTT"."T"                                 39.30 KB    4418 rows
              Master table "SCOTT"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
              ******************************************************************************
              Dump file set for SCOTT.SYS_EXPORT_SCHEMA_01 is:
                D:\ORACLE\PRODUCT\SERVER\ADMIN\10G\DPDUMP\SCOTT.DP
              Job "SCOTT"."SYS_EXPORT_SCHEMA_01" successfully completed at 14:05:47
              
              
              D:\>c:\oraclexe\app\oracle\product\10.2.0\server\bin\impdp.exe hr/hr schemas=scott remap_schema=scott:hr directory=dir10204 dumpfile=scott.dp
              
              Import: Release 10.2.0.1.0 - Production on Tuesday, 10 November, 2009 14:14:26
              
              Copyright (c) 2003, 2005, Oracle.  All rights reserved.
              
              Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
              Master table "HR"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
              Starting "HR"."SYS_IMPORT_SCHEMA_01":  hr/******** schemas=scott remap_schema=scott:hr directory=dir10204 dumpfile=scott.dp
              Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
              Processing object type SCHEMA_EXPORT/TABLE/TABLE
              Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
              . . imported "HR"."T"                                    39.30 KB    4418 rows
              Job "HR"."SYS_IMPORT_SCHEMA_01" successfully completed at 14:14:32
              • 4. Re: unknown command
                Damir Vadas
                P. Forstmann ,

                Yes I'm pretty sure that you cannot import higher database version into lower-whole database!

                If you import one object (or schema that has some objects), this depend are those objects supported in lower version or not. There are case that you can.

                But generally this is not supported!
                I really think that it is out of scope scenarios "what if" if this scenario is clearly explained on Metalink official documentation, where SUPPORT and CERTIFICATION are really important and basic terms for all of us who want to live with Oracle in a suggested way.

                Hope this helps,

                Damir Vadas
                http://damir-vadas.blogspot.com/

                P.S.
                I was in one situation editing dump file...but this was not a normal one and...have success! Would you recommended that as normal procedure. From your point of view "Yes"...I agree but write what are requirements for that action (like yours import)....
                ;-)
                • 5. Re: unknown command
                  558383
                  I agree that you can find cases where data pump import/export will fail from EE (Enterprise Edition) to XE because some objects depends on options or features of EE features not available on XE.

                  However if you use XE compatible features in source EE database, it should work in my opinion. But as far as XE is concerned, I don't think you would find a lot on documentation on Metalink since Oracle XE is not supported by Oracle like Standard Edition or Entreprise Edition: from Oracle® Database Express Edition Licensing Information
                  10g Release 2 (10.2) http://download.oracle.com/docs/cd/B25329_01/doc/license.102/b25456/toc.htm

                  >
                  No Technical Support

                  Our technical support organization will not provide technical support, phone support, or updates to you for the programs licensed under this agreement.
                  >

                  Edited by: P. Forstmann on 10 nov. 2009 14:54

                  Edited by: P. Forstmann on 10 nov. 2009 14:55