Export tables starting with same name format
Hi All,
I need to export set of table below
it_approvals
it_attachments
it_dev_schedule
it_dev_schedule_log
it_email
it_email_group
it_filetype
it_group
it_group_system
it_manage_system
it_menu
it_page
it_page_action
it_parameter
it_personal
it_release_update
it_releases
it_request_forms
it_request_update
it_role
it_role_filetypes
etc....
When i perform the export are there any option to take export all tables starting with it,
below is the command i'm willing to use, what are the parameters should i use to do the above task
exp system/oracle tables=ABC.it_it_page,ABC_it_email file=ABC.dmp log=ABC.log owner=ABC
Try to use datapump export and import.
Please refer this thread
export issue
Similar Messages
-
Oracle deleting rows from tables starting with the name PQ
hai friends
we are given access rights to delete only tables starting with PQ. HAVING PQ_NUM as primary key for all the PQ tables.
totally we have 6 tables. PQ_01,PQ_02, PQ_03,PQ_04,PQ_05,PQ_06.
ALL This tables will have one primary key. for example pq_01 willl have pq01_num as primarykey and pq_02 table will have pq02_num as primary
key.
pq01_num value will exist in all the primary key of pq tables.
i want query to delete rows from the pq tables based on the input value i give.
for example if i give primarykey value 122 then that value in pq tables should be deleted.
One more problem is there. pq_06 table does not have pq02_num column. here the column differs. it is pq06_num_req.
so give your idea of deleting the rows from pq tables
waiting
SI dont have access to databse,this is untested
declare
v_cmd varchar2(2000);
columnname varchar2(30);
input_value number:=??;
tabowner varchar2(30):=???
begin
--step 1 identify table
FOR sub IN (SELECT table_name table_to_delete
FROM all_tables
WHERE table_name LIKE 'PQ%'
and owner=tabowner
) LOOP
----step 2 identify column
v_cmd :='select t.column_name from all_constraints S,All_Ind_Columns T where
S.OWNER=T.TABLE_OWNER
AND S.TABLE_NAME=T.TABLE_NAME
AND S.INDEX_NAME=T.INDEX_NAME
and s.owner=tabowner
AND S.TABLE_NAME='||table_to_delete||'
and s.constraint_type='''P'';
execute immediate v_cmd into columnname;
--step 3 delete records
v_cmd := 'delete from '||tabowner||'.' ||
sub.table_to_delete || '
where '||columnname||'='||input_value;
execute immediate v_cmd;
commit;
END LOOP;
end;Edited by: user5495111 on Aug 11, 2009 6:35 AM -
How to export table data with coloring of cell according to value.
Hi all,
I am using jdeveloper 11.1.1.6
i want to export table data with lot of formatting. like with coloring of cell according to value and so many.How to do that?Hi,
like with coloring of cell according to value and so many.How to do that?
Answer is, you can't
Frank -
TIPS(22) : EXPORTING TABLES BASED ON TABLESPACE NAME
제품 : ORACLE SERVER
작성날짜 : 1996-11-12
TIPS(22) : Exporting tables based on Tablespace name
====================================================
This script allows the user to enter the tablespace name and creates a list
of tables in exp format. Additional choices allow the export of over-extended
tables or tables over a certain size.
rem list.sql
rem Give list of tables depending on parameters
set termout on linesize 75 pagesize 0 verify off feedback off
clear buffer
clear columns
prompt
prompt This script will create list.out, which can be used
prompt to give export tables parameter file
prompt
accept Segment_Name Prompt 'Enter Seg Name : '
accept owner Prompt 'Enter Seg Owner : '
accept tsname prompt 'Enter TableSpace Name : '
accept min_extents Prompt 'Enter Minimum num of exts : '
accept min_size Prompt 'Enter Minimum seg size(M) : '
prompt
accept expchoice Prompt 'Is this list for exports ? : '
col srt noprint
SPOOL list.out
-- start bit
select 0 srt, decode(upper('&expchoice'),'Y','tables=(','')
from dual
union
-- data bit without end segment
select 1 srt, segment_name||decode(upper('&expchoice'),'Y',',','')
from dba_segments
where segment_type = 'TABLE'
and segment_name like upper('&&Segment_Name%')
and owner like upper('&&owner%')
and tablespace_name like upper('&&tsname%')
and extents >= (&&min_extents + 0)
and bytes >= (&&min_size + 0) * (1024*1024)
minus
-- remove last one (with ',' after the name)
select 1 srt, max(segment_name)||decode(upper('&expchoice'),'Y',',','')
from dba_segments
where segment_type = 'TABLE'
and segment_name like upper('&&Segment_Name%')
and owner like upper('&&owner%')
and tablespace_name like upper('&&tsname%')
and extents >= (&&min_extents + 0)
and bytes >= (&&min_size + 0) * (1024*1024)
union
-- data bit with end segment
select 3 srt, max(segment_name)||decode(upper('&expchoice'),'Y',')','')
from dba_segments
where segment_type = 'TABLE'
and segment_name like upper('&&Segment_Name%')
and owner like upper('&&owner%')
and tablespace_name like upper('&&tsname%')
and extents >= (&&min_extents + 0)
and bytes >= (&&min_size + 0) * (1024*1024)
order by 1,2
spool off
set heading on
****************************************************************Hi,
You will have to use dynamic sql to create your second cursor.
DECLARE
v_sql_query VARCHAR2(400);
TYPE cur_typ IS REF CURSOR;
c1 cur_typ;
mYRec MyTable%rowtype;
BEGIN
v_sql_query := 'select * from MyTable';
OPEN c1 FOR v_sql_query;
LOOP
FETCH c1 INTO mYRec;
EXIT WHEN c1%NOTFOUND;
EXIT WHEN c1%NOTFOUND IS NULL;
/*processing here*/
END LOOP;
CLOSE c1;
END;
Regards -
Can I run 2 different domains with same name but on 2 different machines?
I am trying to setup 2 domains with same name (sharedcds1) on 2 different machines (Machine1 and Machine2).
When I start the weblogic managed server 1 (sharedcds1managedserver1) on Machine2, it throws an error saying it has some conflicts with the managed server 1 running on Machine1. How did the managed server of one machine know about the other server. Can I run 2 different domains with same name but on 2 different machines?
Here is the error in the log -
<Jun 14, 2005 10:53:29 AM EDT> <Error> <Cluster> <BEA-000123> <Conflict start: You tried to bind an
object under the name weblogic.transaction.coordinators.sharedcds1managedserver1 in the JNDI tree.
The object from 4596206652609838848S:130.170.61.153:[9505,9505,-1,-1,9505,-1,-1,0,0]:sharedcds1:s
haredcds1managedserver1 is non-clusterable, and you have tried to bind more than once from two or m
ore servers. Such objects can only be deployed from one server.>
<Jun 14, 2005 10:53:29 AM EDT> <Error> <Cluster> <BEA-000123> <Conflict start: You tried to bind an
object under the name weblogic.transaction.coordinators.sharedcds1managedserver1 in the JNDI tree.
The object from 8842351474821025197S:130.170.61.154:[9505,9505,-1,-1,9505,-1,-1,0,0]:sharedcds1:s
haredcds1managedserver1 is non-clusterable, and you have tried to bind more than once from two or m
ore servers. Such objects can only be deployed from one server.>
Thanks
SatishYes you can. Make sure that domains configured to use different multicast address. WLS uses multicast for communications between nodes in domain.
although your configuration will work, you could have troubles if you going to execute inter-domain calls between domains/servers with the same names. -
Two methods with same name but different return type?
Can I have two methods with same name but different return type in Java? I used to do this in C++ (method overloading or function overloading)
Here is my code:
import java.io.*;
public class Test{
public static void main(String ar[]){
try{
//I give an invalid file name to throw IO error.
File file = new File("c:/invalid file name becasue of spaces");
FileWriter writer = new FileWriter(file ,true);
writer.write("Test");
writer.close();
} catch (IOException IOe){
System.out.println("Failure");
//call first method - displays stack trace on screen
showerr(NPe);
//call second method - returns stack trace as string
String msg = showerr(NPe);
System.out.println(msg);
} // end of main
public static void showerr(Exception e){
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
try{
pw.close();
sw.close();
catch (IOException IOe){
IOe.printStackTrace();
String stackTrace = sw.toString();
System.out.println("Null Ptr\n" + stackTrace );
}//end of first showerr
public static String showerr(Exception e){
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
try{
pw.close();
sw.close();
catch (IOException IOe){
IOe.printStackTrace();
return sw.toString();
}//end of second showerr
} // end of class
[\code]Overloading is when you have multiple methods that have the same name and the same return type but take different parameters. See example
public class Overloader {
public String buildError(Exception e){
java.util.Date now = new java.util.Date() ;
java.text.DateFormat format = java.text.DateFormat.getInstance() ;
StringBuffer buffer = new StringBuffer() ;
buffer.append(format.format(now))
.append( " : " )
.append( e.getClass().getName() )
.append( " : " )
.append( e.getMessage() ) ;
return buffer.toString() ;
public String buildError(String msg){
java.util.Date now = new java.util.Date() ;
java.text.DateFormat format = java.text.DateFormat.getInstance() ;
StringBuffer buffer = new StringBuffer() ;
buffer.append(format.format(now))
.append( " : " )
.append( msg ) ;
return buffer.toString() ;
public String buildErrors(int errCount){
java.util.Date now = new java.util.Date() ;
java.text.DateFormat format = java.text.DateFormat.getInstance() ;
StringBuffer buffer = new StringBuffer() ;
buffer.append(format.format(now))
.append( " : " )
.append( "There have been " )
.append( errCount )
.append( " errors encountered.") ;
return buffer.toString() ;
}Make sense ???
Regards, -
Two soa domain with same name "TestSOADomain" sharing same SOA schema ?
I tried creating two soa domain with same name "TestSOADomain" (different path) sharing same SOA schema .However one domain came UP to Running mode and other domain going to AdminMode and "soa-infra" application of that domain is not active.
I do want to understand can this be possible with SOA ,ie. two soa domain sharing same SOA schema ?
If possible what are all the problems might come
1. While executing soa composites with asyncronous behaviour ?
2. How the polling services will work ?
3. will the XREF_DATA table ROW_NUMBER column inserted uniquely while inserting data from two different domain into same SOA schema ?
4. Other issues ?
ThanksEach domain is expected to refer to its own unique database schema. Same SOA schema should not be shared by multiple SOA clusters/domains. It is technically possible though, I suppose, and still can run fine any one SOA environment at any given time with the other SOA environments/domains (sharing the same SOA schema) shutdown. It is not the general/recommended practice to share SOA schema across domains and there could be potential implications and unexpected behavior, particularly when the SOA environments pointing to the same schema are all running at a time.
-
Passing multiple URL parameters with same name
Hi,
I have a question which is not entirely related to Java. But although its related HTTP calls, so I thought I might get some ideas here.
Background:
I am making HTTP URL call from SAP ABAP code. Its pretty much similar to Java (creating URL connection, setting HTTP headers, connecting, receiving response and everything)
For example,
http://service_server:8080/a7/extension.services.SearchRequirements.a7x?RequestStatus=CR&RequestStatus=RR
Now, this service_server runs a query to database where it uses both these values of "RequestStatus" to form 'OR' condition for a field.
Issue:
When I run this URL from browser, it shows XML response containing results for both values. In short, this is the ideal response.
(I am using getParameterValues(string) at service_server to read multiple values for same parameter)
But when I see response in SAP system, I see that it is returning data for only one value of 'RequestStatus'.
I checked the logs of service_server, and I see that it has received only one parameter, not two.
Question:
It seems like SAP systems web server is truncating both parameters with same name and passing just one of them to outside server(??)
Is there any configuration at Web Server side or any HTTP headers to be set so as to avoid this?
Can anybody suggest something on this?I managed to resolve this issue by using HTTP 'Post' method to send the data.
CALL METHOD CL_HTTP_CLIENT=>CREATE_BY_URL
EXPORTING
URL = L_URL
IMPORTING
CLIENT = L_HTTP_CLIENT
EXCEPTIONS
ARGUMENT_NOT_FOUND = 1
PLUGIN_NOT_ACTIVE = 2
INTERNAL_ERROR = 3
OTHERS = 4 .
"STEP-2 : AUTHENTICATE HTTP CLIENT
CALL METHOD L_HTTP_CLIENT->AUTHENTICATE
EXPORTING
USERNAME = 'name'
PASSWORD = 'password'.
"STEP-3 : SET HTTP HEADERS
CALL METHOD L_HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING NAME = 'Accept'
VALUE = 'text/xml'.
CALL METHOD L_HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING NAME = '~request_method'
VALUE = 'POST' .
CALL METHOD L_HTTP_CLIENT->REQUEST->SET_CONTENT_TYPE
EXPORTING CONTENT_TYPE = 'application/x-www-form-urlencoded' .
"SETTING REQUEST DATA FOR 'POST' METHOD
IF L_PARAMS_STRING IS NOT INITIAL.
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
TEXT = L_PARAMS_STRING
IMPORTING
BUFFER = L_PARAMS_XSTRING
EXCEPTIONS
FAILED = 1
OTHERS = 2.
CALL METHOD L_HTTP_CLIENT->REQUEST->SET_DATA
EXPORTING DATA = L_PARAMS_XSTRING .
ENDIF.
"STEP-4 : SEND HTTP REQUEST
CALL METHOD L_HTTP_CLIENT->SEND
EXCEPTIONS
HTTP_COMMUNICATION_FAILURE = 1
HTTP_INVALID_STATE = 2.
"STEP-5 : GET HTTP RESPONSE
CALL METHOD L_HTTP_CLIENT->RECEIVE
EXCEPTIONS
HTTP_COMMUNICATION_FAILURE = 1
HTTP_INVALID_STATE = 2
HTTP_PROCESSING_FAILED = 3.
"STEP-6 : READ RESPONSE DATA
CALL METHOD L_HTTP_CLIENT->RESPONSE->GET_CDATA
RECEIVING DATA = L_RESULT .
"STEP-7 : CLOSE CONNECTION
CALL METHOD L_HTTP_CLIENT->CLOSE
EXCEPTIONS
HTTP_INVALID_STATE = 1
OTHERS = 2 .
{code} -
Merging Log Files with same name
Hello,
I have log files with same name 00000000.jdb (because created at different machines). I would like to merge data stored in these two files.
I tried below approaches which do not work:
1. rename one of the files -> doesn't work as file header has file name info which doesn't match with renamed value
2. db dump/load -> dump and load works without error. (i have to dump Entity related Database and Format related Database -- from -l option) However when i try to read the file, it gives error.
Exception in thread "main" com.sleepycat.je.EnvironmentFailureException: (JE 5.0.103) Catalog could not be refreshed, may indicate corruption, errorFormatId=52 nFormats=51, . UNEXPECTED_EXCEPTION: Unexpected internal Exception, may have side effects.
I am using EntityStore and thus Annotated Entities.
Does any one has any insights?
Thanks.Yuvaraj,
As you discovered, it is not possible to use .jdb files from one environment in a different environment. The .jdb files use an internal format with relationships between files that form the Btree.
I'm glad to hear you were able to use DbDump and DbLoad successfully.
--mark -
We have a requirement where in we have multiple solaris servers and each solaris server has a directory with the same name.
The files in these directories will be different.
These same name directories on multiple severs has to be mounted to a single directory on another sever.
We are planning to use NFS, but it seems we can not mount multiple directories with same name on different severs to a single mount point using NFS, and we need to create multiple mount points.
Is there any way we can achieve this so that all the directories can be mounted to a single mount point?You can try to mount all these mount points via NFS in one additional server and then export this new tree again via NFS to all your servers.
No sure if this works. If this works, then you will have in this case just an additional level in the tree. -
Hello Everybody,
Few months back I have upgraded my OS to latest Mountain Lion version.
I am facing a unique problem for last1 month. I am not able to open any of the apple website starting with the name "Apple" such as apple.com, http://www.apple.com/mac/, http://www.apple.com/ipod/ etc but I am successfuly able to open http://store.apple.com/ (as you can see this is not starting with apple but starting with store).
I have reseted my safari, tried different browser such Opera, but not successful.
Can you please provide a solution for this?
thanks
@diHi I have same prob on a client's Macbook Pro and iMac both on 10.5.8 (but problem there before update). Have deleted all cookies (and preferences and cookie database etc), history etc but problem reappears after 3 or links are clicked on www.apple.com site. If I clear cookies problem goes away again only to come back. Have tried creating a new user account - same problem! tried archive and install of OS X, same problem still. tried two different internet connections - same problem. problem not limited to web browsers either - iTunes has issues and client had his iPhone lock itself because he could not connect to apple to verify the device when he installed a software update. Major headache. Any ideas would be great!
-
How to create device IDs with same name
i am using SE 3310 and its creating different device ids for each node sharing it . since I will be building a RAC enviornment I need these IDs/name to be same .
for example on one node the lun id is /dev/rdsk/c3t0d0s6 but the same lun id on node 2 is /dev/rdsk/c2t0d0s6.
In past with an old storage array I fixed this issue by creating links in /dev/rdsk for c3t0d0s6 ---> c2t0d0s6.
my question is : is there a way in SE3310 that device ids get created with same name or do i still have to rely on creating these soft links ?
thanks
Note: since i need the answer to this quickly i will wait a while and then post this question in other forums and i will update the question here with the answer .This could be a Solaris (I presumed) O.S. question rather than SE3310 or storage question.
The logical device (/dev/[r]dsk/*) is the work of the O.S. when it first configures the device, in this case the LUN from your SE3310. I can go in depth on how the cX number happens (due to device probe order, driver differences, history of device discovery due to need of persistent device naming, etc...) but ... it's a really long story and is really quite irrelevant and most people should not be interested...
If you have COMPLETELY identical servers, i.e. identical hardware down to specific HBA in specific slot are the same, and if you make sure that luns are presented to all servers exactly the same way, same order, and any changes are seen by all servers in the same sequence, in theory, all /dev/rdsk/* devices will be consistent across servers.
But that's still rather irrelevant. Application that is designed to work in a redundant environment should not be dependent on logical devices like /dev/rdsk being the same.
So ... in effect this is also not a question for the Solaris forum, but rather a question for those familiar with RAC, how to configure such that device access is done "safely" through actually identifying the lun rather than assuming /dev/rdsk are consistent. -
How to create two employees with same name as supplier record?
Dear all,
We need to create a supplier record for an employee so that we can issue invoice for pretty cash payment. If there are 2 employees with same name, how can we create supplier records for these 2 employees? The system does not allow duplicate supplier name.
Please advise.
Regards,
HYHello,
In R12 it is possible to create 2 employee with same name but different employee number.
And also possible to create these 2 employees as suppliers in Payables.
HTH,
Vik -
Automator and applescript to copy new files in a folder with same name as parent folder
I have an iMac with a pictures folder (Finder folder) containing several subfolders with pictures. As per now, all these subfolders are imported into an iPhoto library (and the structure of the Finder pictures folder is thus maintained: The iPhoto events are named the same as the Finder subfolder). I.e. I have not created any albums in iPhoto.
I have also set up a workflow, where new iPhone photos are automatically being synced to specified Finder folders within the iMac pictures folder. So what I want to do is to make a workflow to import potential new photos from week to week into the existing iPhoto structure. I know iPhoto has this Autoimport folder, so this one is unpacked and "mapped". So, this is what I´m hoping to do:
Automator (iCal - want to do this on a weekly basis):
- Get specified Finder items -- set to target folder = iMac pictures folder
- Get folder content (with subfolders)
- Filter Finder items
- Items from the last 7 days (which then would be any new files created last week)
- Applescript/shell script loop(?)
- Get folder name for each file´s (from previous step) parent folder
- Create new folder with same name as the file´s parent folder (if not already existing) under the iPhoto Autoimport folder
- Copy the given file into the folder from above
- Run iPhoto application (Automator task), which then should just auto import the new photos according to the Finder folder structure
Whith the workflow above, I aim to maintain the existing iPhoto structure, and just import new photos into the existing structure. Creating folder names under the Autoimport, similar as the existing Finder folder names / iPhoto events should make it possible to have the new files imported under the existing event, right?Anyone?
I have now switched to Aperture (from iPhoto) due to Aperture´s capability to handle Finder folder structure, and due to the possibility of having the pictures within Aperture as referenced files to the pictures within the Finder folders (i.e. possibility to delete pictures from both library and Finder folder at the same time).
So I have a superior Finder folder called "Album". Within "Album" I have several subfolders (sub albums) containing pictures. The "Album" folder with subfolders are imported into Aperture as "Projects and albums", and the pictures are uploaded within the Aperture structure as referenced files. So for now the Aperture structure is more or less a direct mirror of the Finder folder structure, whereas "Album" is the project.
And this is my current workflow in Automator, but I´m searching help with my Applescript:
- Get specified Finder items (target folder = the superior Finder folder "Album")
- Get Folder content
- Filter Finder items (to look for potential new files to import into Aperture)
- Kind is not folder
- Date created last X days
The output files from this task enters an Applescript
on run {input, parameters}
repeat with f in input (**Loop**)
tell application "Finder"
set fileName to name of (f)
set parentFolder to name of container of (f)
tell application "Aperture"
tell library 1
tell project "Album"
if (exists album parentFolder) then
** I then would like to check if fileName already exist within the existing album**
** If not existing, I would like to import file f into the existing album as a referenced file**
else if not (exists album parentFolder) then
make new album with properties {name:parentFolder}
** I then would like to import file f into the new album as a referenced file**
end if
end tell
end tell
end tell
end tell
end repeat
end run -
Error while uploading document with same name in Document library
Hi,
Whenever I try to upload document with same name in Document library it throws an error. I know its a default behavior but is there any way so that I can upload documents with same name or can we append some unique id with title of the document?
Please suggest.
ThanksNo, unfortunately this is not possible. SharePoint treats the file name as the primary key identifier for a document so if you try to upload a second document with the same name it will assume this is a new version of the file. If you have versioning enabled
on the document library, it will add this as a new version. If not, it will overwrite the original file with the new one.
If you need two documents with the same name, you will have to either place them in different folders within a document library or in different document libraries.
http://stackoverflow.com/questions/11894968/uploading-documents-with-same-name-to-sharepoint-2010
Regards,
Rajendra Singh
If a post answers your question, please click Mark As Answer on that post and Vote as Helpful
http://sharepointundefind.wordpress.com/
Maybe you are looking for
-
What causes an interaction to stop working when you have to re-publish it?
I have created a course using Adobe Presenter 9 and PowerPoint 2010. It has several interactions. Everything tests correctly. I then re-publish the file and open it, one of the interactions no longer works. I need know what should do to prevent this
-
Error in sxmb_moni : message scheduled
hi, in sxmb_moni , i get the status messasage "scheduled". my queue status is "message waiting in queue". my receiver field is empty. can somebody help me to solve this problem. thanks in advance, disney
-
See question.
-
Battery Life with MacBook Pro 13" 2011
Hi there, I have a question here that I would like to ask all experienced Mac users as I'm a total newbie to the Mac world. I just bought my MacBook Pro 2.3 GHz i5 model and realised that the battery is not functioning as promised/advertised. I drain
-
Free 1-hour webinar: "Using pdfmark commands to define Acrobat features in FrameMaker: an introduction" December 15, starting 10am PST [ Register at: https://www3.gotomeeting.com/register/728332454 ] Are you interested in PDF settings beyond what can