Saturday, July 23, 2011

Take backup without SYSDBA and SYSOPER login in system?

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

Vishal Kolekar 


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 take also 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
Neither of 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.




0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Deep's | Bloggerized by Deep - Deep's Templates | ElearSQL-Server