Take backup of Oracle database without SYSDBA and SYSOPER login in system?
by Vishal Kolekar
I have question about taking backup of database in ORACLE 10g. In my project I created one application in my mobile which only accepts user name and password and sends it to the server and after authenticating moves to DBA command screen in mobile for further commands. Since from login screen there is no text box for SYSDBA and SYSOPER
so my question is as below.
1> without login as "SYSDBA" and "SYSOPER" can SYSTEM user take backup? Is there any solution for it that is without login as "SYSDBA" or "SYSOPER"?
2) please tell me 3-4 simplest command of DBA to take backup of database in ORACLE 10g
If we go back to basics there are several ways to make backups of your Oracle database:
- you can use the Export utility or Datapump in Oracle 10g onwards to perform a logical backup and for that you don't need sysdba or sysoper priviliges. You can also use PL/SQL procedures to make the backup if you're using Datapump;
- you can take a cold backup by making a copy of the all the database files using operating system commands (you do need sysdba/sysoper privileges to shutdown the Oracle database and re-start it but not to do the backup);
- you can take hot backups with the database open (if it's running in archivelog mode) by using RMAN (Oracle Recovery Manager)
- you can also take hot backups of the database by issuing the command
alter tablespace begin backup;
in SQL*Plus and then using the operating system to make backups of the data files and take the tablespace out of backup mode by issuing the SQL command
alter tablespace end backup;
Again the Oracle database has to be running in archivelog mode
these last 2 methods requires sysoper or sysdba privileges.
The short answer to the first question then is that unless you need to shutdown or startup your Oracle database you don't need sysdba or sysoper privileges.
The converse is that if you do need to shutdown/startup your Oracle database via your mobile application you will need one or other of those privileges so your application should be able to accept the extra few characters (" as sysdba") and pass them on the server along with the username and password.
As for question 2 - that can't be answered completely without knowing what type of backup you want - physical (cold, hot) or logical and whether you want to back up the whole of your Oracle database or just part(s) of it.
The simplest form of backup is the cold backup - shutdown the database and use the operating system to make a copy of all the files. That's fine if you don't mind losing data, if you need to ensure no data loss then you need to perform a hot backup. Going one step further you could consider a standby database using Oracle DataGuard or using advanced replication or Oracle Streams to propagate data changes to another database.
Full details of backup and recovery options, Oracle DataGuard and Streams are in the Oracle database documentation
. Details on the Oracle DataPump and Export utilities can be found in the Oracle Database Utilities manual
For instructor-led Oracle training courses see our partners Smartsoft Computing for Oracle training in the UK
or Skillibuilders for training in the New York/Boston area
and for classroom quality online training see GoGo Training
and remember to contact us before booking to ensure you get our special rates for the training.