expdp is giving the following errors.
C:\db>expdp SYSTEM/xxx#orcl directory=dump_dir dumpfile=anew.dmp log=export.log schemas=anew
Export: Release 11.2.0.4.0 - Production on Qua Fev 17 17:09:00 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-31626: job does not exist
ORA-31637: cannot create job SYS_EXPORT_SCHEMA_01 for user SYSTEM
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPV$FT_INT", line 798
ORA-39244: Event to disable dropping null bit image header during relational select
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.KUPC$QUE_INT", line 1840
ORA-00955: name is already used by an existing object
There is no orphan jobs in my system:
select * from dba_datapump_jobs;
no rows selected
Any ideas about this error?
The temporary table created every time a datapump is started has not been automatically dropped.
Solution 1: drop table sys.job_name with sys rights
Solution 2: use a .par file and put entries like below (change to suit your job):
DIRECTORY=dump_dir
DUMPFILE=anew.dmp
LOGFILE=export.log
PARALLEL=16
SCHEMAS=anew
JOB_NAME=new_expdp <----- this has to change
Related
I am transferring the Oracle database from one computer to another. The database was created in Oracle 11. I reinstalled the new controlfile to continue working with the database, but the following error occurred (see the pictures below). Before that I am enclosing a list of commands via CMD (executed as administrator)
C:\WINDOWS\system32>C:
C:\WINDOWS\system32>cd C:\oracle\product\10.2.0\db_1\BIN
C:\oracle\product\10.2.0\db_1\BIN>set ORACLE_SID=LOVDTNAL
C:\oracle\product\10.2.0\db_1\BIN>sqlplus /nolog
SQL*Plus: Release 10.2.0.5.0 - Production on Tue Oct 11 17:43:23 2022
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
SQL> conn sys/sys as sysdba
Connected.
SQL> startup nomount pfile=D:\oracle\admin\LOVDTNAL\pfile\init.ora
SQL> CREATE CONTROLFILE REUSE DATABASE "LOVDTNAL" NORESETLOGS NOARCHIVELOG
2 MAXLOGFILES 16
3 MAXLOGMEMBERS 3
4 MAXDATAFILES 100
5 MAXINSTANCES 8
6 MAXLOGHISTORY 584
7 LOGFILE
8 GROUP 1 'D:\ORACLE\ORADATA\LOVDTNAL\REDO01.LOG' SIZE 50M,
9 GROUP 2 'D:\ORACLE\ORADATA\LOVDTNAL\REDO02.LOG' SIZE 50M,
10 GROUP 3 'D:\ORACLE\ORADATA\LOVDTNAL\REDO03.LOG' SIZE 50M
11 -- STANDBY LOGFILE
12 DATAFILE
13 'D:\oracle\oradata\LOVDTNAL\SYSTEM01.DBF',
14 'D:\oracle\oradata\LOVDTNAL\UNDOTBS01.DBF',
15 'D:\oracle\oradata\LOVDTNAL\SYSAUX01.DBF',
16 'D:\ORACLE\ORADATA\LOVDTNAL\USERS01.DBF',
17 'D:\oracle\oradata\LOVDTNAL\MAIN.DBF',
18 'D:\oracle\oradata\LOVDTNAL\INDEX.DBF',
19 'D:\oracle\oradata\LOVDTNAL\LOB.DBF',
20 'D:\oracle\oradata\LOVDTNAL\XDB.DBF'
21 CHARACTER SET CL8MSWIN1251;
CREATE CONTROLFILE REUSE DATABASE "LOVDTNAL" NORESETLOGS NOARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01130: database file version 11.2.0.4.0 incompatible with ORACLE version
10.2.0.0.0
ORA-01110: data file 1: 'D:\oracle\oradata\LOVDTNAL\SYSTEM01.DBF'
P.S. This computer has several dozen databases that were created in Oracle 10.2.0 and Oracle 11.2.0. I did the same steps described above through Oracle 11.2.0. Unfortunately, in both cases, an error occurs:
Database file version 11.2.0.4.0 incompatible with ORACLE version 10.2.0.0.0
PS
Running in Oracle 11.2.0 and error is not dissappear.
C:\WINDOWS\system32>C:
C:\WINDOWS\system32>CD C:\oracle\product\11.2.0\dbhome_1\BIN
C:\oracle\product\11.2.0\dbhome_1\BIN>set ORACLE_SID=LOVDTNAL
C:\oracle\product\11.2.0\dbhome_1\BIN>sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 Production on Tue Oct 11 17:39:41 2022
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL> conn sys/sys as sysdba
Connected to an idle instance.
SQL> startup nomount pfile=D:\oracle\admin\LOVDTNAL\pfile\init.ora
ORACLE instance started.
Total System Global Area 2147483648 bytes
Fixed Size 2078928 bytes
Variable Size 486541104 bytes
Database Buffers 1644167168 bytes
Redo Buffers 14696448 bytes
SQL> CREATE CONTROLFILE REUSE DATABASE "LOVDTNAL" NORESETLOGS NOARCHIVELOG
2 MAXLOGFILES 16
3 MAXLOGMEMBERS 3
4 MAXDATAFILES 100
5 MAXINSTANCES 8
6 MAXLOGHISTORY 584
7 LOGFILE
8 GROUP 1 'D:\ORACLE\ORADATA\LOVDTNAL\REDO01.LOG' SIZE 50M,
9 GROUP 2 'D:\ORACLE\ORADATA\LOVDTNAL\REDO02.LOG' SIZE 50M,
10 GROUP 3 'D:\ORACLE\ORADATA\LOVDTNAL\REDO03.LOG' SIZE 50M
11 -- STANDBY LOGFILE
12 DATAFILE
13 'D:\oracle\oradata\LOVDTNAL\SYSTEM01.DBF',
14 'D:\oracle\oradata\LOVDTNAL\UNDOTBS01.DBF',
15 'D:\oracle\oradata\LOVDTNAL\SYSAUX01.DBF',
16 'D:\ORACLE\ORADATA\LOVDTNAL\USERS01.DBF',
17 'D:\oracle\oradata\LOVDTNAL\MAIN.DBF',
18 'D:\oracle\oradata\LOVDTNAL\INDEX.DBF',
19 'D:\oracle\oradata\LOVDTNAL\LOB.DBF',
20 'D:\oracle\oradata\LOVDTNAL\XDB.DBF'
21 CHARACTER SET CL8MSWIN1251;
CREATE CONTROLFILE REUSE DATABASE "LOVDTNAL" NORESETLOGS NOARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01130: database file version 11.2.0.4.0 incompatible with ORACLE version
10.2.0.0.0
ORA-01110: data file 1: 'D:\oracle\oradata\LOVDTNAL\SYSTEM01.DBF'
ORACLE HOME-
UPDATE
Now I noticed that when I exit sqlplus, version 10.2.0 is shown to me, while I logged in via product/11.2.0/.../BIN/sqlplus.exe
the question is, how do I make it so that after conn sys/sys I log into sqlplus from 11.2.0
I am getting the following error and i need help.
hcp7 (spar)/tmp $ exp system/puppy parfile=rr.prm
Export: Release 9.2.0.8.0 - Production on Thu Oct 31 13:27:11 2019
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
Current user changed to AHS
. . exporting table HB_CONTROL_OUT_DATA
EXP-00056: ORACLE error 933 encountered
ORA-00933: SQL command not properly ended
Export terminated successfully with warnings.
hcp7 (spar)/tmp $
hcp7 (spar)/tmp $ vi rr.prm
"rr.prm" 6 lines, 258 characters
file=raj.dmp
log=raj.log
STATISTICS=none
compress=y
tables=AHS.HB_CONTROL_OUT_DATA
query="[select * from hb_control_out_data where exists (select '1' from hb_control_out where hbod_tran_num = hbo_tran_num and ADD_MO
NTHS(HBO_TO_MIS_DATE,24) >SYSDATE)]"
You need to escape your quotes in the query. See the documentation at https://docs.oracle.com/cd/B10501_01/server.920/a96652/ch01.htm#1005843.
BTW, version 9i belongs in a software museum. It was released 17 years ago and the final patch set was released over 12 years ago.
The error message is
EXP-00056: ORACLE error 933 encountered
ORA-00933: SQL command not properly ended
What SQL are you executing? Well, your parameter file includes a QUERY parameter. It may be a trick of the cut'n'paste into the StackOverflow question box but this looks odd:
ADD_MO NTHS(HBO_TO_MIS_DATE,24)
^
If that space or newline is not an artefact remove and re-run the export.
I wanted to transfer an oracle table between two users using expdp and impdp commands.
First of all, I created a directory and granted proper privileges to source and destination users:
SQL> CREATE OR REPLACE DIRECTORY TEST_DIR AS '/u01/app/oracle/oradata/temp_dirs';
Directory created.
SQL> GRANT READ, WRITE ON DIRECTORY test_dir TO SOURCE_USER;
Grant succeeded.
SQL> GRANT READ, WRITE ON DIRECTORY test_dir TO DEST_USER;
Grant succeeded.
SQL> commit;
This is my expdp command and it's output:
oracle#lab-57:~$ expdp SOURCE_USER/SOURCE_USER tables=tbl_user directory=TEST_DIR dumpfile=users.dmp logfile=exp_users.log
Export: Release 11.2.0.1.0 - Production on Tue Jul 24 16:18:27 2018
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
Starting "SOURCE_USER"."SYS_EXPORT_TABLE_01": SOURCE_USER/******** tables=tbl_user directory=TEST_DIR dumpfile=users.dmp logfile=exp_users.log
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "SOURCE_USER"."TBL_USER" 8.085 KB 2 rows
Master table "SOURCE_USER"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SOURCE_USER.SYS_EXPORT_TABLE_01 is:
/u01/app/oracle/oradata/temp_dirs/users.dmp
Job "SOURCE_USER"."SYS_EXPORT_TABLE_01" successfully completed at 16:18:38
This implies the export operation was done successfully.
Then I tried to import it using impdp as following:
oracle#lab-57:~$ impdp DEST_USER/DEST_USER tables=TBL_USER directory=TEST_DIR dumpfile=users.dmp logfile=imp_users.log
Import: Release 11.2.0.1.0 - Production on Tue Jul 24 17:26:58 2018
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
ORA-39002: invalid operation
ORA-39166: Object DEST_USER.TBL_USER was not found.
I also tried tables=DEST_USER.TBL_USER and content=data_only; both returned same error.
As you're exporting as SOURCE_USER and importing as DEST_USER, the REMAP_SCHEMA parameter might help. (I'll split the command into several rows for easier reading)
impdp DEST_USER/DEST_USER tables=TBL_USER directory=TEST_DIR
dumpfile=users.dmp logfile=imp_users.log
remap_schema=source_user:dest_user --> this
If you're on 11.2, you might hit a bug which won't allow you to do that (see My Oracle Support for more info). In that case, you can still perform import, but you'll have to omit the TABLES parameter, i.e.
TABLES was in this gap
|
impdp DEST_USER/DEST_USER v directory=TEST_DIR
dumpfile=users.dmp logfile=imp_users.log
remap_schema=source_user:dest_user
Simple answer :
Create import : keep the dump ready.
Two option to restore the dump , consider complete dump or specific table.
For table specific :- Table name = MONTHS_DAY
impdp DBA_USER/DBA_Password tables = SOURCE_SCHEMA.MONTHS_DAY directory=AKSHAY_SPM_EDIR dumpfile=MONTHS_DAY.dmp logfile=impdpMONTHS_DAY.log remap_schema = SOURCE_SCHEMA:DESTINATION_SCHEMA
For complete import :
impdp DBA_USER/DBA_Password directory = AKSHAY_SPM_EDIR dumpfile=MONTHS_DAY.dmp logfile=impdpMONTHS_DAY.log remap_schema = SOURCE_SCHEMA:DESTINATION_SCHEMA
Make sure, directory is accessible as dump is present there
I'm trying to import a backup onto another database.
Here's my "imp_schema.sh" file:
impdp userid=system/admin2018#NODO1 content=data_only full=n schemas=prueba directory=BACKUPS dumpfile=full_import.dmp logfile=prueba.log
So, I log in (On the source server) as oracle/oracle and do the following:
$ bash
bash-3.00$ cd /oradata2/backups/
bash-3.00$ ./imp_schema.sh
Import: Release 11.2.0.1.0 - Production on Tue Feb 6 11:10:36 2018
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation
bash-3.00$
The .dmp and .sh file are both inside "/oradata2/backups/"
Doing a
SELECT DIRECTORY_NAME, DIRECTORY_PATH FROM DBA_DIRECTORIES;
on the Source Directory through SQL shows the directory as:
DIRECTORY_NAME DIRECTORY_PATH
BACKUPS /oradata2/backups
Why am I having this error?
the database A field Type is:
select column_name,data_type From all_tab_columns ;
COLUMN_NAME DATA_TYPE
------------------------------------
NAME VARCHAR2
ID_ISSUE_PLACE VARCHAR2
NATIONALITY NVARCHAR2
I want to export a table with expdp:
expdp abc/123 tables=A.CUST:PARTNUM_0 exclude=grant,index,contraint,statistics,trigger DIRECTORY=DATATMP filesize=100M dumpfile=expdp_%U.dmp parallel=4 cluster=N COMPRESSION=DATA_ONLY
Then,I import the dmp file to my local oracle,the field 'NATIONALITY' is correct , but the other field is garbled.
impdp abc/123 DIRECTORY=DATATMP DUMPFILE=expdp_01.dmp
[oracle#db01 tmp]$ impdp bi71/bi71 DIRECTORY=datatmp
DUMPFILE=expdp_01.dmp
Import: Release 11.2.0.1.0 - Production on Tue Sep 6 11:18:05 2016
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 Master table
"A"."SYS_IMPORT_FULL_01" successfully loaded/unloaded Starting
"A"."SYS_IMPORT_FULL_01": abc/******** DIRECTORY=datatmp
DUMPFILE=expdp_01.dmp Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA . . imported
"A"."CUST":"PARTNUM_0" 5.990 MB 78037 rows
Statement:Not a windows client problems,because the vietnamese charecter has been displayed properly.Here with reason screenshot windows client, is to make the results better clarity.
screenshot
I found a rule,once vietnamese nationality in this line appears,the field NAME,ID_ISSUE_PLACE are garbled.
How to resolve? thanks(^_^).