Search This Blog

Showing posts with label EXP. Show all posts
Showing posts with label EXP. Show all posts

Thursday, January 26, 2012

ORA-19206: Invalid value for query or REF CURSOR parameter ORACLE 9i while export

Connected to: Oracle9i Release 9.2.0.4.0 - Production
JServer Release 9.2.0.4.0 - Production
Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user STERLIVE
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user STERLIVE
About to export STERLIVE's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
EXP-00056: ORACLE error 19206 encountered
ORA-19206: Invalid value for query or REF CURSOR parameter
ORA-06512: at "SYS.DBMS_XMLGEN", line 83
ORA-06512: at "SYS.DBMS_METADATA", line 345
ORA-06512: at "SYS.DBMS_METADATA", line 410
ORA-06512: at "SYS.DBMS_METADATA", line 449
ORA-06512: at "SYS.DBMS_METADATA", line 1156
ORA-06512: at "SYS.DBMS_METADATA", line 1141
ORA-06512: at line 1
EXP-00000: Export terminated unsuccessfully

We are receiving the above error message while exporting database in oracle 9i.

Solution: run the catmeta.sql at sys user ($ORACLE_HOME/rdbms/admin/catmeta.sql)

Sunday, October 19, 2008

EXP-00056 + ORA-00932

The following error message i am getting during export operation in 10gr1 on windows platform after apply the cpu october 2008 patch.

EXP-00056: ORACLE error 932 encountered

ORA-00932: inconsistent datatypes: expected BLOB, CLOB got CHAR

When i Search on metalink i found below metalink note: 339938.1

The above problem can be fixed to run the following SQL script as SYSDBA user.

SQL> connect / as sysdba

SQL> @?/rdbms/admin/catmetx.sql

SQL> @?/rdbms/admin/utlrp.sql


Wednesday, February 27, 2008

ORA-600 [qmxtrGetInputOpn1]

Oracle Version: 9.2.0.1
OS: Windows


Error occured during export database
EXP-00056 + ORA-19206
Or
ORA-600 [qmxtrGetInputOpn1]



Please read metalink note: Note:206313.1


Run catmeta.sql script
Located: $ORACLE_HOME/rdbms/admin

Tuesday, February 5, 2008

Email Notification: Export Log Error

Steps

1. Create directory
2. Create table in database for exportlog through external table
3. Create procedure for sent to email or check err msg In exportlog table
4. Create sql script which daily import data from exportlog file to exportlog table.
5. Schedule SQL script to run after export command.


SQL> conn system/oracle
SQL> create directory log as 'c:\log';
SQL> grant read,write on directory LOG to username;

SQL> -- sql script
Create sql script which create exportlog table and import exportlog file to database

DROP TABLE EXPORTLOG;

CREATE TABLE exportlog (msg varchar2(200))
organization external (
type oracle_loader
default directory log
access parameters (
records delimited by newline
)
location ('exportlog.log')
)
reject limit 1000;


exec pro_exportlog;

SQL>-- Create procedure which check error msg in exportlog table and sent email

Procedure: PRO_EXPORTLOG


CREATE OR REPLACE PROCEDURE "SCOTT"."PRO_EXPORTLOG"
AS
SendorAddress Varchar2(30) := 'xxx.xxxx.local';
ReceiverAddress varchar2(30) := 'm.taj@fakhruddin.ae';
EmailServer varchar2(30) := 'xxx.xxxxxx.local';
Port number := 25;
conn UTL_SMTP.CONNECTION;
v_result varchar2(2000);

BEGIN
conn:= utl_smtp.open_connection( EmailServer, Port );
utl_smtp.helo( conn, EmailServer );
utl_smtp.mail( conn, SendorAddress);
utl_smtp.rcpt( conn, ReceiverAddress );
utl_smtp.open_data (conn);
utl_smtp.write_data(conn, chr(13));
utl_smtp.write_data(conn, 'Date: '||TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss' )||chr(13));
utl_smtp.write_data(conn, 'From:'||SendorAddress||chr(13));
utl_smtp.write_data(conn, 'To: '||ReceiverAddress ||chr(13));
utl_smtp.write_data(conn, 'Subject: Mail Through ORACLE Database!' ||chr(13));
utl_smtp.write_data(conn, chr(13));
FOR rec IN (select msg from exportlog
where msg LIKE 'EXP-%'
OR msg LIKE '%ORA-%'
OR msg LIKE '%warning%')
LOOP

v_result := rec.msg;
utl_smtp.write_data( conn,v_result||chr(13) );
END LOOP ;
UTL_SMTP.close_data(conn);
UTL_SMTP.quit(conn);
END;

----------------------------------------------------
4. Create bat file and schedule this sql script


I tested above all and the result:

Date: 05 Feb 08 11:26:24
From:xxx.xxxxx.local
To: m.taj@xxxxxxxx.xx
Subject: Mail Through ORACLE Database!

Export terminated successfully without warnings.
----------------------------------------------------
Date: 05 Feb 08 11:23:47
From:xxxx.xxxxxx.local
To: m.taj@xxxxx.xx
Subject: Mail Through ORACLE Database!

EXP-00011: FGC.YYYYY does not exist
Export terminated successfully with warnings.

Any query or comment are welcome.

Sunday, August 5, 2007

EXP-00002: error in writing to export file

Windows 2000
Oracle 10.1.0.2.0


EXP-00002: error in writing to export file
EXP-00000: Export terminated unsuccessfully




Above message found in our export.log file


clause


EXP-00002: "error in writing to export file"
Cause: Cannot write to export file, usually due to device errors.
Action: This is usually followed by OS device error message. Take
appropriate action to restore the device.




suggestion


Re-export

Saturday, February 10, 2007

Export Tool On Windows

Three special conditions apply when running Export or Import utilities on Windows.
1.default values for BUFFER and RECORDLENGTH parameters are 4 KB and 2 KB respectively. This default RECORDLENGTH parameter does not depend on the value of BUFSIZ defined in the system header file. If you specify a value larger than USHRT_MAX (64 KB), you will get a warning message.
2. the VOLSIZE parameter is not supported.
3. to export an entire database, you must use the EXP_FULL_DATABASE role.

Monday, January 29, 2007

Export Error

1.Export command never export SYS objects.

2.EXP-00014; EXP-00008; ORA-01013;
Suggestion : You have sqlnet.expire_time set in your "sqlnet.ora" file. Removing this parameter,
or
setting it to a period longer than the duration of the export will allow the export to run without error.

3.EXP-00008; ORA-06550; PLS-00201;
Clause : Upgradion process is not done in proper way.
Suggestion : Check upgrade manual doc. dictionary didn't get upgraded.

4.EXP-00056; ORA-31600; ORA-06512;
Suggestion : Run catpatch.sql (ORAHOME/RDBMS/ADMIN)

Saturday, January 27, 2007

exp + date

E:\>echo %date%
01-27-07

E:\>exp scott/tiger file=d:\test_%date% log=d:\test_%date% tables=DEPT

Export: Release 9.0.1.1.1 - Production on Sat Jan 27 10:32:40 2007

(c) Copyright 2001 Oracle Corporation. All rights reserved.


Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
tion
With the Partitioning, OLAP and Data Mining options
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set

About to export specified tables via Conventional Path ...
. . exporting table DEPT 4 rows exported
Export terminated successfully without warnings.

E:\>d:

D:\>dir
Volume in drive D has no label.
Volume Serial Number is 54DF-1372

Directory of D:\

01-27-07 10:32 AM 6,144 test_01-27-07.DMP
01-27-07 10:32 AM 407 test_01-27-07.LOG
Note : We can edit default date format >>>start ---> control panel--->Regional and language option.
------------------------------------------------------------------------------
SQL> column today new_val dt
SQL> select to_char(sysdate,'ddmmyy') today from dual;

TODAY
------
270107

SQL> host exp userid=scott/tiger tables=emp file=d:\test_&dt..dmp log=d:\test_&d
t..log

Export: Release 9.0.1.1.1 - Production on Sat Jan 27 10:40:08 2007

(c) Copyright 2001 Oracle Corporation. All rights reserved.


Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
tion
With the Partitioning, OLAP and Data Mining options
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set

About to export specified tables via Conventional Path ...
. . exporting table EMP 14 rows exported
Export terminated successfully without warnings.

SQL> host d:

SQL> host dir
Volume in drive D has no label.
Volume Serial Number is 54DF-1372

Directory of D:\

01/27/07 10:40 AM 8,192 test_270107.dmp
01/27/07 10:40 AM 407 test_270107.log

SQL>

Hope this helps
Taj

Wednesday, January 24, 2007

"exp-00091 exporting questionable statistics"

"exp-00091 exporting questionable statistics"


The precalculated optimizer statistics are flagged as questionable at export time if:

* There are row errors while exporting
* The client character set or NCHAR character set does not match the server character set or
NCHAR character set
* A QUERY clause is specified
* Only certain partitions or subpartitions are exported

If a table is missing the columns specified in the QUERY clause, an error message will be produced, and no rows will be exported for the offending table.

Restrictions
The parameter QUERY cannot be specified for full, user, or tablespace mode exports.
The parameter QUERY must be applicable to all specified tables.
The parameter QUERY cannot be specified in a direct path export (DIRECT=y)
The parameter QUERY cannot be specified for tables with inner nested tables.
You cannot determine from the contents of the export file whether the data is the result of a QUERY export.


Suggestion:
When OS character set different that ORACLE character set then BEFORE export you should set NLS_LANG=.CHARACTERSET according Oracle Database Character set.
Example : Oracle 10gr2 on Linux version 4
OS NLS_LANG = US7ASCII
Oracle NLS_LANG = WE8IS0XXXXX

Just Before export set NLS_LANG like
$export NLS_LANG=.WE8ISOXXXXX
$export your_data

Example on windows

First check "NLS_CHARACTERSET" of database through below query

SQL> select VALUE
2 from nls_database_parameters
3 where PARAMETER = 'NLS_CHARACTERSET';

VALUE
----------------------------------------
WE8MSWIN1252


On command prompt

c:\> set NLS_LANG=.WE8MSWIN1252

Thursday, January 4, 2007

Transport Tablespace


SQL> alter tablespace TEST read only;
Tablespace altered.
SQL> host exp TRANSPORT_TABLESPACE=y TABLESPACES=test -

> FILE=e:\test.dmp LOG=e:\test.log
Export: Release 10.1.0.2.0 - Production on Thu Jan 4 16:38:31 2007
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Username: sys@sh as sysdba

Password:
Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - ProductionWith the Partitioning, OLAP and Data Mining options

Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character setNote: table data (rows) will not be exported

About to export transportable tablespace metadata...For tablespace TEST .... exporting cluster definitions.

exporting table definitions. .

exporting table DEPT. .

exporting table EMP. .

exporting table BONUS. .

exporting table SALGRADE. .

exporting table SCOT.

exporting referential integrity constraints.

exporting triggers.

end transportable tablespace metadata export

Export terminated successfully without warnings.

SQL> host xcopy c:\oracle\product\10.1.0\oradata\SH\users01.dbf c:\oracle\product\10.1.0\oradata\CATDB\

C:\oracle\product\10.1.0\oradata\SH\USERS01.DBF

1 File(s) copied

SQL> conn sys@catdb as sysdba

Enter password:

Connected.

SQL> host imp TRANSPORT_TABLESPACE=Y FILE=e:\test.dmp LOG=t.log -

> DATAFILES=c:\oracle\product\10.1.0\oradata\CATDB\users01.dbf
Import: Release 10.1.0.2.0 - Production on Thu Jan 4 16:56:12 2007
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Username: sys@catdb as sysdbaPassword:
Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - ProductionWith the Partitioning, OLAP and Data Mining options
Export file created by EXPORT:V10.01.00 via conventional path

About to import transportable tablespace(s) metadata...

import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set.

importing SYS's objects into SYS.

importing SCOTT's objects into SCOTT. .

importing table "DEPT". .

importing table "EMP". .

importing table "BONUS". .

importing table "SALGRADE". .

importing table "SCOT".

importing SYS's objects into SYS

Import terminated successfully without warnings.

SQL> alter tablespace TEST read write;
Tablespace altered.