Take database backup programmatically

Hi,
I am writing a simplified excel uploader tool for my client. I want to programmatically take the backup of company database whenever my tool is used to upload data into SAP database.
Which method of which object should I use?
Thanks.

Hello,
If you are working on Linux,
Step-1: Set environment from Oracle user:
$ . oraenv (and then specify SID: orcl)
Step-2: Start RMAN:
$ rman target /
or
$ RMAN
RMAN> connect target database sys/oracle_4U
Step-3: Take backup of your database:
RMAN> backup database;
OR,
RMAN> BACKUP DATABASE PLUS ARCHIVELOG;
Thanks,
Ashish Shukla

Similar Messages

  • Java code to take database backup

    Hi,
    I need java code which can take Ms.access database backup on 15th of every month. Please help me to do that.
    Advance thanks

    make a batch file to copy the little db from it's location to the backup location or invoke the backup command with the correct commandline parameters so you do not get prompted for input, go into the Windoz scheduler and tell it to run the batchfile on the 15th of ever month. Doing this with a language is going to be a problem in logistics you do not have to deal with.

  • LMS 4.2.3 Database Backup Issue

    Hi All,
    I was unable to take database backup of  the LMS. Its failing with the below error.
    Error :Backup Failed: Error(404) Insufficient space on destination
    Where on destination drive i have space of 150GB Free space. but still LMS throwing the error.
    Backup is failing. Any suggestion how much the size of the database. how can we check?/
    Regards,
    Channa

    Hi VInod/Martin,
    The backup is failing
    Backup to 'E:/LMSDBBKP_Backups/Today's_new_backup' started at: [Fri Oct 17 18:00:00 2014]
    [Fri Oct 17 18:02:10 2014]  ERROR(405): Insufficient disk space on backup destination volume.
    Available Space is 188090140Kb and required space for backup is 226175301Kb.
    [Fri Oct 17 18:02:10 2014]  Backup failed: 2014/10/17 18:02:20
    The DB file size very huge.i wanted to reduce database file size by performance data purge.but now am unable to purge performance data from the purge settings.. its giving an error "Cannot connect to JRM, Check whether JRM is up and running".
    i can see the jrm is up and running normally.
    is there any way i can purge the performance data from the backend ??
    Regards,
    Channa

  • SQL Server Database backup

    Hi Team ,
    I have SQL Cluster 2012 server running with Couple of Critical data base instance . Each instance installed in different drive.
    One of my application database is having mdf of size 1 Gb and ldf is 250 GB . Database is set to full recovery model.
    Now I want to change recovery model to simple and want to shrink the los also. before than I want to take database backup.
    I have 50 GB space left in drive .
    i want to take full database backup on same drive .please let me know how much space i need on that drive to take full backup.
    thanks
    Ravi

    There are two options for you here
    1. Take transaction log backup and try shrinking the log file but you might have to take multiple transaction log backups to actually shrink the log file
    2. If you are switching from full recovery to simple you dont need to take full backup reason is switching from full to simple breaks log chain so its better to have Transaction log backup and like Praveen suggested if you take transaction log backup with
    compression it likely it would fit in free space. But you have to try.
    3. This you have to do on your own risk: (If backup of log in point 2 fails) I dont think changing from full recovery to simple would cause any
    data loss. So you can switch to simple shrink logs switch back to full and schedule frequent log backups
    Reason why log grew so much because you did not took sufficient transaction log backups. So create maintenance plan which would take frequent log backups also if you dont want point in time recovery for this database let it be in simple recovery
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • Need to take Reprository backup in SAP BI7.0

    Hi,
          Now I am using SAP BI7.0 server and I am planning to take backup.
    I am planning to take the backup only the Metadata Repository. I need only the Structure to take backup because I am not having space to take Database backup so I am planning to take Repository backup only.
    Any Once can suggest how to take Metadata Repository from RSA1 t-code.
    Any One can give the replay ASAP.

    Check the Key Fields in the DSO. 
    Ex: Key Fields are EMPID, JOB and Data Fields are Startdate and end date...
    When you are trying to load the following data
    1221   HR  01.01.2009        12.12.2009
    1221   HR  01.01.2010         12.12.2010
    Once you hve loaded the above data you will get only one record in DSO.
    ONce you include the Startdate and enddate fields in KEYFIELDS of DSO you will get two records.
    May be you are also facing the similar issue.  Have a check with Key fields of DSO.

  • Can I take a backup of a database in standby mode?

    Can I run backup on a database that is in standby mode because it is the DR box receiving log shipping?
    Does that work in SQL 2005?  How about SQL 2000?
    Thanks.
    Josh
    ps - I know I should just try it, I've already Googled it - with mixed results.

    https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=466121
    Please allow backup of database in standby mode!
    This comes up as a very common requirement in HA/DR planning. Logs are shipped over a (relatively) small pipe to a DR site, for days or weeks or months. As part of a (partial) failover plan, we need a full backup of a current version of the database to restore on another server on the DR side - but we cannot take the main DR (secondary) copy out of standby without breaking the log chain. Yes, we might have to pause the application of logs - or possibly not - in order to take the backup of a large-ish database. But the alternative is shipping a large backup all the way from production over that small pipe, which can be prohibitive.
    Thanks for the reminder, Tibor.
    Josh

  • Command - Take a full database backup

    Hi,
    I have to simulate a database failure. However prior to doing so, I have to take a "Take a full database backup". How do I execute this command? It is my understanding that this is different from selecting "Backup database"
    Thanks in advance for the help!
    Edited by: 976505 on Dec 18, 2012 12:17 PM

    Pl do not post duplicate threads - Oracle 11g XE - Backup

  • Why we cannot take hot backup if database is in noarchive log mode

    Hi,
    I am aware that if database is in noarchive log mode, we cannot take hot backups and only cold backup is possible.
    I would like to know the technical reason behind this restriction?
    Thank You
    Sarayu

    Hot backups are fuzzy backups, inconsistent, in other words, since something is always happening in the database.  When you recover, you restore data files and then apply redo to make the transactions consistent.  You can do a complete recovery or recover to a point in time.  So where does the redo come from?  That's what we call archiving redo logs.  When the online redo gets full, it gets archived.
    In the case of an instance crash, the redo is there in the online redo logs, so Oracle can recover automatically.  Anything beyond that, having to do with storage media, is a media recovery, and requires those archived logs.  So unless you have some other way to get your data back, always run in archivelog mode.
    It is really important to understand the concepts.  Please read the docs.
    http://docs.oracle.com/cd/E11882_01/server.112/e25789/cncptdba.htm#CNCPT031
    http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmintro.htm#i1005488
    It may be worth your while to get a third party backup and recovery book too.

  • How to take SQL Server Database backup from DB side

    Dear All,
    Please suggest how to take SQL Server Database backup from DB side?
    System Info-
    Portal Server (EP7)
    MS SQL Server
    Microsoft Windows 2003 Server
    Suggest ASAP.
    Thanks & Regards,
    Sameer

    Hi,
          I am planning to take SAP DB backup I need the procedure how to take backup. With in the server.
          My Operating System is IBM AIX
                 Database is  Oracle 10g
                 SAP BI7.0 through this I need to take backup.
         Note:
                1)  First of all I gone to /oracle/<SID>/102_64/dbs/init<SID>.sap and I changed the settings backup_dev_type = disk
                 backup_root_dir = /home/db0/test/sateesh/DB0backup
                 stage_root_dir = /home/db0/test/sateesh/DB0backup
               2) Then I gone to BRTOOLS I changed to disk there I scheduled Online backup
               3) Then I came to SAP DB13 I want to take daily backup. But the backup is not going properly what to do any mistake I had done
                    Try to give the valuable solution to take Online backup

  • Error restoring SQL 2008 R2 DB into SQL 2012: BACKUP LOG cannot be performed because there is no current database backup.

    I have a SQL 2008 R2 database that I am trying to move to 2012.  Made a full backup of the database in 2008 R2.  Recovery model is Simple, compatibility level is 2008  Went to 2012, created a dummy database, did Tasks--> Restore -->
    Database , located the backup file, selected it, changed the file locations and tried to restore the backup (with overwrite option), got the following error:
    BACKUP LOG cannot be performed because there is no current database backup.
    This is a simple task that has always worked in 2008 R2.  Does anyone know what the problem is and a possible solution?
    Thanks

    Hi,
    This error occurs when the database recovery model has been changed to Simple and/or the recovery model has been changed back to Full but a full backup has not been performed since the change.
      If a full backup has been performed, the following conditions will require that another full backup be taken:
     · The recovery model had been changed without taking a full backup
     · A SQL maintenance plan task had changed the recovery model (reindexing can cause this)
     · A backup specifying TRUNCATE_ONLY had been run on the database
     · The database was detached from another server and attached to the current server
    Additionally, if we take full database backup after the Database is set to readonly, Then transaction log backup we will end up with this error. This is expected behavior. I have list an example within the link below.
    Please check above conditions and fix your issue, if you have any concern, please let me know.
    Example:
    BACKUP LOG cannot be performed because there is no current database backup.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/b5c36e60-836f-4c9e-b9d7-3fb3f3ee4d37/backup-log-cannot-be-performed-because-there-is-no-current-database-backup
    Thanks
    Candy Zhou

  • How to take a backup manually in oracle 11g express edition?

    how to take a backup manually in oracle 11g express edition? i want to take backup of a database and want to restore later on on a different computer .

    Stop database, and copy all files to another machine.That sounds to me to be the closest answer to the question posted. And perhaps the easiest solution.
    Install XE on the "another machine", shut it down. Shutdown the source database. Copy the datafiles to the new host. Startup your "new" database, it will be an exact clone of the original.
    To find out what files need to be copied, as system (or sysdba) run:
    select name from v$datafile;
    ... file1, file2 ...
    show parameter control
    ... control_files ... file1 ...
    alter database backup controlfile to trace [reset logs];
    show parameter diag;
    ... diagnostic_dest ... <drive:>|/diag_pathTo do a proper database clone its better to recreate the controlfile and reset the archive sequence number- leave out the controlfile copy part. In the diag_path location find the trace file under diag/rdbms/$ORACLE_SID/<db_name>/trace it should be the latest ora*.trc file.
    The trace file has the commands to recreate the controlfile, which includes the datafiles and putting the tempfile back in place. If the datafiles are in a different location, i.e. in Windows going to a different drive, or you want do put datafiles in a different folder location, the create controlfile statement is the easiest time to get the file directories right.
    If you add the "reset logs" qualifier (don't use the brackets!) you'll get just the reset logs version of the create controlfile statement, otherwise you'll get both NORESETLOGS and RESETLOGS versions of a create controlfile statement, run one or the other. Not both. Not the entire trace file, just the create controlfile, alter database open [reset logs], alter tablespace temp add tempfile ... bits. No recovery is needed for a database that is shutdown when datafiles get copied to a new location/host.

  • Report and alerts for Exchange Server database backup

    Hi
    i am trying to use the Get-DailyBackupAlerts.ps1
    to check the exchange database backup state every day by email 
    and i am using this scripts its working fine but I have problem with sending email  
    here below the Error
    04/16/2015 09:46:53 Alert email will be sent
    04/16/2015 09:46:53 Report summary: Alerts 23, OK 0
    04/16/2015 09:46:53 Sending email report
    04/16/2015 09:46:53 Cannot validate argument on parameter 'From'. The argument is null or empty. Supply an argument that is not null or empty and then try the command again.
    04/16/2015 09:46:53 Finished.
    my setting the in the file Settings.xml as below 
    <EmailSettings>
        <SMTPServer>webmail.domain.com</SMTPServer>
        <SMTPPort>25</SMTPPort>
        <MailFrom>[email protected]</MailFrom>
        <MailTo>[email protected]</MailTo>
      </EmailSettings>
    any one can help ?
    Mahmoud

    Dear Mahmoud,
    In the SMTP server settings below you need to replace with your HUB server FQDN if its 2010 or Mailbox server FQDN if its 2013 and after that i think it should work.
    <SMTPServer>webmail.domain.com</SMTPServer>
    Remember to mark as helpful if you find my contribution useful or as an answer if it does answer your question.That will encourage me - and others - to take time out to help you Check out my latest blog posts on http://exchangequery.com Thanks Sathish
    (MVP)

  • Full Database Backup

    Hi people,
    I´ve the next doubt about the backups of MS SQL Server.
    If I make a full database backup, the transaction log (SIDLOG1) are backed? Or I´ve to do the backup of transactional log separated?
    In the note Note 44449 - Backup strategies with the SQL server, says this:
    "If you run a complete database backup, the contents of the transaction log are saved (database dump), but the log is not shortened. The transaction log is only shortened when you save the log (transaction dump)."

    A FULL SQL backup includes all of the changes that are contained in the LOG file, so that the backup is recoverable to any point in time from the beginning to the end of the time it takes to backup the database.  However, it does NOT truncate the log file because you may still need a log backup in order to be recoverable to a point in time AFTER the FULL backup mentioned earlier, or if you have to utilize a different FULL backup in the event the other backup is corrupted, lost, etc.
    For example:
    Full backup A taken 11/8/2010, begin 8:00 AM, completed 9:00 AM.
    Transaction Log backup 1 taken 11/8/2010, 11:00 AM
    Transaction Log backup 2 taken 11/8/2010, 3:00 PM
    Transaction Log backup 3 taken 11/8/2010, 7:00 PM
    Full backup B taken 11/9/2010, begin 8:00 AM, completed 9:00 AM.
    Transaction Log backup 4 taken 11/9/2010, 11:00 AM
    Transaction Log backup 5 taken 11/9/2010, 3:00 PM
    Transaction Log backup 6 taken 11/9/2010, 7:00 PM
    If you need to recover to point in time 11/9/2010 at 8:30 AM, all you need is Full backup B.
    If you need to recover to point in time 11/9/2010 at 5:00 PM, you need Full backup B, and Transaction Logs 4, 5, and 6.
    If you need to recover to point in time 11/9/2010 at 5:00 PM, and Full backup B is corrupted, you need Full backup A, and Transaction Logs 1, 2, 3, 4, 5, and 6.
    If Full backup B had truncated the log, then you would not be recoverable to any point in time after 7:00 PM on 11/8/2010.

  • Database backup problem in DB13

    Dear All,
    <b>When we take backup from the command prompt using Brbackup or Brarchive it executes the backup process successfully, but when I schedule the same thing in the DBA calendar it shows that job finished but it actually  does not take the backup. I have given all parameter required for the backup in the DBA calendar like eg, the  scheduled time, the tape generic name, archive type.</b>
    Can anybody guide what is going wrong ...because of that I am not able to schedule backup using DB13 tcode.
    At present I am using Brtools( Brbackup) to take the backup.
    Thanks in adv.
    Bhaskar

    Dear Mr. Fidel,
    Thanks for your reply.
    My operating system is Windows 2003.
    I am loged in with <SID>adm.
    When I use DB13 to schedule the backup (online full database backup) it completes sucussfully......but if I choose to schedule backup(online full database + redo logs file) after taking backup of the database when it to take redo logs file give an error message as:-----
    <b>I am giving lines where the error occurs...</b>
    BR0280I BRBACKUP time stamp: 2007-06-27 19.32.19
    BR0063I 43 of 43 files processed - 120279.500 MB of 120279.500 MB done
    BR0204I Percentage done: 100.00%, estimated end time: 19:32
    BR0001I **************************************************
    BR0280I BRBACKUP time stamp: 2007-06-27 19.32.23
    BR0340I Switching to next online redo log file for database instance MRP ...
    BR0321I Switch to next online redo log file for database instance MRP successful
    BR0117I ARCHIVE LOG LIST after backup for database instance MRP
    Parameter                      Value
    Database log mode              Archive Mode
    Automatic archival             Enabled
    Archive destination            F:\oracle\MRP\oraarch\MRParch
    Archive format                 ARC%S_%R.%T
    Oldest online log sequence     3173
    Next log sequence to archive   3176
    Current log sequence           3176       SCN: 33992945
    Database block size            8192       Thread: 1
    BR0018I Waiting for the next offline redo log file...
    BR0017E Offline redo log file E:\oracle\MRP\102\RDBMS\ARC03175_0603728372.001 not found
    BR0056I End of database backup: bdvoqpkp.ant 2007-06-27 19.32.28
    BR0280I BRBACKUP time stamp: 2007-06-27 19.32.28
    BR0054I BRBACKUP terminated with errors
    thanks.

  • Physical standby database backup

    HI,
    Is it necessary to take a physical standby Db backup.our standby db is in manual mode and it is opened for read only mode.we are taking backups of priamary database,I am taking care of DR site.So i would like to know should i go for a RMAN to take a standby database or as wer are taking a backup of primarty db so there is no need to take backup of standby db.
    If our primary db is failed then we can swithciover to standby to primary but if we are not having a backup of standby db then can we recover the standby db from primary db backup.
    another question is that while taking logical backup of the primary db from the client side i.e remote location ,backup is failed bcoz our ary Db version is
    SQL> select * from v$version;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    PL/SQL Release 9.2.0.6.0 - Production
    CORE    9.2.0.6.0       Production
    TNS for Solaris: Version 9.2.0.6.0 - Production
    NLSRTL Version 9.2.0.6.0 - Productionbut our oracle client version is 9.2.0.1 and the backup was terminated after gerating an error *"ORA-03113 exp-00056 getting an error while exporting "*
    Pls suggest me.....

    Hi!
    There is no need to take a backup of your standby DB. A standby DB is only a clone of your primary DB so if your standby DB crashes you can take a backup of your primary DB and build a new standby DB.
    Your problem with logical backup. The Oracle clientsoftware should allways have the same version as your DB. Avoid situations where client and server have different version. If it is possible upgrade your clientsoftware.
    Hope this helps!

Maybe you are looking for