Expdp DataPump query parameter
Friends,
DB: 11 GR 2
OS: Linux
I am trying to export the schema with sub conditions inside a file export settings:
1. export the entire schema
2. the schema from two tables to export only one month of data
3 exclude statistics
Export running with
expdp system/pwd parfile = exp_user1.par
I tried to use the settings file below, but he finds all the data:
(ora-31655: no object of data or metadata selected for employment)
Settings file: (exp_user1.par)
DIRECTORY = DATA_PUMP_REFRESH
DUMPFILE = dump_01.dmp
LOGFILE = dump_01.log
SCHEMAS = USER1
CONTENT = ALL
EXCLUDE = STATISTICS
QUERY = user1.employees: ' where date_dt > = 20150101 and date_dt < = 20150130.
QUERY = user1.managers: ' where date_dt > = 20150101 and date_dt < = 20150130.
Is there any change required above or this is not possible?
Thank you.
Post edited by: 977272 1. Schemas added user1 = 2. Expdp added running with the user of the system
Hello
And by the following condition
QUERY = user1.employees: ' where date_dt > = 20150101 and date_dt.<=>=>
QUERY = user1.managers: ' where date_dt > = 20150101 and date_dt.<=>=>
Select date_dt, count (*) from user1.employees
where date_dt > = 20150130
and date_dt<=>=>
Date_dt group;
The number of lines has recover?
But if I try to put above in the settings file, then it does not work and generates syntax error near ')'
Try to escape from the "("et ") ' with the following" \ ("and" \) ""
Kind regards
Juan M
Tags: Database
Similar Questions
-
DataPump the QUERY parameter with string values? -SOLVED
All,
I'm trying to specify a query to the datapump API parameter but can't seem to get my correct single/double quotes so that it can work. I can successfully use the QUERY parameter with something like QUERY = table: '"number_column = 6" ' but NOT with something like QUERY = table:'"string_column ="value"" "
I tried different versions of the single/double quotes, but all fails with slightly different errors. Someone at - it an example where a string value is used with success?
Thanks in advance. Oracle 10.2.0.3.0 - AIX 5.3
So after reading some other reviews on another thread - I tried this and it worked:
QUERY = table:------"where string_column = 'value\' \' \
Looks like you have escape all single/double quotation marks for this parameter
Published by: potter_geek on August 31, 2009 10:47Hello
Use the parameter file or if you run expdp command-line use escape character '-' (backslash) in this case.
Concerning
Anurag Tibrewal. -
Using the QUERY parameter in exp/expdp
Hi, I've faced a nite last question.
IM currently using Oracle 10 g (10.2.0.4) OS - MS Windows Server 2003
I want a dump of tables to export multiple schemas. say (acb.m1, pqr.b2, xyz.b1)
Each table has a minimum lines of 2,000,000,
And I want to just the initials 10 rows in each table of export
Is it possible that I can do this...
Please answer.
Thanks in advanceExport tables in multiple schemas is not supported in Data Pump until 11.1.0.7. So if you're on 10g, you will need to run multiple commands expdp. For only 10 lines of each table, use the query parameter
Query = "where rownum"<>
This will apply to all the tables you export.
I hope this helps.
Dean
Published by: Dean WINS January 30, 2012 08:42
-
How to wear the formhandler query parameter in jsp
I know that its very stupid question, but I don't get a query parameter. I don't know what mistake I make.
Here is my code snippet:
I created a formhandler
LoginFormHandler.java
public boolean handleLogin (request, response DynamoHttpServletResponse DynamoHttpServletRequest)
throws IOException, ServletException {}
Here the value of the user ID is available I checked using DD
request.setParameter ("userId", username);
handleFlag = checkFormRedirect (getCreateSuccessURL (), getCreateFailureURL(), request, response);
in CreateSuccessURL it redirects to LoginSuccess.jsp
LoginSuccess.jsp
< %
DynamoHttpServletRequest drequest = ServletUtil.getDynamoRequest (request);
% >
value: < %=drequest.getParameter("userId") % >
Once that LoginSuccess.jsp the display is showing the value null of userId
Please let me know how to wear the setting the Manager of jsp.
Application settings will be lost in the success page because the formhandler send a redirect to the success page.
It will be new demand for the success page.
As suggested, or you will need to put this in formhandler, or cookie or in the url
Peace
Shaik
-
Syntax for taking export with the "Query" parameter
Hi all
Please help me about the syntax for export with the query parameter takingHello
exp file=d:\exp.dmp log=d:\exp.log tables=scott.emp query='where empno=10' exp file=d:\exp.dmp log=d:\exp.log tables=scott.emp query='where ename='''SCOTT''
Salman
-
Problem with "Query" parameter data pump
Hello guys,.
My information in the table are less than
Name of the schema: CT_COM
Table name: order_session
The current size of the table = ~ 75
Total number of rows in the table: 3847904-> select count (*) from CT_COM.order_session;
Total number of lines with condition: 734042 (orders over 1 January 08)-> select count (*) from CT_COM.order_session where updated_date < = 31 December 07 ';
Now, I'm taking an export in which I want to capture all the orders that are placed before 1 January 08. Here's the query I use on a DB of RHEL server. I 10.2.0.3 db on this server.
expdp "" / as sysdba "" logfile = FULL_TABLE:order_session_upto_dec_31_07.log query = CT_COM.order_session dumpfile=FULL_TABLE:order_session_upto_dec_31_07_%U.dmp:------"" where updated_date------<------= \'31-DEC-07\'\ ' filesize = 2 G job_name = order_session_upto_dec_31_07 "
Export: Release 10.2.0.3.0 - Production on Wednesday, August 4, 2010 16:11
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Release 10.2.0.3.0 - Production
Departure 'SYS '. "' ORDER_SESSION_UPTO_DEC_31_07 ': ' / * AS SYSDBA' dumpfile=FULL_TABLE:order_session_upto_dec_31_07_%U.dmp logfile = FULL_TABLE:order_session_upto_dec_31_07.log query = CT_COM.order_session:" "where updated_date < = 31 December 07 ' ' filesize = 2 G job_name = order_session_upto_dec_31_07"
Current estimation using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 0 KB
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Table main 'SYS '. "' ORDER_SESSION_UPTO_DEC_31_07 ' properly load/unloaded
******************************************************************************
Empty the files together for SYS. ORDER_SESSION_UPTO_DEC_31_07 is:
/Backup/export/tables/order_session_upto_dec_31_07_01.dmp
Job 'SYS '. "" ORDER_SESSION_UPTO_DEC_31_07 "carried out at 16:11:31
Query runs fine without error. However if you look at the output above it exports all lines. I keep seeing Total estimation using BLOCKS method: 0 KB. -What did I do wrong?
I even tried the same scenerio with table scott.emp and I see the same behavior. Did I miss something in my where clause or is this a bug?
Expdp $ Linux-223: (bonus) "" / as sysdba "" dumpfile=full_table:a%U.dmp logfile = FULL_TABLE:a.log query = scott.emp:------"' where sal------> 2000------' filesize = 2 G job_name = b.job"
Export: Release 10.2.0.4.0 - Production on Wednesday, August 4, 2010 15:11:31
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With partitioning, OLAP, Data Mining and Real Application Testing options
Departure 'SYS '. "' B ': ' / * AS SYSDBA' dumpfile=full_table:a%U.dmp logfile = FULL_TABLE:a.log query = scott.emp:" where sal > 2000 "filesize = 2 G job_name = b.job
Current estimation using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 0 KB
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Table main 'SYS '. "' B ' properly load/unloaded
******************************************************************************
Empty the files together for SYS. B is:
/tmp/A01.dmp
Job 'SYS '. "' B ' managed to 15:12:46
Any help will be appreciated.
-MM
Published by: UserMM on August 4, 2010 14:48It has nothing to do with your request, it has to do with the rest of your order expdp. You specify a schema on the table, or you specified an export scheme so default datapump is the schema to run the task. As you export the work as "sys" it will only export objects belonged to sys. Since datapump does not export the sys objects, nothing get exported. You want to add
schemas = CT_COM
or
tables = CT_COM.order_session
Thank you
Dean
-
Estimate of the size of the dump file with the export query parameter
Hi all
I would like to ask questions about EXPORT utiliy. Can I estimate the size of the dump for export with the parameter file "application"? You can find my syntax exp on below?
exp scwq/sCwq201 parfile = scw.par
contents of the scw.par file.
FILE ='/ u01/EXPDUMP/SCW. DMP ".
TABLES IS MIMO. WFTRA
JOURNAL ='/ u01/EXPDUMP/SCW. JOURNAL"
CONSTRAINTS = NO.
STATISTICS = NONE
QUERY = "WHERE (Eurie > 8132560 AND IN (SELECT FROM mimo.objectcfg WHERE oname sobject = 'TICKET')) OR (Eurie > 188872 AND IN (SELECT FROM mimo.objectcfg WHERE objectname sobject = 'WORDER')) '"
In fact, I know that without query to export file parameter. But I could not find a solution to my question...
B.RHello
From what I've seen when you do 'query =' is not taken into account at all when estimating the size of the dumpfile no matter if you use blocks or statistics methods. All I can suggest you do is get the estimated size and then work manually on what percentage of lines you will be back and then just do a simple calculation.Kind regards
Harryhttp://dbaharrison.blogspot.com
-
I have an error in my statement expdp which I couldn't... then, please help :)
I would like to export the data from the year 2008 only, and the condition is on a timestamp column is...D:\TMP>EXPDP TXV/IS DIRECTORY=EXP_DP DUMPFILE=TEST.DMP LOGFILE=VIDI.LOG TABLES=txv.IS_PODACI2 QUERY=is_podaci:'WHERE TO_CHAR(DATUM, "YYYY")="2008"' LRM-00116: syntax error at ')' following 'YYYY'
DB is 11g R2Quotation marks, apostrophes etc... will be a big problem in the command line. It is dependent on the operating system, and you must use escape characters. Please use one parfile and you don't have to worry about those.
http://download.Oracle.com/docs/CD/B19306_01/server.102/b14215/dp_export.htm#BEHJHGHB
-
Stored procedure for IN query parameter
Hello
Here's the scenario
The user is allowed to search for a product on multiple values. Interface user can enter value as
A, B, C, D (all string values)
This value is passed to a stored procedure as parameter (say v_multipleId). Can I use the v_multipleId directly IN the query?
Example of
Select some_value in the une_table where some_colum IN (v_multipleId)?
If not, then how can I do this?
Thanks in advanceN ° you can use dynamic SQL statements. You can also do the following. Just spent a values separated by commas, for example ", A, B, D,' like v_multipleId and use:"
Select some_value from some_table where v_multipleId like '%,' || some_colum || ',%'
Keep in mind, index on some_colum (assuming there is one) will not be used.
SY.
-
Hi all
I need to export a table with the query clause = "" where rownum < 100 ' "
His works well, but the extraction of all columns.
But I need only selective columns.
Is it possible to export the follwing recordsSelect some_columns from table where rownum < 100
how with exp util?
DB version 10.2.0.4
AIX OPERATING SYSTEM
Thank youYou can not specify columns, only where clause may be specified with exp/expdp.
generate instructions insert with the help of select instead then.
Or if you need to import this data into another database - create link db and just do insert by it. -
Application of stage sets concurrent query parameter query too soon.
e-Business Suite 11.5.10.2 / Oracle Database 10g
I have a request consisting of 3 steps.
The 3rd step runs a concurrrent query that has a file name parameter, that is selected in a db table.
The 2nd step performs a competing request that place the name of a file in the simultaneous db of the 3rd request steps table selects data from.
If I run simultaneous queries outside (independent) demand overall, it works very well.
When I run as a set of demand, the 3rd stage, which executes the SELECT statement by typing the name of the file in the db table runs too early and grabbing the previous value in the db table.
I tried to define incompatibilities and several other things. It's as if the SELECT statement runs at the beginning of all of all of the query, instead of run SELECTION when it gets to the step 3.
I am more technical functional, so your help is appreciated.
Thank you.
-Paul Harvey
[email protected]In my experience, your satisfaction is right on discover that the parameters are obtained before execution and then used. On workaround solutions, if your 3rd program is personalized, do select it as the first step on this issue, then use this info. If not a personalized program, then create a pl/sql "Launcher" that runs to select it to get the name of the file and use the API to call requests to call the actual program.
-
Tools.syncTime query parameter using PowerCLI
Hey,.
I have a vCenter 5.5 full of virtual machines that I need to test compliance with KB1189 - disabling time synchronization
Using Get-AdvancedSetting I can test and get results for all parameters except 'tools.syncTime '. Is there a way to query this setting?
Thank you
There is indeed no need to perform a Get-view extra, you can do
Get - VM | Select Name,@{N='TimeSync'; E={$_. ExtensionData.Config.Tools.syncTimeWithHost}}
-
Error exporting Oracle on the QUERY parameter
Hi all
I would like to ask for help.
This is my environment:
OS: Linux 5.4 32-bit
DB: Oracle 10.2.0.4
Here's what I would do:
Export the selected lines of SH. Table SALES using the query:
SQL > select * from sh.sales
where to_date(time_id,'DD-MON-RR:HH24:MI:SS') = to_date('28-DEC-01:00:00:00','DD-MON-RR:HH24:MI:SS');
My parfile is:
UserID = ' oracle/sys as sysdba'
buffer = 10000000
file = mysales148.dmp
Journal = mysales148.log
TABLES is sh. MySales
Query = "(où to_date(time_id,\'DD\-MON\-RR:HH24:MI:SS\')=\to_date(\'28\-DEC\-01:00:00:00\',\'DD\-MON\-RR:HH24:MI:SS\')" "
RecordLength = 65535
Statistics = none
When I run the script, I get this error:
[oracle@shaoran selective_export] $ exp parfile = exp_mysale.par
Export: Release 10.2.0.1.0 - Production the game 3 Feb 16:57:08 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With partitioning, OLAP and Data Mining options
Export in US7ASCII and AL16UTF16 NCHAR character set
Server uses WE8ISO8859P1 (possible character set conversion) character set
About to export specified tables by conventional means...
Current user has changed to SH
. . MYSALES table export
EXP-00056: ORACLE 911 error encountered
ORA-00911: invalid character
Export completed successfully with warnings.
Hope to hear from you soon.
Thank you very much!First of all,
export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
It is probably the cause of your problem if you have unusual characters in your data.
If this isn't the case, you do not have these "------" in your QUERY. Since you're using parfile, just go with what you would do in sqlplus:
query="where time_id=to_date('28-DEC-01:00:00:00','DD-MON-RR:HH24:MI:SS')"
-
Problem with the query parameter
Hi, I have data some thing like SQL> select * from temp_tabr; INSTITUTE STUDNAME GR MARKS ---------- ---------- -- --------- xxxx abc A 500 xxxx pqq A 550 xxxx zzz B 300 xxxx sss B 400 yxxx abc A 500 yxxx pqq A 550 yxxx zzz B 300 yxxx sss B 400 I want a query to retrive the data based on 3 parameters Institue is mandatory GR and MARKS are optional user may pass any one of the Optional parameters GR or MARKS not both example he may pass Intitute and get all 8 records if he pass Institue and grade it should retrive only those matching if he pass institute and marks it should retrive only those matching only grade or marks will be passed or neighter of them will be passed. create table temp_tabr(institute varchar2(10), studname varchar2(10), grade varchar2(2), marks number); insert into temp_tabr values ('xxxx', 'abc', 'A', '500'); insert into temp_tabr values('xxxx', 'pqq', 'A', 550); insert into temp_tabr values('xxxx' , 'zzz' , 'B' , 300); insert into temp_tabr values('xxxx' , 'sss' , 'B' , 400); insert into temp_tabr values ('yxxx', 'abc', 'A', '500'); insert into temp_tabr values('yxxx', 'pqq', 'A', 550); insert into temp_tabr values('yxxx' , 'zzz' , 'B' , 300); insert into temp_tabr values('yxxx' , 'sss' , 'B' , 400);
Like this?
select * from temp_tabr where institute='&a' and grade = nvl('&b',grade) and marks = nvl(to_number('&c'),marks)
If you pass parameters using the variable, you do not have to use to_number, you can directly pass the name of the variable. I have provided for you to test it in sql * more.
HTH,
Prazy -
EXPORT DATAPUMP with query on a table
Hello
I would like to ask how to include a query in one parfile using EXPDP.
My statement is:
Select * from apt.sales where TO_CHAR (or_date, 'YYYY') = '2011';
My goal is to export only the GOLD (receipts) generated in 2011 in the table APT. SALES
My parfile is correct:
schemas = APT
Query = APT. SALES:'"where TO_CHAR(or_date,'YYYY') = '2011'" ' "
Directory = DATA_PUMP_DIR
dumpfile = ORin2011.dmp
logfile - ORin2011.log
I'm working on an Oracle 10.2.0.1 database in Windows Server 2003.
Help, please.Try to:
1 use the keyword TABLES otherwise all data schema is exported
2. use quoting easier for the QUERY parameter
3. use '=' for the LOGFILE parameterExample with the table HR. T on Windows:
tables=HR.T query=HR.T:"where TO_CHAR(x,'YYYY') = '2011'" directory=DATA_PUMP_DIR dumpfile=ORin2011.dmp logfile=ORin2011.log
C:\>expdp system/xxx parfile=et.par Export: Release 11.2.0.2.0 - Production on Mar. Oct. 18 08:17:36 2011 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production Starting "SYSTEM"."SYS_EXPORT_TABLE_01": system/******** parfile=et.par 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/STATISTICS/TABLE_STATISTICS . . exported "HR"."T" 5.007 KB 1 rows Master table "SYSTEM"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded ****************************************************************************** Dump file set for SYSTEM.SYS_EXPORT_TABLE_01 is: C:\ORACLEXE\APP\ORACLE\ADMIN\XE\DPDUMP\ORIN2011.DMP Job "SYSTEM"."SYS_EXPORT_TABLE_01" successfully completed at 08:17:40
Maybe you are looking for
-
I have a mid 2011 mac book air 13 inch and am trying understand either 128 or 256 or same SSD. any ideas how I can tell?
-
Microsoft Visual C++ Runtime Library Program: c:\ProgramFiles\ Prospects Express\msimn.exe The application requested execution to terminate in an unusual way. For more information, contact the application support team. -------------------------------
-
I wonder my address hot mail I did everything will be deleted this script error
-
List of switching applications
Hi, I already asked about it here, but he wasn't real solution for my problem. So I try once more... I want to add a feature to my app, hidden in list of applications switching (Alt + ESC). I have the following code: public boolean keyChar(char key,
-
How can I change the background of the title in a screen? I want to put an image with transparent background and then set different background colors in the different screens. Is this possible?