Export all the database tables into CSV
I am using Oracle 10 g Release 2
I need to expot all the database tables off of an oracle schema to it's corrosponding CSV files.
Can I use 'EXP U_name/pswd GRANTS=Y TABLES=(table_A,table_B,table_C)' .?
Any advise is a plus.
Thanks in advance
Jay
Pl post OS and database versions.
If you have access to execute database export utilities, then use the TABLES parameter as you have indicated
exp - http://docs.oracle.com/cd/E11882_01/server.112/e22490/original_export.htm#sthref1927
expdp - http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_export.htm#sthref135
HTH
Srini
Similar Messages
-
Delete all the database table content
Hello Friends,
I have a z table with 5 fields (all the key fields) and I want to delete all the table content and load fresh content from internal table.
I tried using syntax 'delete ztable' but sy-subrc value is coming as 4, means no table content is getting deleted.
Please suggest me any alternative way to delete all the database table content.
Thanks in advance,
ShreekantHi,
try using
delete from ztable.
This will delete all records from your ztable. After this command u can fill your ztable from itab by the following command
select *
from std table
into corresponding fields of itab.
insert ztable from table itab.
Hopefully this will solve your problem.
Regards,
Ibrar -
How to transport the DATABASE TABLE into the Test system ?
Hi Experts,
I am working on BI7, I had created Database table in BDV system using SE11. Tech_name is ZGLACC_TEMP. I had activated it. I had used this database table for the purpose of writing the start routine in the transformation. while I am transporting the transformations to the test system, It is showing as syntax error in ABAP program,
In BDV system there are no syntax errors. it is working fine,
So now I have to transport the database table to test system so that I can transport the transformations into Test system without any error.
Kindly anyone can give the answer , it will be appreciate and points will be assigned.
thanks
sekharHi Sekhar,
Go to SE11, go into the change mode of your table and change the Object Directory entry (Goto -> Object Directory Entry) to some valid package (other than $tmp). Then it will ask for a transport request. Give a transport request and then I believe you know what to do with that transport.
Another thing to keep in mind ... transport all the data elements and domains you have created for this table. Change their Object Directory Entry and assign them to the same transport request.
Best regards,
Kazmi -
Import data from oracle database table into csv file
Hi
I have to import data from a table into a csv file. Could anyone suggest the best method to do it? My application is JSP as frontend and have put business logic in servlet.
Thanks in advance.FastReader from wisdomforce will help you quickly export data into csv file. http://www.wisdomforce.com
fastreader can be called and executed as an external process ( Runtime.exec(..) ) to extract data from Oracle tables into flat file -
Not able to export all the rows into excel
Hi All,
I'm not able to export all the records in discoverer report to excel sheet.
There are actually 27000 records in discoverer report, when i export them to excel sheet i can see only 16000 records.
I'm using discoverer plus.
Any suggestions...please share with me.
Thanks in advance,Hi,
Do you have parameters on the worksheet? if so then are you selecting same as when you ran it?
What version are you using ? Plus? Viewer? Desktop?
You can export the worksheet into CSV instead of XLS and see what you get.
Also check other formats to see if this missing lines happen in all export methods or just the XLS. -
Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.The Oracle documentation has a good overview of the options available
Generating XML Data from the Database
Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
You can also find some information in XML DB FAQ -
Import and export the database table
I would like to know what is the syntax of using imp.exe and exp.exe to import and export the database table?
Could anyone teach me what is the syntax and how could do the export and import in the Forms?
Thanks a loT~try: imp help=yes
Or read the documentation online on OTN. -
How to write select query for all the user tables in database
Can any one tell me how to select the columns from all the user tables in a database
Here I had 3columns as input...
1.phone no
2.memberid
3.sub no.
I have to select call time,record,agn from all the tables in a database...all database tables have the same column names but some may have additional columns..
Eg: select call time, record,agn from ah_t_table where phone no= 6186759765,memberid=j34563298
Query has to execute not only for this table but for all user tables in the database..all tables will start with ah_t
I am trying for this query since 30days...
Help me please....any kind of help is appreciated.....Hi,
user13113704 wrote:
... i need to include the symbol (') for the numbers(values) to get selected..
eg: phone no= '6284056879'To include a single-quote in a string literal, use 2 or them in a row, as shown below.
Starting in Oracle 10, you can also use Q-notation:
http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements003.htm#i42617
...and also can you tell me how to execute the output of this script. What front end are you using? If it's SQL*Plus, then you can SPOOL the query to a file, and then execute that file, like this:
-- Suppress SQL*Plus features that interfere with raw output
SET FEEDBACK OFF
SET PAGESIZE 0
-- Run preliminary query to generate main query
SPOOL c:\my_sql_dir\all_ah_t.sql
SELECT 'select call time, record, agn from '
|| owner
|| '.'
|| table_name
|| ' where phone_no = ''6186759765'' and memberid = j34563298'
|| CASE
WHEN ROW_NUMBER () OVER ( ORDER BY owner DESC
, table_name DESC
) = 1
THEN ';'
ELSE ' UNION ALL'
END AS txt
FROM all_tables
WHERE SUBSTR (table_name, 1, 4) = 'AH_T'
ORDER BY owner
, table_name
SPOOL OFF
-- Restore SQL*Plus features that interfere with raw output (if desired)
SET FEEDBACK ON
SET PAGESIZE 50
-- Run main query:
@c:\my_sql_dir\all_ah_t.sql
so that i form a temporary view for this script as a table(or store the result in a temp table) and my problem will be solved..Sorry, I don't understand. What is a "temporary view"? -
I need to rebuild my computer which has iTunes synced with my iPhone and iPad. How do I export all the settings from iTunes so I can import them into the new install and not have to go through all the setup again? My music library is my own and on a NAS drive so not going to lose it. I am mainly concerned about setup parameters. Thank you for any assistance.
There's nothing to export.
The iTunesLibrary.itl file contains all the settings, playlists, and playcounts.
Copy or backup all your important files including the ENTIRE iTunes folder, then restore all your data including the ENTIRE iTunes folder once the system is formatted and rebuilt/reloaded. -
How to export all the workbooks from database to a filesystem on 4.1.37 ?
We have all the workbooks stored in the database and I wanted to them to be
saved in the filesystem (4.1.37).
Is there a batch file with which I can export all the workbooks and put them individually
(abc.dis,xyz.dis) on the filesystem ?
Show me an example ? rather than directly me to some documents ?
Any help !!!!!!!!Using command line options as follows:
<file-workbook>
/open <file-workbook>
/opendb <file-workbook>
/connect <username>/<password>@<database>
/p <file-workbook>
/pt <file-workbook> <printer> <driver> <port>
/export <format> <export-file>
/sheet {<sheet-name> | <sheet-number> | ALL}
/batch
/parameter <parameter-name> <parameter-value>
An example of running the file to a printer in batch mode (entered
from the command line):
c:\orant\discvr30\dis30usr.exe /connect scott/tiger@yogi733 /p c:
\orant\discvr30\test.dis /batch
An example of exporting to an html file in batch (entered from the
command line):
c:\orant\discvr30\dis30usr.exe /connect scott/tiger@yogi733 /open c:
\orant\discvr30\test.dis /export HTML c:\test.htm /batch
An example of exporting to a html file in batch when the parameter
names used contains spaces i.e parameter name is 'day of week'
c:\orant\discvr30\dis30usr.exe /connect user/password@db /open
"d:\orant\discvr30\testparameter.dis" /parameter "Day of Week" Wednesday
/export html d:\test.html /batch
Hope it helps!
Regards,
Marcos -
How to get all the custom tables created in database
Hi,
Is there any sql query present to fetch the name of all the custom tables(Not the tabless inbuilt tables which is given by oracle) present in any module like iExp,iRec or anything.
ThanksIt is difficult to differentiate custom tables from the seeded ones if there is no naming conventions followed during their creation. The custom schema or owner name can be used to differentiate them.
Thanks,
Neeraj -
How to export all the views in one schema?
Hi,
I have more than 1000 views in one shcema.
How to export all the views in one schema?
AmyHi,
It's not a very easy question, I have develop a script wich create a script to create view from old database to new database :
/* &1: Oracle SID Source
/* &2: Oracle Schema Source
SET HEAD OFF
SET VERIFY OFF
SET PAGESIZE 0
SET LONG 40000000
SET LONGCHUNKSIZE 2000
SET LINESIZE 2000
SET FEEDBACK OFF
CREATE TABLE RECREATE_VIEW(VIEW_NAME VARCHAR2(30), TEXT LONG);
/* Selection du texte de la vue */
DECLARE
w_text long;
w_text_debut long;
w_text_column long;
w_view varchar2 (30);
w_schema varchar2 (8):='&2';
CURSOR w_cursor IS
SELECT a.view_name, a.text
FROM dba_views a
WHERE a.owner = w_schema;
CURSOR w_column IS
SELECT DECODE (ROWNUM,
1, 'CREATE OR REPLACE FORCE VIEW ' || '&' || '1..'
|| a.table_name || chr(10)
|| '('
|| a.column_name
|| DECODE (ROWNUM, nbcolumns, ')' || chr(10) || 'AS' || chr(10), ',' || chr(10))
FROM (select column_name,table_name
FROM dba_tab_columns
WHERE owner = '&1'
AND table_name = w_view
order by column_id ) a,
(SELECT COUNT (1) nbcolumns
FROM dba_tab_columns
WHERE owner = '&1'
AND table_name = w_view
GROUP BY owner, table_name) b
order by rownum;
BEGIN
OPEN w_cursor;
LOOP
FETCH w_cursor INTO w_view, w_text;
EXIT WHEN w_cursor%NOTFOUND;
w_text_debut := NULL;
w_text_column := NULL;
OPEN w_column;
LOOP
FETCH w_column INTO w_text_column;
EXIT WHEN w_column%NOTFOUND;
w_text_debut := w_text_debut || w_text_column || ' ';
w_text_column := NULL;
END LOOP;
CLOSE w_column;
w_text := w_text_debut||w_text||';';
insert into RECREATE_VIEW(VIEW_NAME, TEXT) VALUES (w_view, w_text);
COMMIT;
w_text := NULL;
w_view := NULL;
END LOOP;
CLOSE w_cursor;
END;
SPOOL scripts_views_&1..sql
PROMPT SPOOL scripts_views_&1..log
PROMPT
SELECT TEXT
FROM RECREATE_VIEW;
PROMPT
PROMPT SPOOL OFF
PROMPT
SPOOL off
PROMPT /* Formattage du fichier SQL */
!sed 's/[ ]*$//' scripts_views_&1..sql > aprilia.tmp
!rm scripts_views_&1..sql
!mv aprilia.tmp scripts_views_&1..sql
DROP TABLE RECREATE_VIEW;
EXIT
I hope that help you.
Nicolas. -
The type of the database table and work area (or internal table)...
Hello
I am trying to use a database and select all records from it and store them into an internal table.
My code:
Select * from xixi_dbcurrency into table gt_currency.
The error:
"The type of the database table and work area (or internal table) "GT_CURRENCY" are not Unicode-convertible . . . . . . . . . . "
Any suggestions?
Thank youHi Thomas,
Thank you for your inputs above.
But as you suggested is we use INTO CORRESPONDING FIELDS OF TABLE then it resolve the error.
But I have below piece of code:
DATA: it_new_source TYPE STANDARD TABLE OF _ty_s_sc_1,
wa_source TYPE _ty_s_sc_1,
wa_new_source TYPE _ty_s_sc_1,
ls_target_key TYPE t_target_key.
SELECT * INTO CORRESPONDING FIELDS OF TABLE it_new_source
FROM /bic/afao06pa100
FOR ALL ENTRIES IN SOURCE_PACKAGE
where /bic/fcckjobno = SOURCE_PACKAGE-/bic/fcckjobno
and /bic/fcckjitid = SOURCE_PACKAGE-/bic/fcckjitid.
But since this is reading into corresponding fields of table the data load from one DSO to other DOS is running for long more that 15 hours and still not getting completed and giving dump.
So if I switch the search to below:
SELECT * FROM /bic/afao06pa100
INTO TABLE it_new_source
FOR ALL ENTRIES IN SOURCE_PACKAGE
where /bic/fcckjobno = SOURCE_PACKAGE-/bic/fcckjobno
and /bic/fcckjitid = SOURCE_PACKAGE-/bic/fcckjitid.
Then I am getting below error:E:The type of the database table and work area (or internal table) "IT_NEW_SOURCE" are not Unicode convertible.
Can you please advice on this, as performance need to improve in start routine code.
Thank You. -
Change the data in fieldcat and update the database table in alv oops
Hi,
my requirement is i have displayed a fieldcat in change mode and when i change the data and click on save it has to be updated the database table..
this has to be done using alv oops...Hi,
This code will reflect all the changes into the internal table that is being displayed.
* to reflect the data changed into internal table
DATA : ref_grid TYPE REF TO cl_gui_alv_grid. "new
IF ref_grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref_grid.
ENDIF.
IF NOT ref_grid IS INITIAL.
CALL METHOD ref_grid->check_changed_data.
ENDIF.
Now after this code is executed the internal table is modified as per the changes done in alv output.
Now you can use this internal table to update the database table.
Hope this helps you.
Regards,
Tarun -
Tool to create Java Object classes using the Database Tables
Hi,
Is their any tools or utility available to create the Java Object Classes using the Database Tables as input.
Lets Say I am having the Employee, Employee_Salary tables in the Database.The utility has to create the Java Object classes with the relation.
Please Help...
Thx..Hm, for generating regular Java classes I wouldn't know one from memory. But I suggest you start searching in for example the Eclipse marketspace for a third party plugin that can do it. If all fail, you could always use Hibernate Tools from the Jboss Tools Eclipse plugin set to generate Hibernate/JPA entities and then strip the annotations from them to turn them into regular POJO classes.
How many tables are we talking about anyway? It might be less effort to just create the classes with properties and then use an IDE to generate getters and setters for them.
Maybe you are looking for
-
How to run a java project based on x86 Windows XP on Windows CE?
I am a freshbird of J2ME and i am very confused these days.I beg you can look this topic thoughout. I used to configurate a Java Project File about SIP&VOIP successfully,and I can run it well on my PC . Now I want to migrate the project to a Mobile O
-
My home button does not respond most of the time. Is this a hardware failure?
I've had quite a bit of difficulty with getting my home button to respond. Sometimes, the only way to get back to the home screen is to do a hard reset. I constantly close any open apps, thinking that this might be the problem (memory issue). Hoping
-
OBJ_TYPE AND OBJ_NAME x REAL PROGRAM NAME
Hi Experts, With the corresponding entries in e071, I need fo find the specific report and use the command "READ REPORT" in my abap program. But when the OBJ_TYPE is not a program (<>PROG) - Ex. Function, Methods, i can't use the read report just usi
-
Mac Lion Outlook 2011 and PC Win7 Outlook 2010 sync to iCloud
I would like to use Outlook on my Mac or PC and also have them all sync to iCloud so no matter where I am iPhone iPad PC or Mac all my Outlook Contacts Calendar .... Is there and the same.
-
Inbox has messages titled no sender, these cannot be deleted
My inbox has no "no sender" titled in th message box, how do you delete these?