I am working on Oracle Developer. What is a sample script that can start the database backup at the off hours,...
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
like after 10 pm, without my physical presence? The script should shut down the database, copy all the relevant files to the specified location, and it must startup the database. The size is 80 GB.
You did not specify the platform the Oracle database runs on. On Windows, the script can be as simple as one line:
net start OracleServiceSID
Where SID is replaced with your Oracle SID. On Unix/Linux, the script is a little more complicated but something similar to (for CShell):
#!/bin/csh # setenv ORACLE_SID=SID setenv ORACLE_HOME=/path_to_Oracle_Home_dir setenv LD_LIBRARY_PATH=$ORACLE_HOME/lib set path=($ORACLE_HOME/bin $path) sqlplus sys/pswd << EOF startup EOF
You will have to make appropriate substitutions for your environment.
Dig Deeper on Oracle database backup and recovery
Related Q&A from Brian Peasland
Oracle expert Brian Peasland answers one reader's question about common pitfalls when connecting Oracle to outside programs.continue reading
One reader asks expert Brian Peasland a question about datafile sizes with the Oracle RMAN duplicate 10g command.continue reading
Managing parent table-child table relations in Oracle SQL environments is key to efficient programming.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.