Data pump import a table in to another schema in 11g
Hi allI have an Oracle 11.2 database and I have a requirement to import a few tables in a new scheme using my export from the previous month. I can't import any scheme as it is very large. I check REMAP_TABLE option, but it is enough to create the table in the same pattern and only rename the table.
For example, I TABLE GAS. EMPLOYE_DATA I want to import the to GASTEST. EMPLOYEE_DATA
Is there a way to do it using datapump?
Appriciate any advice.
Hello
You can use the parameter INCLUDE in order to only select one Table:
REMAP_SCHEMA=SCOTT:SCOTT_TEST
INCLUDE=TABLE:"IN ('EMP')"
Hope this helps.
Best regards
Jean Valentine
Tags: Database
Similar Questions
-
Hi all
I get errors below when you try to use the data pump import a table into the dump of the file (of a pre-production database) in a different database (prod_db) even version. I used the expdp to generate the dump file.
Gettings errors-
ORA-39083
ORA-00959
ORA-39112
Any suggestions or advice would be appreciated.
Thank you
Import: Release 10.2.0.1.0 - 64 bit Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
;;;
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64 bit Production
With partitioning, OLAP and Data Mining options
Main table 'SYSTEM '. "' SYS_IMPORT_TABLE_01 ' properly load/unloaded
Start "SYSTEM". "" SYS_IMPORT_TABLE_01 ": System / * DIRECTORY = DATA_PUMP_DIR DUMPFILE = EXP_Mxxxx_1203.DMP LOGFILE = Mxxxx_CLAIMS. LOG TABLES = CLAIMS
Object type SCHEMA_EXPORT/TABLE/TABLE processing
ORA-39083: object of type THAT TABLE could not create with the error:
ORA-00959: tablespace "OXFORD_DATA_01" does not exist
Because sql is:
CREATE TABLE 'xxx '. "" CLAIMS "("CLAIM_NUM"VARCHAR2 (25) NOT NULL ACTIVATE, ACTIVATE THE"LINE_NUM"NUMBER (3.0) NOT NULL, 'PAID_FLAG' CHAR (1), CHAR (1) 'ADJ_FLAG', 'CLAIM_TYPE' VARCHAR2 (20), 'MEM_ID' VARCHAR2 (20), VARCHAR2 (20) 'MEM_SUF', DATE 'MEM_BEG_DATE', 'MEM_REL' CHAR (2), 'MEM_NAME' VARCHAR2 (40), DATE 'MEM_DOB', 'MEM_SEX' CHAR (1),"REC_DATE"DATE, DATE OF THE"PAID_DATE") 'FROM_DATE' DATE "
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
ORA-39112: type of dependent object INDEX: 'xxx '. «CLAIMS_IDX1 ' ignored, base object type TABLE: 'Xxx'.» "" Creation of CLAIMS ' failed
ORA-39112: type of dependent object INDEX: 'xxx '. «CLAIMS_PK ' ignored, base object type TABLE: 'Xxx'.» "" Creation of CLAIMS ' failed
Object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS of treatment
ORA-39112: dependent object type skipped INDEX_STATISTICS, object-based INDEX type: 'xxx '. "' CLAIMS_IDX1 ' failed to create
ORA-39112: dependent object type skipped INDEX_STATISTICS, object-based INDEX type: 'xxx '. "" Creation of CLAIMS_PK ' failed
Object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS treatment
ORA-39112: dependent object type skipped TABLE_STATISTICS, object-based ARRAY type: "xxx". "" Creation of CLAIMS ' failed
Work 'SYSTEM '. "" SYS_IMPORT_TABLE_01 "completed with error (s) from 6 to 13:49:33
Impdp name username/password DIRECTORY = DATA_PUMP_DIR DUMPFILE = EXP_Mxxxx_1203.DMP LOGFILE is Mxxxx_CLAIMS. LOG TABLES = CLAIMSBefore you create the tablespace or use clause REMAP_TABLESPACE for the import.
-
Hello I dumpfile having 100 million documents. I was loading to another server using data pump import utility. It loads the table of data in half an hour or less but it take 7hr when importing indexes. Finally I have to kill jobs and to reveal the index Btree alone was created successfully on all the table any failure of plan B to create now I have the dump file which have all data and metadata. is it possible in utility Datapump to import only the missing indexes or import all indexes only no table and other things? If I use the Include command simply index? Please suggest me a solution
Oracle Studnet wrote:
Right, but there is only one way to solve the problem I want to do? can I extract only the index of the dump file and import them rather table and other objectsImpdp HR/hr dumpfile = directory = data_pump_dir hrdp.dmp include = index content = metadata_only
-
"Resume" a Data Pump import Execution failure
First of all, here is a "failure" Data Pump Import I want to "resume":
] $ impdp directory dumpfile=mySchema%U.dmp "" / as sysdba "" = DATA_PUMP_DIR logfile = Import.log patterns parallel = MYSCHEMA = 2
As you can see this work is not without treatment statistics, constraints, etc. from PL/SQL. I want to do is make another impdp command but ignore objects that were imported with success as shown above. Is it possible to do (using the EXCLUDE parameter maybe?) with impdp? If so, what would it be?
Import: Release 10.2.0.3.0 - 64 bit Production Tuesday, February 16, 2010 14:35:15
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64 bit Production
With the options of Real Application Clusters, partitioning, OLAP and Data Mining
Table main 'SYS '. "' SYS_IMPORT_SCHEMA_01 ' properly load/unloaded
Departure 'SYS '. "' SYS_IMPORT_SCHEMA_01 ': ' / * AS SYSDBA"dumpfile=mySchema%U.dmp directory = DATA_PUMP_DIR logfile = Import.log patterns parallel = MYSCHEMA = 2
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Object type SCHEMA_EXPORT/SYNONYM/SYNONYM of treatment
Object type SCHEMA_EXPORT/TYPE/TYPE_SPEC of treatment
Object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE of treatment
Processing object type SCHEMA_EXPORT/SEQUENCE/EXCHANGE/OWNER_GRANT/OBJECT_GRANT
Object type SCHEMA_EXPORT/TABLE/TABLE processing
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "MYSCHE"...
...
... 0 KB 0 rows
Processing object type SCHEMA_EXPORT/TABLE/SCHOLARSHIP/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
ORA-39126: worker unexpected fatal worker error of $ MAIN. LOAD_METADATA [INDEX: "MONSCHEMA".] ["" OBJECT_RELATION_I2 "]
SELECT process_order, flags, xml_clob, NVL (dump_fileid,: 1), NVL (dump_position,: 2), dump_length, dump_allocation, constituent, object_row, object_schema, object_long_name, processing_status, processing_state, base_object_type, base_object_schema, base_object_name, goods, size_estimate, in_progress 'SYS '. "" SYS_IMPORT_SCHEMA_01 "process_order where: 3: 4 AND processing_state <>: 5 AND double = 0 ORDER BY process_order
ORA-06502: PL/SQL: digital error or value
ORA-06512: at "SYS." "MAIN$ WORKER", line 12280
ORA-12801: error reported in the parallel query P001, instance pace2.capitolindemnity.com:bondacc2 Server (2)
ORA-30032: the suspended order (trade-in) has expired
ORA-01652: unable to extend segment temp of 128 in tablespace OBJECT_INDX
ORA-06512: at "SYS." DBMS_SYS_ERROR', line 105
ORA-06512: at "SYS." "MAIN$ WORKER", line 6272
-PL/SQL call stack-
the line object
serial number of handle
package body 14916 0x1f9ac8d50 SYS. MAIN$ WORKER
body 0x1f9ac8d50 6293 package SYS. MAIN$ WORKER
body 0x1f9ac8d50 3511 package SYS. MAIN$ WORKER
body 0x1f9ac8d50 6882 package SYS. MAIN$ WORKER
body 0x1f9ac8d50 1259 package SYS. MAIN$ WORKER
0x1f8431598 anonymous block 2
Job 'SYS '. "' SYS_IMPORT_SCHEMA_01 ' stopped because of the fatal 23:05:45
Thank you
JohnWhy you just restart this work. It ignores everything that has already been imported.
Impdp "" / as sysdba "" attach = "SYS." "" SYS_IMPORT_SCHEMA_01 ".
Import > keep
Dean
-
I cannot using the data pump import tool. I work with Oracle 10.2.4.0 on Windows Server 2008. I am trying to import a large amount of data (several patterns, thousands of paintings, hundreds of GB of data) of the same version of Oracle on Linux. Since there is so much data and will be if long to import, I try to make sure that I can make it work for a table or a diagram before I try. So I will try to import the TEST_USER. Table 1 table using the following command:
Dumpfile = logfile = big_file_import.log big_file.dmp Impdp.exe tables = test_user.table1 remap_datafile=\'/oradata1/data1.dbf\':\'D:\oracle\product\10.2.0\oradata\orcl\data1.dbf\'
I provide sys as sysdba to connect when he asks (not sure how you get this info in the original order). However, I get the following error:
the "TEST_USER" user does not exist
My understanding is that the data pump utility would create all the necessary patterns for me. Is it not the case? The target database is a new facility for the source schemas do not exist here.
Even if I create the schema of test_user by hand, then I get an error message indicating that the tablespace does not exist:
ORA-00959: tablespace "TS_1" does not exist
Then even to do it, I don't want to have to do first, does not work. Then he gives me something about how the user has no privileges on tablespace.
The data pump utility is not supposed to do that sort of thing automatic? What I really need to create all schemas and storage by hand? That will take a long time. I'm doing something wrong here?
Thank you
Davetables = test_user.table1
The "TABLES" mode does NOT create database accounts.
The FULL mode creates space storage and database accounts before importing the data.
PATTERNS mode creates the database accounts before importing data - but expect Tablespaces to exist before so that tables and indexes can be created in the correct storage spaces.
Hemant K Collette
http://hemantoracledba.blogspot.com -
Data pump import - can I can the name of the table when importing only?
It is possible to use data pump export on a table name, and then import (add lines) at a table of different table with the same structure of exact column? I don't see a way to change only the name of the table when importing.Hello
From 11.1 you can remap a table name. Use:
remap_table = old_name:new_name
Thank you
Dean
-
10g to 11 GR 2 upgrade using Data Pump Import
Hello
I intend to move a database 10g a windows server to another. However, there is also a requirement to upgrade this database to GR 11, 2. That's why I was going to combine the 2 in one movement.
1. take an export of complete data to source 10 g data pump
2. create a new database empty 11 g on the target environment
3 import the dump file into the target database
However, I have a couple of queries running in my mind about this approach-
Q1. What happens with the SYSTEM and SYS SYSTEM and SYSAUX objects when importing? Given that I have in fact already created a new dictionary on the empty target database - import SYS or SYSTEM will simply produce errror messages that should be ignored?
Q2. should I use EXCLUDE on SYS and SYSTEM (is it EXCLUDE better export or import side)?
Q3. What happens if there are things like scheduled tasks, etc. on the source system - since these would be stored in the property SYSTEM tables, how I would bring them across to the target 11 g database?
Thank you
JimThis approach is included in the Upgrade Guide 11 GR 2 - http://docs.oracle.com/cd/E11882_01/server.112/e23633/expimp.htm
PL, ensure that you use SYSDBA privileges to run commands expdp and impdp. See here the first sections of "Note".
http://docs.Oracle.com/CD/B19306_01/server.102/b14215/dp_export.htm#sthref57
http://docs.Oracle.com/CD/E11882_01/server.112/e22490/dp_import.htm#i1012504As mentioned, sown schemas (for example SYS etc.) are not exported. See http://docs.oracle.com/cd/B19306_01/server.102/b14215/dp_export.htm#i1006790
HTH
Srini -
Update of data by Data Pump Import
Hi all!
I want to update the data in my database using Full Import Data Pump to a different database. But I do not know which option I should use when executing import for the second time? Or I can run full import without encompassing any option again?
Thank you
Tien LaiWhat if all you want to do is update of data and if the tables already exist, you can use this:
content of user/password = data_only =(truncate or append) table_exists_action Impdp...
If you use Add, then add new data to the existing data. If you use truncate then existing data will be deleted and the data in the dumpfile will be imported.
There will be problems if you have a referential constraint. Say that table 1 references given in table 2, if datapump loads data into Database2 first, and then it truncates the data again. This truncation may fail because there is a referential constraint on it. If you have a ref, then you must disable them before you run impdp and then allow them once impdp is completed.
If all you want after the first import only the data, you can add the
content = data_only
your order expdp. He would complete much faster.
Do not forget that your statistics on the tables and the indexes will not be reloaded if you use table_exists_action = truncate or replace existing statistics so would probably obsolete.
If you want to replace the table and the data, then the command would be:
Impdp username/password table_exists_action = replace...
This will remove the table and re-create it, and then load the data, then create all dependent objects for tables.
I hope this helps.
Dean
-
How to share data in the tables ' User_ * ' with another schema
I want to share the data in the table WHERE USER_SEGMENTS with another schema. If I create a view and grant select on the view, when the other schema queries the view data are identical to themselves querying the SYS.user_segments table directly.
My guess is that the SYS.user_segments table is a view based on the current user.create view sys_user_segments as select * from sys.user_segments; grant select on sys_user_segments to A;
Is there a way to share such data without creating a copy of the table?
Oracle: 10g
Thank youIf the ADMINISTRATOR is concerned about B access to DBA_SEGMENTS (or by creating DBA_SEGMENTS views that belongs to a user who has access on top and then grant access to this view of B), it seems pretty crazy allow that kind of database connection.
If you create a database link belonged to B that connects to A, B is, in substance, given any privilege that has exercises. But it is done in a very, very dark which will no doubt be neglected in the future when someone gets a check. He'll be sitting here to wait that someone (accidentally or intentionally) Decides to exploit the security hole and do something that is causing a problem (by removing all data from a table, grabbing all the sensitive data in a table, etc.). Risks of this almost certainly far, far* far * outweigh the risks of even leaving B to obtain direct access to DBA_SEGMENTS.
Justin
-
How to import with datapump tablespaces and another schema?
Hi, I need to import with datapump to another schema, data in 'x' tablespace and indexes in the tablespace 'y'
example:
My schema: prueba
I need to import the schema "prueba" but the data must be in the tablespace called "Tb1" and its index should be in the tablespace called "Tb2".
So, how can I do?
Any help will be appreciated.
As the noted the ground, do two imports, exclude to limit import and map objects to the appropriate storage space (to know what tablespace they were however)
import 1 - exclude = index remap_tablespace = source: tb1
import 2 - exclude = remap_tablespace = source table: tb2
-
Moved to subpartitions in a table doubles in another schema.
+ NOTE: I asked this question on the forum SQL and PL/SQL , but came here as I think it is more appropriate to this forum. I placed a pointer to this post on the original post. +
Hello ladies and gentlemen.
We are currently involved in an exercise on my place of work where we're trying to logically organize our data by world region. For more information, our database of production is currently at version 10.2.0.3 and will soon become 10.2.0.5.
For the moment, all our data "lives" in the same schema. We are trying to produce a proof of concept to migrate this data to the identically structured (and named) tables in separate database schemas. Each schema to represent a world region.
In our current schema, our data are partitioned to date range and then list partitioned on a column named OFFICE. I want to spend the subpartitions of OFFICE of a schema in a same table named and structured in a new scheme. The tablespace will remain the same for the two tables with the same name in the two schemas.
Any of you have an opinion on the best way to do it? Ideally in the new scheme, I would like to create each table an empty array with the appropriate range and list partitions that are defined. I did a few tests in our development environment with the EXCHANGE PARTITION statement, but this needs to be non partitioned, the destination table.
I was wondering if, for the migration of partition in all drawings bearing the name of the table and tablespace remains constant, there is a formal method of 'best practices' to accomplish such a move subpartition cleanly, quickly and elegantly?
Welcome any helpful response.
See you soon.
JamesYou CAN exchange a subpartition in another table by using a 'temporary' (intermediate) as an intermediate table.
See:
SQL> drop table part_subpart purge; Table dropped. SQL> drop table NEW_part_subpart purge; Table dropped. SQL> drop table STG_part_subpart purge; Table dropped. SQL> SQL> create table part_subpart(col_1 number not null, col_2 varchar2(30)) 2 partition by range (col_1) subpartition by list (col_2) 3 ( 4 partition p_1 values less than (10) (subpartition p_1_s_1 values ('A'), subpartition p_1_s_2 values ('B'), subpartition p_1_s_3 values ('C')) 5 , 6 partition p_2 values less than (20) (subpartition p_2_s_1 values ('A'), subpartition p_2_s_2 values ('B'), subpartition p_2_s_3 values ('C')) 7 ) 8 / Table created. SQL> SQL> create index part_subpart_ndx on part_subpart(col_1) local; Index created. SQL> SQL> SQL> insert into part_subpart values (1,'A'); 1 row created. SQL> insert into part_subpart values (2,'A'); 1 row created. SQL> insert into part_subpart values (2,'B'); 1 row created. SQL> insert into part_subpart values (2,'B'); 1 row created. SQL> insert into part_subpart values (2,'C'); 1 row created. SQL> insert into part_subpart values (11,'A'); 1 row created. SQL> insert into part_subpart values (11,'C'); 1 row created. SQL> SQL> commit; Commit complete. SQL> SQL> create table NEW_part_subpart(col_1 number not null, col_2 varchar2(30)) 2 partition by range (col_1) subpartition by list (col_2) 3 ( 4 partition n_p_1 values less than (10) (subpartition n_p_1_s_1 values ('A'), subpartition n_p_1_s_2 values ('B'), subpartition n_p_1_s_3 values ('C')) 5 , 6 partition n_p_2 values less than (20) (subpartition n_p_2_s_1 values ('A'), subpartition n_p_2_s_2 values ('B'), subpartition n_p_2_s_3 values ('C')) 7 ) 8 / Table created. SQL> SQL> create table STG_part_subpart(col_1 number not null, col_2 varchar2(30)) 2 / Table created. SQL> SQL> -- ensure that the Staging table is empty SQL> truncate table STG_part_subpart; Table truncated. SQL> -- exchanging a subpart out of part_subpart SQL> alter table part_subpart exchange subpartition 2 p_2_s_1 with table STG_part_subpart; Table altered. SQL> -- exchanging the subpart into NEW_part_subpart SQL> alter table NEW_part_subpart exchange subpartition 2 n_p_2_s_1 with table STG_part_subpart; Table altered. SQL> SQL> SQL> select * from NEW_part_subpart subpartition (n_p_2_s_1); COL_1 COL_2 ---------- ------------------------------ 11 A SQL> SQL> select * from part_subpart subpartition (p_2_s_1); no rows selected SQL>
I traded subpartition p_2_s_1 out of the part_subpart table in the NEW_part_subpart table - even with a different name for the subpartition (n_p_2_s_1) If you wish.
NOTE: because the source and target tables are in different schemas, you need to move (or copy) the intermediate table STG_part_subpart from the schema of the first towards the second scheme after that first "Exchange subpartition' is done. You will need to do this for each subpartition to Exchange.
Hemant K Collette
Published by: Hemant K deal April 4, 2011 10:19
Added details for cross-schema exchange. -
Export of data from a RDBMS Table to an another RDBMS Table using functions of the ODI
Hello
I am facing a problem while exporting a RDBMS table data to an another RDBMS Table using user ODI functions.
Name:-User_Func
Group:-training
Syntax:-User_Func($(SrcField))
Implementation syntax: -.
(CASE
WHEN $(SrcField) > 40000 THEN 'HIGH '.
WHEN $(SrcField) BETWEEN 30000 AND 40000 THEN 'AVERAGE '.
OTHER "LOW".
)
Technology:-Oracle
To map the column RANK of my TARGET_EMPTABLE I write
User_Func (SRC_TABLENAME. SALARY)
using the Expression Editor.
I got the following error
ODI-1227: task failed ODI_FUNC_INTERFACE (export) on the source of ORACLE Source_DataServer connection.
Caused by: java.sql.SQLSyntaxErrorException: ORA-00905: lack of keyword
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:947)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1283)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1441)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3823)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1671)
at oracle.odi.query.JDBCTemplate.executeQuery(JDBCTemplate.java:189)
at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:89)
at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:1)
at oracle.odi.runtime.agent.execution.DataMovementTaskExecutionHandler.handleTask(DataMovementTaskExecutionHandler.java:70)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:366)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:292)
to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:855)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)
at java.lang.Thread.run(Thread.java:619)
and in the code tab is: -.
Select
SRC_FUNC_TABLE. E_NUMBER E_NUMBER,
SRC_FUNC_TABLE. E_NAME E_NAME,
SRC_FUNC_TABLE. E_LOC E_LOC,
(CASE
WHEN SRC_FUNC_TABLE. E_SAL > 40000 THEN 'HIGH '.
WHEN SRC_FUNC_TABLE. E_SAL BETWEEN 30000 AND 40000 THEN 'AVERAGE '.
OTHER "LOW".
) E_GRADE
of SOURCE_SCHEMA. SRC_FUNC_TABLE SRC_FUNC_TABLE
where (1 = 1)
Help, pleaseAnindya Chatterjee wrote:
Hello
I am facing a problem while exporting a RDBMS table data to an another RDBMS Table using user ODI functions.
Name:-User_Func
Group:-training
Syntax:-User_Func($(SrcField))Implementation syntax: -.
(CASE
WHEN $(SrcField) > 40000 THEN 'HIGH '.
WHEN $(SrcField) BETWEEN 30000 AND 40000 THEN 'AVERAGE '.
OTHER "LOW".
)Your syntax of the CASE statement is not correct
Missing END keyword
It should be(CASE
WHEN $(SrcField) > 40000 THEN 'HIGH '.
WHEN $(SrcField) BETWEEN 30000 AND 40000 THEN 'AVERAGE '.
OTHER "LOW".
END)Technology:-Oracle
To map the column RANK of my TARGET_EMPTABLE I write
User_Func (SRC_TABLENAME. SALARY)
using the Expression Editor.
I got the following errorODI-1227: task failed ODI_FUNC_INTERFACE (export) on the source of ORACLE Source_DataServer connection.
Caused by: java.sql.SQLSyntaxErrorException: ORA-00905: lack of keywordat oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:947)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1283)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1441)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3823)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1671)
at oracle.odi.query.JDBCTemplate.executeQuery(JDBCTemplate.java:189)
at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:89)
at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:1)
at oracle.odi.runtime.agent.execution.DataMovementTaskExecutionHandler.handleTask(DataMovementTaskExecutionHandler.java:70)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:366)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:292)
to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:855)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)
at java.lang.Thread.run(Thread.java:619)
and in the code tab is: -.Select
SRC_FUNC_TABLE. E_NUMBER E_NUMBER,
SRC_FUNC_TABLE. E_NAME E_NAME,
SRC_FUNC_TABLE. E_LOC E_LOC,
(CASE
WHEN SRC_FUNC_TABLE. E_SAL > 40000 THEN 'HIGH '.
WHEN SRC_FUNC_TABLE. E_SAL BETWEEN 30000 AND 40000 THEN 'AVERAGE '.
OTHER "LOW".
) E_GRADE
of SOURCE_SCHEMA. SRC_FUNC_TABLE SRC_FUNC_TABLE
where (1 = 1)Help, please
-
Hello Forum,
I have a question regarding imports and exports of data pump, perhaps what I should already know.
I need to empty a table that has about 200 million lines, that I need to get rid of about three quarters of data.
My intention is to use the data pump to export the table and and indexes and constraints etc..
The table has no relationship to any other table, it is composed of approximately 8 columns with constraints not null.
My plan is
1 truncate table
2. disable or remove index
3 leave the constraints in place?
4. use data pump to import a lines to keep.
My question
will be my clues and imported too much constraints I want to import only a subset of my exported table?
or
If I dropped the table after truncation, I'll be able to import my table and indexes, even if I use the sub as part of my statement to import query functionality?
My table using the query sub in data pump functionality must exist in the database before doing the import
or handful of data pump import as usual IE will create table indices grants and statistics etc.?
Thank you for your comments.
Concerning
Your approach is ineffective.
What you need to do is to
create the table in select foo * bar where the
bar of truncate table;
Insert / * + APPEND * / into select bar * foo.
Rebuild the indexes on the table.
Fact.
This whole thing with expdp and impdp is only a waste of resources. My approach generates redo a minimum.
----------
Sybrand Bakker
Senior Oracle DBA
-
I want to learn more about the data pump and table space transferable
Please notify easy tutorials as I want to know how to import and export between oracle 10 and 11.
Thank youHello
Please check this oracle tutorial:
http://www.exforsys.com/tutorials/Oracle-10G/Oracle-10G-using-data-pump-import.html
about transportable table spaces, you may consult:
http://www.rampant-books.com/art_otn_transportable_tablespace_tricks.htm
Kind regards
Mohamed
Oracle DBA -
Pump data and import, BLOB, CLOB and RAW columns
Hi all
Please can someone confirm if the issue where import from LONG, BLOB, CLOB and columns RAW via Data Pump fails has been resolved in later versions of the Oracle database server?
I believe that when you try to import a Data Pump export with tables containing these types of columns, that you get an error like:
ORA-31693: Data Table object 'OWNER '. "" TABLE "could not load/unload and being ignored because of the error:
ORA-06502: PL/SQL: digital error or value: in bulk Bind: Bind truncated
Thank you
Leigh.I believe that this error is only associated to long data type I have been using data pump to the table to export/import with LOB type without any problem.
Data pump had a problem with the LONG type to check this bug
Bug 5598333 - EXPDP/IMPDP corrupts the data for a LONG column
DOC - ID: Note: 5598333.8It is set in 11.1.0.6
Maybe you are looking for
-
Touchscreen and the noise of the fan U920T - 11 c satellite fails sometimes
Hello I just bought the U920T - 11 c a few days ago.I love him but he some of the questions they put me down and make me want to go back. The first problem is the loud fan noise that lights up. Is there anyway to turn this off? Happens about 15 minut
-
L540: password accepted anywhere but the login screen
Hello! I was happily using the sensor of fingerprint on my L540 for awhile, until what a few months ago, I reinstalled Windows 7 (Professional, x 64). After setting up everything, and by installing drivers Lenovo, I noticed this problem: When I start
-
I need XP Service pack 3 after fresh XP installation but update does not work
I'm having a nightmare. Tried to install a copy of Windows Office 2010 via the company's offer. Reinstalled XP like kept crashing and couldn't get to restore brfor it crashed. Now the updates will not work. Help please
-
Hi all I have a HP dv7-4070us (i5 - 450, 180 SSD Intel 330 1 TB WD Scorpio Blue, Windows 7 Edition home premium 64-bit, 8 GB RAM, ATI HD 5650) currently I begin to learn software Adobe master suite, of things quite dense, however, I realize that up t
-
How to remove a member of the family safety
Original title: family security I want to remove a member from my family of security mode, I tried a lot of time, but did not because the system displays a msg that "try sorry again, we cannot remove at the moment". what it takes to please guide me t