Backup politics for one database
Hi,
We have an Oracle database. We do cold backup at interval of one month. After we do cold backup we delete from archives. We do full backup (level 0) with rman at interval of one week. When we do full backup with rman to do backup also at archives? On which period. Maybe we will do also a daily backup with rman.
Thank you,
Mihaela
i apologize in advance...i think i missed something here.
is your database running in archivelog mode? if so, the cold backup may be completely irrelevant -- although i have seen it stored offsite for accounting systems and some internal requirement that it be the quiesced database for that exact point in time. the problem with a cold backup is that it is specific to a point in time and unless something has changed, you can't roll it forward the way that you can with an online backup. which again, makes it good for some bean counter activities but not so good for your day to day activities.
you are running the rman level 0 once a week -- so then you must be running in archivelog mode. you need to keep those archivelogs either on disk or moved to tape or some other storage media; rman cuts one during the backup and you definitely need that one. if you take say an incremental 1 daily or so, the number of archive logs you need to maintain may be fewer, but you still need some to recover your database in the event of recovery.
hth
Similar Messages
-
Best pratices for RMAN backup management for many databases
Dear all,
We have many 10g databases (>40) hosted on multiple Windows servers which are backup up using RMAN.
A year ago, all backup's were implemented through Windows Scheduled Tasks using some batch files.
We have been busy (re)implementing / migrating such backup in Grid Control.
I personally prefer to maintain the backup management in Grid Control, but a colleague wants now to go back to the batch files.
What i am looking for here, are advices in the management of RMAN backup for multiple databases: do you guys use Grid Control or any third-party backup management tool or even got your home-made solution?
One of the discussion topic is the work involved in case that the central backup location changes.
Well... any real-life advices on best practices / strategies for RMAN backup management for many databases will be appreciated!
Thanks,
ThierryHi Thierry,
Thierry H. wrote:
Thanks for your reaction.
So, i understand that Grid Control is for you not used to manage the backups, and as a consequence, you also have no 'direct' overview of the job schedules.
One of my concern is also to avoid that too many backups are started at the same time to avoid network / storage overload. Such overview is availble in Grid Control's Jobs screen.
And, based on your strategy, do you recreate a 'one-time' Oracle scheduled job for every backup, or do your scripts create an Oracle job with multiple schedule?
You're very welcome!
Well, Grid Control is not an option for us, since each customer is in a separate infrastructure, and with their own licensing. I have no real way (in difference to your situation) to have a centralized point of control, but that on the other hand mean that I don't have to consider network/storage congestion, like you have to.
The script is run from a "permanent" job within the dba-scheduler, created like this:
dbms_scheduler.create_job(
job_name => 'BACKUP',
job_type => 'EXECUTABLE',
job_action => '/home/oracle/scripts/rman_backup.sh',
start_date => trunc(sysdate)+1+7/48,
repeat_interval => 'trunc(sysdate)+1+7/48',
enabled => true,
auto_drop => false,
comments => 'execute backup script at 03:30');and then the "master-script", determines which level to use, based on weekday from the OS. The actual job schedule (start date, run interval etc) is set together with the customer IT/IS dept, to avoid congestion on the backup resources.
I have no overview of the backup status, run times etc, but have made monitoring scripts that will alert me if/when a backup either fails, or runs for too long. This, in addition with scheduled disaster/recovery tests makes me sleep rather well at night.. ;-)
I realize that there (might be) better ways of doing backup scheduling in your environment, since my requirements are so completely different than yours, but I guess that we all face the same challenges in unifying the environments as much as possible, to minimize the amount of actual work we have to do. :-)
Good luck!
//Johan -
RMAN Backup script for RAC Database..please suggest
Hi All,
I am currently working on backup policy for RAC Database for my client.The client requirement is to backup while database is shutdown(mount state).I have made below script and could any one please suggest what further things should I need to add with below rman script.
echo "Shutdown Database";date
srvctl stop database -d PROD
srvctl status database -d PROD
echo "Database shutdown on";date
echo "Mount Database ";date
srvctl start instance -d PROD -i "PROD1" -o mount
srvctl status database -d PROD
echo "Start Full Database Backup on";date
$ORACLE_HOME/bin/rman target / nocatalog <<EOF
configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to '/BACKUP/PRODBKP/%F';
run{
allocate channel c1 device type disk connect 'sys/******@node1-vip:1521/PROD';
allocate channel c2 device type disk connect 'sys/*****@node2-vip:1521/PROD';
backup format '/BACKUP/PRODBKP/PROD_df_%t_%s_%p.bak'(database);
backup format '/BACKUP/PRODBKP/archive_%t_%s_%p.bak' archivelog all;
copy current controlfile to '/BACKUP/PRODBKP/PROD.ctl';
delete noprompt obsolete;
release channel c1;
release channel c2;
exit
EOF
echo "RMAN Backup Finished on";date
echo "Shutdown Database";date
srvctl stop database -d PROD
echo "Start Database";date
srvctl start database -d PROD
srvctl status database -d PROD
Please share your experiences.
RegardsHi,
Some tweaks for your script.
echo "Shutdown Database";date
srvctl stop database -d PROD
srvctl status database -d PROD
echo "Database shutdown on";date
echo "Mount Database ";date
srvctl start instance -d PROD -i "PROD1" -o mount1. If you database does not shutdown properly , does your script stops the execution of next step?
2. configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to '/BACKUP/PRODBKP/%F';(Why you need to configure this every time) ?
It's persistent at db level one time setting (until some other script changes the settings by other dba - else remove that - set the configuration at db level once for all)
- Pavan Kumar N
3. -
How to backup more than one database using powershell
I am Trying to backup more than one database using the following script but no luck. I want user to type on command line the database they want to backup, e.g all databases that have "test" at the front like test.inventory, test.sales so i want
user to type test.* and it backs up all databases related to test. Here is the script
#$date = Get-Date -Format yyyyMMddHHmmss
#$dbname = 'test.inventory'
$dbToBackup = "test.inventory"
cls
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoExtended") |
Out-Null
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.ConnectionInfo")
| Out-Null
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoEnum") | Out-
Null
Add-Type -AssemblyName "Microsoft.SqlServer.Smo, Version=10.0.0.0, Culture=neutral,
PublicKeyToken=89845dcd8080cc91"
$server = New-Object Microsoft.SqlServer.Management.Smo.Server($env:ComputerName)
$server.Properties["BackupDirectory"].Value = "C:\_DBbackups"
$server.Alter()
$backupDirectory = $server.Settings.BackupDirectory
#display default backup directory
"Default Backup Directory: " + $backupDirectory
$db = $server.Databases[$dbToBackup]
$dbName = $db.Name
$timestamp = Get-Date -format yyyyMMddHHmmss
$smoBackup = New-Object ("Microsoft.SqlServer.Management.Smo.Backup")
#BackupActionType specifies the type of backup.
#Options are Database, Files, Log
#This belongs in Microsoft.SqlServer.SmoExtended assembly
$smoBackup.Action = "Database"
$smoBackup.BackupSetDescription = "Full Backup of " + $dbName
$smoBackup.BackupSetName = $dbName + " Backup"
$smoBackup.Database = $dbName
$smoBackup.MediaDescription = "Disk"
$smoBackup.Devices.AddDevice($backupDirectory + "\" + $dbName + "_" + $timestamp +
".bak", "File")
$smoBackup.SqlBackup($server)
#let's confirm, let's list list all backup files
$directory = Get-ChildItem $backupDirectory
$backupFilesList = $directory | where {$_.extension -eq ".bak"}
$backupFilesList | Format-Table Name, LastWriteTimeOr i am using this script which backs up everything except tempdb but dont know how to modify this so that it backs up up all test related databases
Is there a way that i use test.*
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | out-null
$s = new-object ("Microsoft.SqlServer.Management.Smo.Server") $instance
$bkdir = "C:\_DBbackups" #We define the folder path as a variable
$dbs = $s.Databases
foreach ($db in $dbs)
if($db.Name -ne "tempdb") #We don't want to backup the tempdb database
$dbname = $db.Name
$dt = get-date -format yyyyMMddHHmm #We use this to create a file name based on the timestamp
$dbBackup = new-object ("Microsoft.SqlServer.Management.Smo.Backup")
$dbBackup.Action = "Database"
$dbBackup.Database = $dbname
$dbBackup.Devices.AddDevice($bkdir + "\" + $dbname + "_db_" + $dt + ".bak", "File")
$dbBackup.SqlBackup($s) -
Sysresv returns multiple shared memory IDs for one database
Shared Memory:
ID KEY
8 0x00000000
9 0x00000000
10 0x00000000
13 0x00000000
14 0xae2ae9d0
Please see this 'sysresv' output. It returns multiple shared memory IDs for one database (althouth all are 0s except one). Why is this? Does it matter? It seems not eating up memory. Stop and start database didn't help.* System Configuration
swap files
swapfile dev swaplo blocks free
/dev/md/dsk/d101 85,101 16 201342320 201342320
* Tunable Parameters
2055864320 maximum memory allowed in buffer cache (bufhwm)
30000 maximum number of processes (v.v_proc)
99 maximum global priority in sys class (MAXCLSYSPRI)
29995 maximum processes per user id (v.v_maxup)
30 auto update time limit in seconds (NAUTOUP)
25 page stealing low water mark (GPGSLO)
1 fsflush run rate (FSFLUSHR)
25 minimum resident memory for avoiding deadlock (MINARMEM)
25 minimum swapable memory for avoiding deadlock (MINASMEM)
CO4P:/opt/oracle:>ipcs -ma
IPC status from <running system> as of Monday, April 21, 2008 2:50:10 PM PDT
T ID KEY MODE OWNER GROUP CREATOR CGROUP NATTCH SEGSZ CPID LPID ATIME DTIME CTIME
Shared Memory:
m 14 0xae2ae9d0 rw-r--- oracle dba oracle dba 481 24576 20322 25104 14:50:10 14:50:10 11:24:46
m 13 0 rw-r--- oracle dba oracle dba 481 2030043136 20322 25104 14:50:10 14:50:08 11:24:43
m 10 0 rw-r--- oracle dba oracle dba 481 2030043136 20322 25104 14:50:10 14:50:08 11:24:40
m 9 0 rw-r--- oracle dba oracle dba 481 2013265920 20322 25104 14:50:10 14:50:08 11:24:37
m 8 0 rw-r--- oracle dba oracle dba 481 2063597568 20322 25104 14:50:10 14:50:08 11:24:34
m 0 0xcace --rw-rw-rw- root root root root 0 2 2344 2344 14:49:57 14:49:57 9:35:43 -
Suprisingly two Processes running for one database
Hi all,
Today morning in one of our database servers, we see two processes running for one database.
COBLpo05 11949 1187 0 Mar 25 ? 37:50 ora_smon_BLINDEA1
COBLpo05 7789 1187 0 Mar 25 ? 5:35 ora_smon_BLINDEA1
Can anybody suggest me what is the reason behind it and what to do in this case?
Thanks in Advance.The ORACLE_HOME may have been set twice with differents values in it (i.e. extra slash) before starting twice the same db.
Please, have a look to this article from Ivan Kartik :
http://ivan.kartik.sk/index.php?show_article=40
And depending of your OS, you could check what ORACLE_HOME is used for each process :
How to Check the Environment Variables for an Oracle Process*
Doc ID: 373303.1*
Nicolas.
added the metalink note ref.
Edited by: N. Gasparotto on Sep 4, 2009 11:34 AM -
Is this possible to already reserve 2 TB of space on a data drive for one database
Is this possible to already reserve 2 TB of space on a data drive for one database.
Please suggest how to do this.
Best regards,
VishalYou can either change the current filesize of current files in your database or add new file(s) whose current size is 2TB by using the ALTER DATABASE command. If you don't have instant file initialization, adding 2TB to data files can take a long time.
If you are adding 2TB to log files that can take a long time whether you have instant file initialization or not. For info on instant file initialization see
http://technet.microsoft.com/en-us/library/ms175935%28v=sql.105%29.aspx
and
http://sqlblog.com/blogs/tibor_karaszi/archive/2009/03/09/do-you-have-instant-file-initialization.aspx
In addition, there are several good links in the comments to Tibor's blog entry, especially the links to Paul Randal's blog.
Tom -
Allocate channel sbt_tape hangs for one database, but not others.
We are using Commvault's Simpana Oracle iDataAgent v8.0.0 on Windows 2003 R2.
The database version is 10.2.0.4 and all of the databases run from a single ORACLE_HOME.
The problem is that in one of my databases, allocate channel ... type sbt_tape... hangs.
I'm not connecting to a catalog, on the command line I execute 'rman target /'
My simple script is:
run {
allocate channel ch1 type 'sbt_tape'
PARMS="ENV=(CvClientName=testsvr, CVInstanceName=Instance001), BLKSIZE=262144"
release channel ch1;
In other databases running from this OH, "allocate channel" works fine. But in the one database that I need
to back up, it hangs - just sits there.
I added 'trace=2' to the allocate channel command, but it doesn't produce any useful information. Neither
does the alert log.
What else can I do to debug this problem? Is there a way to recreate the database packages that
RMAN executes for a backup?
Thank you for your help.
MikeI'm not sure of what value a doc referencing Oracle 9i will do for you so my suggestion would be to first of all leverage the many V$ dynamic performance views to see what it is the Oracle thinks is happening. Perhaps nothing since you don't get a trace file but do your due diligence. You can find them by running the following:
SELECT view_name FROM dba_views WHERE view_name LIKE '%RMAN%'Then open an SR at MyOracleSupport. -
Estimating the backup size for full database backup?
How to estimate the backup file size for the following backup command?
Oracle 10g R2 on HPUX
BACKUP INCREMENTAL LEVEL 0 DATABASE;
Thank you,
SmithDepends on the number of used blocks, block size etc. You could probably get a rough formula for backup size based on the contents of dba_tab_statistics (subtract empty_blocks), dba_ind_statistics etc.
-
Case confusion - two dbcontrol config directories for one database
Oracle 11.2.0.2 SE-One 64-bit
Oracle ASM 11.2.0.2 64-bit
Oracle Linux 5.6 x86-64
Stand alone server, no cluster, no RAC
Configured a new dbcontrol for subject database. Everything seems to be functioning correctly but it created two config directories
oracle:mydb$ cd $ORACLE_HOME
2013-09-12 14:21:50
oracle:mydb$ ls -l myserver*
myserver.mycompany.org_mydb: -------- note the dbname is lower case and directory is sparse
total 4
drwxr----- 3 oracle oinstall 4096 Sep 12 14:13 sysman
myserver.mycompany.org_MYDB: -------- note the dbname is upper case and directory is fully populated
total 12
-rw-r----- 1 oracle oinstall 6 Sep 12 14:13 emctl.pid
-rw-r--r-- 1 oracle oinstall 56 Sep 12 14:13 oraInst.loc
drwxr----- 7 oracle oinstall 4096 Sep 12 14:13 sysman
And in the j2ee directory we get this. Note the dbname is in upper case
oracle:mydb$ cd oc4j/j2ee
2013-09-12 14:26:49
oracle:mydb$ ll
total 36
-rw-r--r-- 1 oracle oinstall 1012 Apr 5 08:56 deploy_db_wf.ini
drwxr-xr-x 14 oracle oinstall 4096 Apr 5 08:53 home
drwxr-xr-x 3 oracle oinstall 4096 Apr 5 08:51 oc4j_applications
drwxr-x--- 6 oracle oinstall 4096 Apr 5 08:51 OC4J_DBConsole
drwxr-xr-x 10 oracle oinstall 4096 Sep 12 14:13 OC4J_DBConsole_myserver.mycompany.org_MYDB
drwxr-xr-x 5 oracle oinstall 4096 Apr 5 08:51 OC4J_Workflow_Component_Container
drwxr-xr-x 5 oracle oinstall 4096 Apr 5 08:51 OC4J_Workflow_Management_Container
drwxr-xr-x 2 oracle oinstall 4096 Apr 5 08:53 utilities
What the database tells us about itself:
SQL> select name from v$database;
NAME
MYDB
SQL> select instance_name from v$instance;
INSTANCE_NAME
mydb
SQL> select name,
2 value
3 from v$parameter
4 where name in ('db_name',
5 'db_unique_name',
6 'instance_name',
7 'service_names',
8 'global_names'
9 )
10 order by name;
NAME VALUE
db_name MYDB
db_unique_name MYDB
global_names FALSE
instance_name mydb
service_names MYDB
And the environment from which I ran emca:
oracle:mydb$ env |grep ORA|sort
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0.2/dbhome_1
ORACLE_SID=mydb
The mis-matched cases stem from my predecessor deciding he didn't like database names in lower case, so started changing in mid-stream. I'm not sure exactly what he did or how he did it. But that aside, the results of creating a new dbcontrol (getting two directories for the same database) still puzzling. I started by dropping the original (emca -deconfig dbcontrol db -repos drop), which dropped the upper-case version of the directories, but left the lower-case version. I then deleted that manually before running emca to configure a new dbcontrol, but still ended up with both versions.
Ideas?The ORACLE_HOME may have been set twice with differents values in it (i.e. extra slash) before starting twice the same db.
Please, have a look to this article from Ivan Kartik :
http://ivan.kartik.sk/index.php?show_article=40
And depending of your OS, you could check what ORACLE_HOME is used for each process :
How to Check the Environment Variables for an Oracle Process*
Doc ID: 373303.1*
Nicolas.
added the metalink note ref.
Edited by: N. Gasparotto on Sep 4, 2009 11:34 AM -
RMAN backups valid for clone database.
Hi,
If we clone the database using rman that clone database will be having different database id, incurnation number and new resetlogfiles.
so here we can't use source database backup files. if we want to use that source database backup files to clone database what is the procedure to clone the database.
please let me know.
thank you very much...!899329 wrote:
Hi,
If we clone the database using rman that clone database will be having different database id, incurnation number and new resetlogfiles.
so here we can't use source database backup files. if we want to use that source database backup files to clone database what is the procedure to clone the database.
please let me know.
thank you very much...!You can clone/refresh database as
1) RMAN duplicate
2) RMAN restore from backups(restore control + database)
using source backup files:-
3) Hot backup clone ( begin backup, copy files, end backup, create controlfile using trace)
4) cold clone (shutdown database, copy datafiles, create controlfile)
5) whole database export & import -
What is the best backup plan for Archive Databases in Exchange 2013?
Hi,
We have Exchange 2013 with Hybrid setup with O365.
We have On premise exchange 2013 servers with 3 copies of primary Database & Single Copy of Archival DBs.
Now we have to frame backup policy with Symantec Backup Exec which has to backup our primary & Archival DBs
In 2007 exchange, before migration to 2013, we had policy of DBs - Weekly Full backup & Monthly Full Backup
Please suggest what would be the best possible backup strategy we can follow with 2013 DBs.
That too, especially for Archiving DBs
Our Archiving Policy are - 3 category - Any emails older than 6 month OR 1 Year OR 2 Year should go to Archive mailbox.
Keeping this in mind how to design the backup policy ?
Manju GowdaHi Manju,
you do not find best practice different from the common backup guidelines, as there is no archive db specific behaviour. Your users may move items to their archive at any time as well as your retention policies may move items that machted the retention policies
at any time. The result is frequently changing content to both, mailbox and archive mailbox databases, so you need to backup both the same way. You also may handle archives together with mailboxes together in the mailbox db
Please keep in mind that backup usually means data availability in case of system failure. So you may consider to do a less frequent backup with your archive db with dependency to the "keep deleted items" (/mailboxes) setting on your mailbox database.
Example:
keep deleted items: 30 days
backup of archive db: every 14 days
restore procedure:
* restore archive DB content
* add difference from recover deleted items (or Backup Exec single item recovery) for the missing 14 days.
So it depends more on your process than on a backup principle.
Regards,
Martin -
How to make and schedule backup tasks for MySQL Databases
Has NSS 322 this functionality? If not, are there any packages to do dat? I can´t see the folders that contain MySQL Databases, so I can´t backup them.
Many thanks in advance for your support.All of the MySQL databases are visable within the phpMyAdmin application. phpMyAdmin can export, import, manage the databases directly.
To use the remote replication feature from the GUI, you need the databases visible in a share. I'm sure that is possible through the CLI, but I'm not able to tell you how to do it. Maybe someone else on the forum can help provide a solution.
You can also use the rsync command in the CLI directly.
Did you find any ideas on the phpMyAdmin website? This must be a common task that someone has worked out a solution for. -
I came to know that name has changed when I tried to shrink the file. Here is the error message I got:
Shrink failed for LogFile "Tfs_TESTTFS_Log'. (Microsoft.SqlServer.Smo)
Additonal information
An exception occured while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.COnnectionInfo)
Could not locate file 'Tfs_TESTTFS_Log' for database 'Tfs_TESTTFS' in sys.database_files. The file
either does not exist, or was dropped. (Microsoft Sql Server, Error: 8995)
This is test environment upgrade and I checked on production environment which is still on SQL 2008R2, shrink works fine.
Please help.I did in place Upgrade.
Before Upgrade
Logical Names
Database Name: Tfs_TESTTFS
Database Log: Tfs_TESTTFS_Log
After Upgrade
Logical Names
Database Name: Tfs_TESTTFS
Database Log: TfsVersionControl_Log
Thx -
Multiple Backup Locations for Multiple Lightroom Databases
I currently work with two lightroom databases but when I back up the databases, the backups get stored in the same Lightroom Backups folder. The two backups are stored in separate sub-folders but the actual database files have the same name. Thus, the only way to know which backup is for which database if to note the times that the backups were created and use this to determine which backup applies to which database.
It would seem like the actual backup files could be named as per the associated database or the backup location could be specified for each database so that there is less chance for a mistake if a database needs to be restored.
Thanks in advance,
Dave MayfieldThanks for your reply.
I need the have each LOS ( Location of sale or location of delivery) of Business Partner because we will deliver items for the LOS and not for BP.
As we also need to control (serial numbers) items & services ( field management) I also need to have the LOS as BP.
As example:
BP name AAA have 30 LOS.
BP AAA bought 2000 items.
BP AAA ask us to old theses items in warehouse.
BP AAA request to delivery a x quantity in LOS 1, 2,3,4,...
The invoice went to BP AAA, but the deliveries will be to each LOS of BP AAA.
As I said we need to have the field services working side-by-side with serials numbers and services for each LOS of our BP AAA.
So, we have subcustomers from big customer BP AAA.
Do we have any way of having all subcustomers(LOS) as BP, along with the real customer AAA?
Thanks in advance,
Maybe you are looking for
-
How to print on HP LaserJet 2200 over Ethernet?
Hi, I did an upgrade to Snow Leopard and would like to print on a HP LaserJet 2200 over Ethernet. OS X and the HP printer drivers are up to date now. The printer has been cold reset and on the configuration print out there's the IP address 0.0.0.0 No
-
been sat here for the past 5 hours trying to figure out why itunes wont download, it says error and something to do with Microsoft version? Help me please.. getting a bit bored?
-
RMI Works In One Direction, But Not When Config Flipped
Hi All, Interesting problem: I have an SSL-RMI server, running either as an application, or as a service using JS Wrapper, on PC-A, correctly serving content to a client running on PC-B. But when I flip the configuration, such that PC-B is now hostin
-
Hi Experts, After executing the Cash management and forecast report in transaction code FF7A, we drill down in the sub-ledger-it shows correct figures then we drilldown further to FI figures here also it shows correct figures but when we drilldown to
-
Can I modify the exposure of movies in keynote 6.1? As I see, the exposure can be adjusted in case of images, but if a movie is too dark, can it be corrected somehow? The imovie-adjust-export routine is a no go, cause i have a square format movies,