Backup [message #676428] |
Sun, 09 June 2019 06:02 |
|
Manishkumar
Messages: 36 Registered: May 2019
|
Member |
|
|
Hi,
Is there any way to export database in form of insert into statememts using sqlplus console
Thanks,
Manish
|
|
|
|
|
|
|
|
|
|
|
Re: Backup [message #676442 is a reply to message #676437] |
Sun, 09 June 2019 11:45 |
John Watson
Messages: 8937 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Ypu can try to automate it with this sort of thing, run it as SCOTT:SELECT 'insert into '
|| table_name
|| ' ('
||
(
SELECT rtrim(extract(xmlagg(XMLELEMENT(e, t.column_value.getrootelement()
|| ',')),'//text()'),',')
FROM TABLE(xmlsequence(t.column_value.extract('ROW/*'))) t)
|| ') values ('
||
(
SELECT dbms_xmlgen.convert(rtrim(extract(xmlagg(XMLELEMENT(e, ''''
|| t.column_value.extract('//text()')
|| ''',')),'//text()'),','),1)
FROM TABLE(xmlsequence(t.column_value.extract('ROW/*')))t)
|| ');' ins_stmt
FROM user_tables,
TABLE(xmlsequence(dbms_xmlgen.getxmltype('select * from '
|| table_name).extract('ROWSET/ROW'))) t
WHERE table_name = 'EMP'; I didn't write it, and it is pretty buggy, but you can work on that.
|
|
|
|
|
|
|
|
|
|
Re: Backup [message #676465 is a reply to message #676463] |
Mon, 10 June 2019 09:59 |
cookiemonster
Messages: 13925 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Manishkumar wrote on Mon, 10 June 2019 15:55dump data is not reflecting. Other db not getting any apply error. Which log file needs to check. where is that present?
I assumed you were using datapump, but given your other topic, probably not.
I've no idea what logging replication does.
|
|
|
|
Re: Backup [message #676468 is a reply to message #676466] |
Tue, 11 June 2019 03:08 |
cookiemonster
Messages: 13925 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Well datapump has a log file.
You can specify what it's called and what folder it goes in when you run datapump.
So look at the datapump documentation, write a log file, read the log file.
|
|
|
Re: Backup [message #676475 is a reply to message #676468] |
Tue, 11 June 2019 12:35 |
Bill B
Messages: 1971 Registered: December 2004
|
Senior Member |
|
|
If you are inserting into different schemas or tablespaces on the other database you need to tell datapump how to perform the mapping. read up on the command line options for datapump import on oracle 11
|
|
|