Error deploying Database - Database file version 11.2.0.4.0 incompatible with ORACLE version 10.2.0.0.0 - oracle

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

Related

Oracle 19.5 giving ORA-39358 for 19.0 dump

I am importing 19.0 dump (exported on Oracle 19.0c) on Oracle 19.5c oracle. But it give strange message as below,
Import: Release 19.0.0.0.0 - Production on Wed Mar 23 05:46:48 2022
Version 19.5.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
ORA-39002: invalid operation
ORA-39358: Export dump file version 19.0.0.0.0 not compatible with target version 12.2.0.0.0
Can anyone explain.
Here is the compatible parameter I have:
\`SQL\> SELECT name, value FROM v$parameter
WHERE name = 'compatible'; 2
NAME
-
VALUE
-
compatible
12\.2.0
\`

Concat two values using sqlldr throws error

I have a table to which i want to load data using sqlldr,
The DDL of the table is as below,
create table abc.AccountDataDump (
CIF_ID varchar2(20),
ACCOUNT_NO varchar2(30),
TURNOVER number(15,2),
CASH_WITHDRAWAL number(15,2),
CASH_DEPOSIT number(15,2),
MONTH number(2),
YEAR number(4) );
I have the ctl file as below,
LOAD DATA
INFILE '/home/sijo/Downloads/testcash/CXPS_CASHDATA_MONTHLY_APR21.TXT'
badfile '/home/sijo/Downloads/testcash/cash.bad'
discardfile '/home/sijo/Downloads/testcash/cash.rej'
TRUNCATE INTO TABLE CXPSADM_sijo_47z50.AccountDataDump
FIELDS TERMINATED BY '~|'
TRAILING NULLCOLS
(
"CIF_ID",
"ACCOUNT_NO" "A_F_||:ACCOUNT_NO",
"TURNOVER",
"CASH_WITHDRAWAL",
"CASH_DEPOSIT" ,
"MONTH" ,
"YEAR"
)
Basically i am trying to prepend 'A_F_' to the "ACCOUNT_NO" but it is throwing the error as below. The account number in the in file is proper
"Record 1: Rejected - Error on table CXPSADM_SIJO_47Z50.ACCOUNTDATADUMP, column "ACCOUNT_NO".
ORA-00984: column not allowed here"
If i replace "ACCOUNT_NO" "A_F_||:ACCOUNT_NO", with just "ACCOUNT_NO", then it is working fine. Please help
Replace
"ACCOUNT_NO" "A_F_||:ACCOUNT_NO",
by
ACCOUNT_NO "'A_F_'||:ACCOUNT_NO",
Let me show you how it works
Demo
[ftpfdm#scglvdoracd0006 ~]$ cat t.ctl
LOAD DATA
INFILE '/home/ftpfdm/t.dat'
badfile '/home/ftpfdm/t.bad'
discardfile '/home/ftpfdm/t.dsc'
TRUNCATE INTO TABLE TEST1.LOADER_EXAMPLE
FIELDS TERMINATED BY ';'
TRAILING NULLCOLS
(
CIF_ID,
ACCOUNT_NO "'A_F_'||:ACCOUNT_NO"
)
[ftpfdm#scglvdoracd0006 ~]$ cat t.dat
1;A2
2;B2
[ftpfdm#scglvdoracd0006 ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Sep 1 11:37:12 2021
Version 19.6.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.6.0.0.0
SQL> truncate table test1.loader_Example ;
Table truncated.
SQL> desc test1.loader_example
Name Null? Type
----------------------------------------- -------- ----------------------------
CIF_ID NUMBER
ACCOUNT_NO VARCHAR2(50)
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.6.0.0.0
[ftpfdm#scglvdoracd0006 ~]$ sqlldr control=t.ctl
Username:/ as sysdba
SQL*Loader: Release 19.0.0.0.0 - Production on Wed Sep 1 11:37:32 2021
Version 19.6.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Path used: Conventional
Commit point reached - logical record count 2
Table TEST1.LOADER_EXAMPLE:
2 Rows successfully loaded.
Check the log file:
t.log
for more information about the load.
[ftpfdm#scglvdoracd0006 ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Sep 1 11:37:40 2021
Version 19.6.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.6.0.0.0
SQL> select * from test1.loader_example ;
CIF_ID ACCOUNT_NO
---------- --------------------------------------------------
1 A_F_A2
2 A_F_B2
SQL>

My question is about exportdump with a query on oracle 9i

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.

oracle 11g impdp returns invalid operation and object was not found

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

gives many errors when using expdp command

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

Resources