Home » RDBMS Server » Server Utilities » export with sysdate (10g)
export with sysdate [message #640974] Fri, 07 August 2015 23:13 Go to next message
m.abdulhaq
Messages: 253
Registered: April 2013
Location: Ajman
Senior Member
i have to schedule a daily export of oracle database at a particular time , i was trying to run the below script as batch file , the export is done with date and time but the log file is missing ,also i would like to know if there is a builtin schedule to do this in oracle itself.


EXP RAKLIVE/ORION FILE=H:\DUMPSBACKUP\RAKLIVE\RAKLIVE%date:~7,2%%date:~4,2%%date:~10,4%_%time:~0,2%%time:~3,2%.DMP LOG=H:\DUMPSBACKUP\RAKLIVE\RAKLIVE%date:~7,2%%date:~4,2%%date:~10,4%_%time:~0,2%%time:~3,2%.LOG OWNER=RAKLIVE STATISTICS=NONE



Re: export with sysdate [message #640975 is a reply to message #640974] Sat, 08 August 2015 00:36 Go to previous messageGo to next message
Michel Cadot
Messages: 68045
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

1/ Execute it interactively and post the output
2/ Export using DataPump API: DBMS_DATAPUMP and one of the two Oracle schedulers; you can also use Windows scheduler and your usual command.

[Updated on: Sat, 08 August 2015 00:37]

Report message to a moderator

Re: export with sysdate [message #640976 is a reply to message #640975] Sat, 08 August 2015 00:56 Go to previous messageGo to next message
m.abdulhaq
Messages: 253
Registered: April 2013
Location: Ajman
Senior Member
thanks michael , i figuered it out it was matter of using single quotes in the file path .

regarding point number 2, datapump i will check the fine manual regarding schedulers you meant to say dbms_scheduler right.



EXP RAKLIVE/ORION FILE='H:\DUMPSBACKUP\RAKLIVE\RAKLIVE%date:~7,2%%date:~4,2%%date:~10,4%_%time:~0,2%%time:~3,2%.DMP' LOG='H:\DUMPSBACKUP\RAKLIVE\RAKLIVE%date:~7,2%%date:~4,2%%date:~10,4%_%time:~0,2%%time:~3,2%.LOG' OWNER=RAKLIVE STATISTICS=NONE



is there any method for point of recovery , i know this is a huge topic, but can you guide me like if the server crashes (like hardware) and we need to recover the database , is rman the right approach or is there any alternative like making standby database.
so that we need to reduce the downtime.

Re: export with sysdate [message #640977 is a reply to message #640976] Sat, 08 August 2015 01:01 Go to previous messageGo to next message
Michel Cadot
Messages: 68045
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
you meant to say dbms_scheduler right.


DBMS_SCHEDULER or DBMS_JOB

Quote:
s there any method for point of recovery


No, use RMAN to backup the database; export is a backup of data NOT database.

Quote:
is rman the right approach or is there any alternative like making standby database.


Both work and other too and this depends on many things and some not technical like money.

Quote:
so that we need to reduce the downtime.


to how much?

Re: export with sysdate [message #640991 is a reply to message #640977] Sat, 08 August 2015 07:43 Go to previous messageGo to next message
m.abdulhaq
Messages: 253
Registered: April 2013
Location: Ajman
Senior Member
thanks michael


Quote:
to how much?


3 to 4 hours or a day.

Where can i get good details on creating standby database.
Re: export with sysdate [message #640992 is a reply to message #640991] Sat, 08 August 2015 07:53 Go to previous messageGo to next message
Michel Cadot
Messages: 68045
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Assuming "server crash" means the server is definitively out of order not just the OS crashes.
If it is a day then just use RMAN.
If it is 3 or 4 hours then it depends on the size of the database.

Quote:
Where can i get good details on creating standby database


In Oracle documentation and the first question is what is your Oracle edition?

Re: export with sysdate [message #641005 is a reply to message #640992] Sat, 08 August 2015 11:16 Go to previous messageGo to next message
m.abdulhaq
Messages: 253
Registered: April 2013
Location: Ajman
Senior Member
thanks michael, the dump size is around 25 gb , and my oracle version is 10g.
Re: export with sysdate [message #641006 is a reply to message #641005] Sat, 08 August 2015 11:43 Go to previous messageGo to next message
Michel Cadot
Messages: 68045
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

For this size and the time you have to restore and recover you don't need a standby database RMAN is sufficient unless you want to restore up to the last transactions, RMAN can only do this up to the last archived log (assuming you transfer the archived logs out of the current server).
You did not answer about your Oracle edition.

Re: export with sysdate [message #641029 is a reply to message #641006] Sun, 09 August 2015 23:34 Go to previous messageGo to next message
m.abdulhaq
Messages: 253
Registered: April 2013
Location: Ajman
Senior Member
Sorry for the late reply, my edition is Enterprise Edition, and i need your advice , basically i want to do RMAN setup in current database , do i need to go through Administrator guide first and then backup and recovery section as i am new on DBA side . As of now we are hugely relying on dump export/import and twice server got crashed and we lost half day data , since we scheduled the backup using export twice during day and night and if the server crashes next day at 11 am , we could restore data till last night only. I want to avoid this situation . Kindly advice.

THanks !
Re: export with sysdate [message #641030 is a reply to message #641029] Sun, 09 August 2015 23:54 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
If server does NOT crash, then there is no need to recover.
Apply fix so no crash occurs.

post full results from SQL below

SELECT * FROM V$VERSION;
Re: export with sysdate [message #641032 is a reply to message #641029] Mon, 10 August 2015 01:29 Go to previous messageGo to next message
Michel Cadot
Messages: 68045
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

When you say "server crash" do you mean an OS or a hardware failure?

Re: export with sysdate [message #641044 is a reply to message #641032] Mon, 10 August 2015 03:22 Go to previous messageGo to next message
m.abdulhaq
Messages: 253
Registered: April 2013
Location: Ajman
Senior Member
Its hardware failure. like one hard disk got damaged.
Re: export with sysdate [message #641046 is a reply to message #641044] Mon, 10 August 2015 03:35 Go to previous messageGo to next message
Michel Cadot
Messages: 68045
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

So use RMAN to backup on safe location and think about changing your hardware if it often fails.

Re: export with sysdate [message #641056 is a reply to message #641046] Mon, 10 August 2015 05:36 Go to previous messageGo to next message
m.abdulhaq
Messages: 253
Registered: April 2013
Location: Ajman
Senior Member
Thanks Michael, kindly let me know where i can find the details regarding this RMAN setup in different location.
Is there a step by step process.
Re: export with sysdate [message #641059 is a reply to message #641056] Mon, 10 August 2015 06:07 Go to previous messageGo to next message
Michel Cadot
Messages: 68045
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

In the same place as usual in Oracle documentation.

icon14.gif  Re: export with sysdate [message #641075 is a reply to message #641059] Mon, 10 August 2015 08:05 Go to previous message
m.abdulhaq
Messages: 253
Registered: April 2013
Location: Ajman
Senior Member
Thanks Michael.
Previous Topic: Bulk updates on a table for updating IDing a sequence to a table
Next Topic: Expdp/Impdp in Oracle 12c
Goto Forum:
  


Current Time: Sun Dec 05 05:33:14 CST 2021