10 Replies Latest reply: Feb 11, 2013 3:53 PM by phaeus RSS

    exp error

    937454
      Hi,
      My db version: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
      Whe I try to export some tables, I get an error.
      Here is the command and error:
      exp USERID=username/password OWNER=username FILE=gdstbls02112013.dmp LOG=gdstbls02112013.log TABLES=(gds_a, gds_b)
      
      error:
      -bash: syntax error near unexpected token `('
      The error looks straightforward, so I tried with a single table as below, so I got another error:
      exp USERID=username/password OWNER=username FILE=gdstbls02112013.dmp LOG=gdstbls02112013.log TABLES=gds_a
      
      error:
      Export: Release 11.2.0.1.0 - Production on Mon Feb 11 16:07:49 2013
      
      Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
      
      
      Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
      With the Partitioning, OLAP, Data Mining and Real Application Testing options
      EXP-00026: conflicting modes specified
      EXP-00000: Export terminated unsuccessfully
      Please advice. Also, for test reasons I tried with a single table. But I have 20 to 30 tables to export.
        • 1. Re: exp error
          phaeus
          Hello,
          try to only use tables and not the owner parameter.
          oracle@vmsvrocm01 ~]$ exp userid=system file=test.dmp log=test.log tables=hr.test3
          
          Export: Release 11.2.0.2.0 - Production on Mon Feb 11 22:26:33 2013
          
          Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
          
          Password: 
          
          Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
          Export done in US7ASCII character set and AL16UTF16 NCHAR character set
          server uses AL32UTF8 character set (possible charset conversion)
          
          About to export specified tables via Conventional Path ...
          Current user changed to HR
          . . exporting table                          TEST3      65536 rows exported
          EXP-00091: Exporting questionable statistics.
          Export terminated successfully with warnings.
          [oracle@vmsvrocm01 ~]$ 
          regards
          Peter
          • 2. Re: exp error
            jgarry
            You may need a backslash before the parentheses to keep the shell from trying to interpret it as a subcommand.
            • 3. Re: exp error
              937454
              still error:
              Oracle@linux-l9ax:~/gds> exp USERID=username/password FILE=gdstbls02112013.dmp LOG=gdstbls02112013.log TABLES=(gds_a, gds_b)
              -bash: syntax error near unexpected token `('
              with single table it works:
              Oracle@linux-l9ax:~/gds> exp USERID=username/password FILE=gdstbls02112013.dmp LOG=gdstbls02112013.log TABLES=gds_a
              Export: Release 11.2.0.1.0 - Production on Mon Feb 11 16:24:06 2013
              
              Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
              
              
              Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
              With the Partitioning, OLAP, Data Mining and Real Application Testing options
              Export done in US7ASCII character set and AL16UTF16 NCHAR character set
              server uses WE8MSWIN1252 character set (possible charset conversion)
              
              About to export specified tables via Conventional Path ...
              . . exporting table            GDS_A         24 rows exported
              EXP-00091: Exporting questionable statistics.
              EXP-00091: Exporting questionable statistics.
              Export terminated successfully with warnings.
              How can I make it work all tables, I mean using a single command?
              • 4. Re: exp error
                937454
                Oracle@linux-l9ax:~/gds> exp USERID=username/password FILE=gdstbls02112013.dmp LOG=gdstbls02112013.log TABLES=\(gds_a, gds_b)
                -bash: syntax error near unexpected token `)'
                Oracle@linux-l9ax:~/gds> exp USERID=username/password FILE=gdstbls02112013.dmp LOG=gdstbls02112013.log TABLES=/(gds_a, gds_b)
                -bash: syntax error near unexpected token `('
                tried with both slashes, still error.
                • 5. Re: exp error
                  phaeus
                  Hello,
                  try it like in my example (both is esacped).
                  [oracle@vmsvrocm01 ~]$ exp userid=system file=test.dmp log=test.log tables=\(hr.test3,hr.exp_test\)
                  
                  Export: Release 11.2.0.2.0 - Production on Mon Feb 11 22:44:59 2013
                  
                  Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
                  
                  Password: 
                  
                  Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
                  Export done in US7ASCII character set and AL16UTF16 NCHAR character set
                  server uses AL32UTF8 character set (possible charset conversion)
                  
                  About to export specified tables via Conventional Path ...
                  Current user changed to HR
                  . . exporting table                          TEST3      65536 rows exported
                  EXP-00091: Exporting questionable statistics.
                  . . exporting table                       EXP_TEST      65536 rows exported
                  Export terminated successfully with warnings.
                  regards
                  Peter
                  • 6. Re: exp error
                    JohnWatson
                    c:\users\john\home>
                    c:\users\john\home>exp userid=system/oracle file=tabs.dmp tables=scott.emp,scott.dept
                    
                    Export: Release 11.2.0.3.0 - Production on Mon Feb 11 21:46:28 2013
                    
                    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
                    
                    
                    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
                    With the Partitioning, Oracle Label Security, OLAP, Data Mining,
                    Oracle Database Vault and Real Application Testing options
                    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
                    server uses AL32UTF8 character set (possible charset conversion)
                    
                    About to export specified tables via Conventional Path ...
                    Current user changed to SCOTT
                    . . exporting table                            EMP         14 rows exported
                    EXP-00091: Exporting questionable statistics.
                    EXP-00091: Exporting questionable statistics.
                    . . exporting table                           DEPT          4 rows exported
                    EXP-00091: Exporting questionable statistics.
                    EXP-00091: Exporting questionable statistics.
                    Export terminated successfully with warnings.
                    
                    c:\users\john\home>
                    • 7. Re: exp error
                      937454
                      it works!!!
                      Oracle@linux-l9ax:~/gds> exp USERID=username/password FILE=gdstbls02112013.dmp LOG=gdstbls02112013.log TABLES=\(gds_a, gds_b\)
                      
                      Export: Release 11.2.0.1.0 - Production on Mon Feb 11 16:38:07 2013
                      
                      Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
                      
                      
                      Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
                      With the Partitioning, OLAP, Data Mining and Real Application Testing options
                      Export done in US7ASCII character set and AL16UTF16 NCHAR character set
                      server uses WE8MSWIN1252 character set (possible charset conversion)
                      
                      About to export specified tables via Conventional Path ...
                      . . exporting table            GDS_A         24 rows exported
                      EXP-00091: Exporting questionable statistics.
                      EXP-00091: Exporting questionable statistics.
                      . . exporting table             GDS_B       192 rows exported
                      EXP-00091: Exporting questionable statistics.
                      EXP-00091: Exporting questionable statistics.
                      Export terminated successfully with warnings.
                      Thank you for resolving the problem.
                      What is the purpose of the backslashes.
                      • 8. Re: exp error
                        phaeus
                        Hello,
                        the backslash is needed to tell your shell to interpret your commands as it is and not to let the shell transform it before executing.

                        regards
                        Peter
                        • 9. Re: exp error
                          937454
                          Thank you versy much, your approach also worked!!
                          Oracle@linux-l9ax:~/gds> exp USERID=gds/password FILE=gdstbls02112013.dmp LOG=gdstbls02112013.log TABLES=gds.gds_a, gds.gds_b
                          Export: Release 11.2.0.1.0 - Production on Mon Feb 11 16:42:00 2013
                          
                          Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
                          
                          
                          Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
                          With the Partitioning, OLAP, Data Mining and Real Application Testing options
                          Export done in US7ASCII character set and AL16UTF16 NCHAR character set
                          server uses WE8MSWIN1252 character set (possible charset conversion)
                          
                          About to export specified tables via Conventional Path ...
                          . . exporting table            GDS_A         24 rows exported
                          EXP-00091: Exporting questionable statistics.
                          EXP-00091: Exporting questionable statistics.
                          . . exporting table             GDS_        192 rows exported
                          EXP-00091: Exporting questionable statistics.
                          EXP-00091: Exporting questionable statistics.
                          Export terminated successfully with warnings.
                          • 10. Re: exp error
                            937454
                            Thank you guys, I did too much research and finally came here to get the answer in 10 mins :). Anyways, I dont regret it.