10g windows cold backup script ...
we have 10g db on windows server.
I wnat to perform cold backup of db everyday night.
at present I am in process on writting .bat to shoudown 10g db
I nee .bat file to shutdown 10g database
user580175 wrote:
Script .bat shutdown database:
C:\oracle\product\10.2.0\bin\oradim -shutdown -sid ORCL -shuttype INST -shutmode immediate
Script .bat startup database:
C:\oracle\product\10.2.0\bin\oradim -startup -sid ORCL -usrpwd oracle -starttype INST -pfile C:\oracle\admin\10.2.0\pfile\initORCL.oraYou might want to get rid of pfile section if using spfile.
Similar Messages
-
Oracle version : 11G release 2
Platform : AIX
After going through various OTN posts, i wrote the below Cold backup script (Untested). If there are any unnecessary stuff or enhancements required, please let me know
$ rman target /
RMAN>
run
allocate channel c1 type disk format '/u05/rmanbkp/%d_COLD_DB_%u';
sql 'alter system archive log current';
shutdown immediate;
startup mount;
backup database including current controlfile tag='mydbname_full_bkp';
backup spfile tag = 'mydbname_SPFILE';
release channel c1;
}Hi T.Boyd
What do you guys think of the backup script? Any room for improvement? I found in a small percentage of the shutdown immediate commands issued, the instance hangs (specially when the machine is very busy).
I have modified my rman coldbackup the procedure to:
shutdown abort;
host 'sleep 3';
startup restrict;
shutdown immediate;
startup mount;Maybe you can add more channels to improve performance. You can use more resources as there are no users on the database anyway....
Regards,
Tycho -
DB version :10.2.0.4
Do you find anything wrong in the below mentioned RMAN cold backup script? Any enhancements, corrections required?
shutdown immediate;
startup mount;
backup database including current controlfile tag='full_bkp';
startup;
crosscheck backup;
delete noprompt obsolete device type disk;
resync catalog;
}Since you are doing a SHUTDOWN IMMEDIATE and STARTUP MOUNT before the BACKUP, there will be no ArchiveLogs generated while the backup is running --- as the database is not OPEN.
However, the PLUS ARCHIVELOG can include ArchiveLogs that had been generated from the previous STARTUP or ALTER DATABASE OPEN.
(In that case, I would suggest an SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT' before the SHUTDOWN IMMEDIATE).
Is your database running in ARCHIVELOG mode ? If not, then this discussion is moot.
If yes, the next question is, obviously : Why not take a Hot Backup while the database is running (in which case you MUST backup archivelogs !)
Hemant K Chitale -
Hi,
i want to make a cold backup and schedule it in CRON, but don't know why but it doesn't work. This is what i've in de "full.rman" file:
connect target /
shutdown immediate;
startup mount;
backup database as compressed backupset;
crosscheck backup;
delete expired backup;
alter database open;
exit
i tried to run this script by rman @full.rman
but when i do this i'm getting the following error:
RMAN> backup database as
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "as": expecting one of: "archivelog, backup, backupset, channel, copy, controlfilecopy, current, database, datafile, datafilecopy, delete, diskratio, db_recovery_file_dest, filesperset, format, from, force, include, keep, (, maxsetsize, noexclude, nokeep, not, pool, plus, reuse, recovery, ;, skip, spfile, setsize, tablespace, tag, to"
RMAN-01007: at line 1 column 17 file: full.rman
In the past i had another error where it looked like it wasn't shutting down the database and starting it up in mount mode. So how can i make a script what wil do what i want :)
Thanks in advance.
regards,
OsmanTry:
backup as compressed backupset database; -
Windows Server backup script won't do differential/incremental
What follows is a script that doesn't seem to do backups on an incremental basis so it is creating full backups each time.
++++++++++
param(
[string]$volLetter,
[string]$scriptStorageLocation
function prepare-disk($checkDiskCriteria,$diskOrVolume){
if($diskOrVolume -eq 'disk'){
$disks = Get-WBDisk
$selected = $disks|?{$_.DiskName -match $checkDiskCriteria}
elseif($diskOrVolume -eq 'volume' ){
$allVolumes = Get-WBVolume -AllVolumes
$selected = $allVolumes|?{$_.MountPath -match $checkDiskCriteria}
return $selected
function add-volumeMountPoint($policyAdd,$mountPoint){
$matchVolumes = Get-WBVolume -AllVolumes
$correctVolume = $matchVolumes | ?{ $_.MountPoint -eq $mountPoint}
Add-WBVolume -Policy $policyAdd -Volume $correctVolume;
return $policyAdd
function add-VMToWB($policyAdd,$vmName){
$vmObject = Get-WBVirtualMachine |?{ $_.VMName -eq $vmName}
$vmobject='PCLaw';'2012CORPEXCHANGE';'File Server';'DC1'
Add-WBVirtualMachine $policyAdd -VirtualMachine $vmObject
return $policyAdd
function remove-policy(){
$policy = get-wbpolicy -editable
$policy|export-clixml 'backup.xml'
remove-wbpolicy $policy -force
function restore-policy($wbBackupTarget){
$policyRestore = import-clixml 'backup.xml'
$global:newPolicy = new-wbpolicy
Set-WBSchedule -Policy $newPolicy -Schedule $policyRestore.Schedule
$VolumeBackupLocation = New-WBBackupTarget -Volume $wbBackupTarget
Add-WBBackupTarget -Policy $newPolicy -Target $VolumeBackupLocation
if($([string]$policyRestore.VssBackupOptions) -match 'VssFullBackup' ){Set-WBVssBackupOptions $global:newPolicy -VssFullBackup;write-host 'foundFull'}
else{Set-WBVssBackupOptions $global:newPolicy -VssFullBackup;write-host 'FoundCopy'}
$newPolicyBound = $policyRestore.VolumesToBackup|%{add-volumeMountPoint $global:newPolicy $_.MountPoint;}
$global:newPolicy = $newPolicyBound[-1]
if($policyRestore.BMR){Add-WBBareMetalRecovery $global:newPolicy}
if($policyRestore.SystemState){Add-WBSystemState $global:newPolicy}
$newPolicyBound = $policyRestore.ComponentsToBackup | %{ add-VMToWB $global:newPolicy $_.VMName}
$global:newPolicy = $newPolicyBound[-1]
write-host -fore cyan 'Final Policy'
$global:newPolicy
Set-WBPolicy $global:newPolicy
function rename-WIB($pathWIB,$dateOfBackup){
if(test-path $pathWIB){
$newName = "WIB_"+$dateOfBackup
rename-item $pathWIB -newName $newName
Add-WBBackupTarget -Policy $newPolicy
Set-WBPolicy $newPolicy
if(!($scriptStorageLocation)){
$scriptStorageLocation = 'C:\Techbase\WindowsBackupRecreationScript';}
$volCheck = $volLetter+":";
$pathNew = $volLetter+":\WindowsImageBackup";
$dateOfBackup = Get-Date -UFormat "%Y_%m_%d";
$volName = $volLetter+":";
if(!(test-path "$scriptStorageLocation\WBfile.txt")){
$diskOrVolumeInput = Read-host 'Are you using a disk or a volume (type d or v)?'
$diskOrVolumeInput = $diskOrVolumeInput.ToLower();
if(($diskOrVolumeInput -eq 'v') -or ($diskOrVolumeInput -eq 'd')){
New-Item "$scriptStorageLocation\WBfile.txt" -type file
Add-content "$scriptStorageLocation\WBfile.txt" $diskOrVolumeInput
if($diskOrVolumeInput -eq 'd'){
disk
$diskNum= Read-host 'Please select the disk number ?'
Add-content "$scriptStorageLocation\WBfile.txt" $diskNum
elseif($diskOrVolumeInput -eq 'v'){
$allVolumes = Get-WBVolume -AllVolumes;
$allVolumes|Select *;
$diskVol= Read-host 'Please type in the letter of the Mountpath you would like to use (Only type in the letter)?'
$diskVol = $diskVol.ToUpper();
Add-content "$scriptStorageLocation\WBfile.txt" $diskVol
else{
Write-host -fore red 'Sorry the input was not an available option.'
else{
write-host 'Your configuration file was ready when this script is executed.';
$info = gc "$scriptStorageLocation\WBfile.txt"
if($info[0]='v'){
write-host -fore cyan $info[1]
$WB_Volume = prepare-disk $info[1] 'volume'
$locationOfWIB = $info[1] +":\WindowsImageBackup";
rename-WIB $locationOfWIB $dateOfBackup
remove-policy
restore-policy $WB_Volume
elseif($info[0]='d'){
$WB_Disk = prepare-disk 'WD My Book 1230 USB Device' 'disk'
$WB_Disk;
+++++++++++
Also what follows is the most recent backup policy.
+++++++++++++++++++
- <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04">
- <Obj RefId="0">
- <TN RefId="0">
<T>Microsoft.Windows.ServerBackup.Commands.WBPolicy</T>
<T>System.Object</T>
</TN>
<ToString>Microsoft.Windows.ServerBackup.Commands.WBPolicy</ToString>
- <Props>
- <Obj N="Schedule" RefId="1">
- <TN RefId="1">
<T>System.Collections.Generic.List`1[[System.DateTime, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]</T>
<T>System.Object</T>
</TN>
- <LST>
<DT>2014-10-14T19:30:00</DT>
</LST>
</Obj>
- <Obj N="BackupTargets" RefId="2">
- <TN RefId="2">
<T>System.Collections.Generic.List`1[[Microsoft.Windows.ServerBackup.Commands.WBBackupTarget, wsbcmdlet, Version=6.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]</T>
<T>System.Object</T>
</TN>
- <LST>
- <Obj RefId="3">
- <TN RefId="3">
<T>Microsoft.Windows.ServerBackup.Commands.WBBackupTarget</T>
<T>System.Object</T>
</TN>
<ToString>F:</ToString>
- <Props>
<S N="Label">3TB USB</S>
<Nil N="WBDisk" />
<S N="WBVolume">3TB USB (F:)</S>
<S N="Path">\\?\Volume{7f5bcfe6-a050-44be-80c9-b056f0121819}</S>
<S N="TargetType">Volume</S>
<B N="InheritAcl">true</B>
<B N="PreserveExistingBackup">true</B>
</Props>
</Obj>
</LST>
</Obj>
- <Obj N="VolumesToBackup" RefId="4">
- <TN RefId="4">
<T>System.Collections.Generic.List`1[[Microsoft.Windows.ServerBackup.Commands.WBVolume, wsbcmdlet, Version=6.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]</T>
<T>System.Object</T>
</TN>
<LST />
</Obj>
- <Obj N="FilesSpecsToBackup" RefId="5">
- <TN RefId="5">
<T>System.Collections.Generic.List`1[[Microsoft.Windows.ServerBackup.Commands.WBFileSpec, wsbcmdlet, Version=6.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]</T>
<T>System.Object</T>
</TN>
<LST />
</Obj>
- <Obj N="FilesSpecsToExclude" RefId="6">
<TNRef RefId="5" />
<LST />
</Obj>
- <Obj N="ComponentsToBackup" RefId="7">
- <TN RefId="6">
<T>System.Collections.Generic.List`1[[Microsoft.Windows.ServerBackup.Commands.WBApplicationComponent, wsbcmdlet, Version=6.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]</T>
<T>System.Object</T>
</TN>
- <LST>
- <Obj RefId="8">
- <TN RefId="7">
<T>Microsoft.Windows.ServerBackup.Commands.WBVirtualMachine</T>
<T>Microsoft.Windows.ServerBackup.Commands.WBApplicationComponent</T>
<T>System.Object</T>
</TN>
<ToString>0E91F216-553D-4C7C-8178-A09E5D081020\</ToString>
- <Props>
<S N="VMName">PCLaw 2008 R2</S>
<S N="ComponentName">0E91F216-553D-4C7C-8178-A09E5D081020</S>
<S N="LogicalPath" />
<S N="Caption">Backup Using Saved State\PCLaw 2008 R2</S>
<G N="WriterId">66841cd4-6ded-4f4b-8f17-fd23f8ddc3de</G>
<G N="InstanceId">b0f4f239-bcc6-408f-9db6-b66d5de9458d</G>
</Props>
</Obj>
- <Obj RefId="9">
<TNRef RefId="7" />
<ToString>12DCBB00-87D9-4660-82E1-E01245A5E011\</ToString>
- <Props>
<S N="VMName">2012CORPEXCHANGE</S>
<S N="ComponentName">12DCBB00-87D9-4660-82E1-E01245A5E011</S>
<S N="LogicalPath" />
<S N="Caption">Backup Using Saved State\2012CORPEXCHANGE</S>
<G N="WriterId">66841cd4-6ded-4f4b-8f17-fd23f8ddc3de</G>
<G N="InstanceId">b0f4f239-bcc6-408f-9db6-b66d5de9458d</G>
</Props>
</Obj>
- <Obj RefId="10">
<TNRef RefId="7" />
<ToString>8A769D3A-4B21-419A-8BA2-584EC3168C51\</ToString>
- <Props>
<S N="VMName">File Server</S>
<S N="ComponentName">8A769D3A-4B21-419A-8BA2-584EC3168C51</S>
<S N="LogicalPath" />
<S N="Caption">Backup Using Saved State\File Server</S>
<G N="WriterId">66841cd4-6ded-4f4b-8f17-fd23f8ddc3de</G>
<G N="InstanceId">b0f4f239-bcc6-408f-9db6-b66d5de9458d</G>
</Props>
</Obj>
- <Obj RefId="11">
<TNRef RefId="7" />
<ToString>A912807A-04FE-4AB6-981B-01D6489865D6\</ToString>
- <Props>
<S N="VMName">DC1</S>
<S N="ComponentName">A912807A-04FE-4AB6-981B-01D6489865D6</S>
<S N="LogicalPath" />
<S N="Caption">Backup Using Saved State\DC1</S>
<G N="WriterId">66841cd4-6ded-4f4b-8f17-fd23f8ddc3de</G>
<G N="InstanceId">b0f4f239-bcc6-408f-9db6-b66d5de9458d</G>
</Props>
</Obj>
</LST>
</Obj>
<B N="BMR">false</B>
<B N="SystemState">false</B>
<B N="OverwriteOldFormatVhd">false</B>
- <Obj N="VssBackupOptions" RefId="12">
- <TN RefId="8">
<T>Microsoft.Windows.ServerBackup.Commands.VssBackupOptions</T>
<T>System.Enum</T>
<T>System.ValueType</T>
<T>System.Object</T>
</TN>
<ToString>VssFullBackup</ToString>
<I32>0</I32>
</Obj>
</Props>
</Obj>
</Objs>
++++++++
+++++++++++++++++++++++++
Script does everything perfect except for the backup not being incremental/differential - it just creates a different folder each iteration that it puts the backup into.
I would appreciate if someone could go through and let me know what we might be doing wrong - why we are not able to get this job to be incremental/differential.
Thanks in advance.Hre are all of the options for Windows Backup:
http://technet.microsoft.com/en-us/library/ee706670.aspx
If you can find an incremental backup naywhere in the options then I will admit I have missed something.
The old Windows Backup, pre-2008, could do incremental backups. The newer backup system is minimal and serves different purposes.
The question about how to use a subsystem of Windows is NOT a scripting question. It is a "how-to" for a Windows component.
If you do not understand the scrip tyou posted then I recommend finding someone with sufficient understanding of Windows and the new backup Cmdlets to help you top understand how they work.
Here is the Microsoft description of Windows Server Backup:
Windows Server Backup consists of a Microsoft Management Console (MMC) snap-in, command-line tools, and Windows PowerShell cmdlets that provide a complete solution for your day-to-day backup and recovery needs. You can use Windows Server Backup to back
up a full server (all volumes), selected volumes, the system state, or specific files or folders—and to create a backup that you can use for bare metal recovery. You can recover volumes, folders, files, certain applications, and the system state. And, in case
of disasters like hard disk failures, you can perform a bare metal recovery. (To do this, you will need a backup of the full server or just the volumes that contain operating system files, and the Windows Recovery Environment—this will restore your complete
system onto your old system or a new hard disk.)
You can use Windows Server Backup to create and manage backups for the local computer or a remote computer. And, you can schedule backups to run automatically.
Windows Server Backup is intended for use by everyone who needs a basic backup solution—from small business to large enterprises—but is even suited for smaller organizations or individuals who are not IT professionals.
It specifically states that only a full server or selected file,device backup is possible. There is no statement of incremental backup. Windows Server backup is intended for server recovery.
If you type "help Set-WBVssBackupOptions
-full" you will see that there are only two options "full" and "copy".
Please post your issues in the WS2008 or the WS2012 forum to get more information on how the Windows Server backup service works.
¯\_(ツ)_/¯ -
Cold Backup Script for windows
Hi,
I have the following script for windows
set pages 0 lines 500;
set heading off echo off feedback off verify off pagesize 0;
select 'copy ' || name || ' c:\BACKUP\COLD_BACKUP\ORADATA\' from v$datafile
union all
select 'copy ' || name || ' c:\BACKUP\COLD_BACKUP' from v$controlfile
union all
select 'copy ' || member ||' c:\BACKUP\COLD_BACKUP' from v$logfile
union all
select 'copy ' || name || ' c:\BACKUP\COLD_BACKUP' from v$tempfile;
exit;
In the above script I have given COLD_BACKUP directory for Backup....But what i want is Dynamically it should create the Directory with timestamp in COLD_BACKUP Directory and copy the files to that directory..
for example
script should create like this
c:\BACKUP\COLD_BACKUP\ORCL_11112007
Like that..it should create the ORCL_11112007 directory and copy the files....
how can i acheive this...I know we can do it in UNIX..
But in windows..how we can acheive this...please help meYou can try to adapt the following SQL*Plus script to create a directory:
set echo on
alter session set nls_date_format = 'DDMMYYYY';
var dd varchar2(10);
begin
:dd := trunc(sysdate);
end;
set echo off
spool mkd.sql
set heading off
select 'host mkdir ' || :dd from dual;
spool off
set echo on
@mkd.sqlOutput is:
dev001> alter session set nls_date_format = 'DDMMYYYY';
Session altered.
dev001> var dd varchar2(10);
dev001>
dev001> begin
2 :dd := trunc(sysdate);
3 end;
4 /
PL/SQL procedure successfully completed.
dev001>
dev001> set echo off
host mkdir 08112007
dev001> @mkd.sql
dev001>
dev001> host mkdir 08112007
dev001>
dev001>
[pre] -
I am a linux newbie and I need a simple script that will do the following for me. I am using Oracle 11g and RHEL 6 ....I wanting to use VI to write a script and schedule it nightly....
1.) shutdown the database
2.) copy the dbf's and maybe the archivelogs
3.) start the database
Then I am hoping to copy the dbf's to another server and clone.
thanks for the help
Edited by: user2857110 on Jan 4, 2012 8:10 AMThis is the coolest way to clone:
SYS password must be the same on both databases.
In this RMAN code you will see the labels "Target" and "Auxiliary". Just remember that the "Target" is the DB you will be cloning FROM. It is more like the "Source". The "Auxiliary" is the DB that you will be cloning TO. The "Auxiliary" will be completely erased and replaced by the "Target".
Must be able to SQLPlus to the "Auxiliary" DB from the command line of the server that hosts the "Target" DB.
The "Auxiliary" database needs to be mounted but not open.
Then run this. (I run it from the server that hosts the "Auxiliary" DB)
rman target sys/password@PROD
connect auxiliary sys/password@TEST
run
allocate channel c1 device type disk;
allocate auxiliary channel c2 device type disk;
duplicate target database to TEST from active database nofilenamecheck;
} -
Upgrading database in 10g with 9i cold backup.
Hello Experts,
I am upgrading my database in 10g with cold backup of 9i.
I am getting this error
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: 'D:\9i_DB\SYSTEM01.DBF'
could you people help me
Thanks in Advance....I would suggest you need to start the db in 9i first .. check the db is up and running .. then go for Manuall upgrade process to10g
--Girish -
Dear all,
I need a script to take cold backup of oracle database 10.2.0.3.0 .. such that if todays date is 28-oct-08.. then a folder with the name 28oct08 to be created in the backup location.then using the script user should login to the database shutdown the db and listener and make sure this is completely down and copy the complete oracle files and home location to the above mentioned folder in the server.. any links or points will help a lot ?
KaiKai, rather than write a script to perform a cold backup for whatever platform you are on I suggest you write a script to generate the cold backup script. The script can connect to the database, read various v$ and dba views such as dba_data_files to get the necessary data file information, and place the file names into OS copy commands. The resulting script should probably include steps to connect to and stop the database and to restart the database instance when it is complete.
Be sure to include a copy of your control file and the spfile in your backup. You do not need to include the online redo logs in your manual cold backup.
An alternate might be to run an rman backup while the database is in restricted session depending on how freely your site has given out the DBA role and/or restricted session privilege.
HTH -- Mark D Powell -- -
Hi--
Can any one provide me one cold backup script,,with that i need to delete 2 days old backup and need to put current backup in that mountpoint.
Thanks in advance.user8683962 wrote:
We are not using RMAN So what is preventing you from starting? The real value of rman will be when you have to recover, it will already know where all the necessary peices are and what needs to be done. Plus, it will take care of the housekeeping of deleting your old, obsolete backups.
and Hot backups.....So you don't care if you lose any changes that occur between your cold backups?
i want to take a cold backup of my database every day and delete need to delete 2 days old backup, so that i can maintain 2 backups(today's and yesterday's) in my hand... Again, rman will do this for you, and more, and much more simply
for this can any one provide me a script to make it automate by adding to crontab.If someone else hasn't by the time I get back to my hotel room this evening, I'll post an rman solution. It is a waste of time to work on a non-rman solution. -
User tablespace did not copy during cold backup
Can anybody explain why this happened and how to fix?
I was doing regular weekly coldbackup and all other tablespaces got copied except user tablespace. I can not find any error in alert log and windows event log. The file size is 25G. Any idea?
ThanksThe original poster has declared that this a cold backup, so presumably no BEGIN/END BACKUP involved here. Further, how would those commands do anything to cause a backup script to SKIP the files for a tablespace?
As for the OP's problem, I will guess that this is occurring on Windows. Because the default flag that Windows programs use to open files often specify exclusivity, many backup scripts and packages will not be able to open (or copy) a file that is open by another process. Notably, if the backup is hitting such a problem it should be receiving (and hopefully logging) and error.
I can't guess what other program might have had the files open, but if Oracle did not successfully shut down completely, or if some threads failed to exit during shutdown, you would end up with some files with open filehandles. That would prevent commands like COPY from working on those files.
Solutions (if this is windows and my theory holds water) would include:
- Providing exception handling in the cold backup script to verify that Oracle has shutdown completely and that no Oracle threads remain.
- Switching to ocopy.exe (Oracle nonexclusive copy program for Windows) so that the backup would not fail on files with open filehandles. I guess this is a little reckless since the database could be open and the cold backup could proceed heedless of that fact.
- Use process explorer to track down what program has the files open after shutdown.
Hope this helps,
Jeremiah Wilton
ORA-600 Consulting
http://www.ora-600.net -
There is request to take cold backup of primary & standby db , i am New to dataguard backups, Should i take backup of only primary db or both?
Yes apps owner is insisting to take cold backup of both db this weekend(they are patching apps), and here are the step i had in mind to do that to stop , primary & llogical standby dbs , take cold backups ( scripts, usermanaged backups, dont have rman there) & start the dbs.
On standby db
SQL > set numformat “999999999999999”
SQL > select newest_scn,applied_scn from dba_logstdby_progress ; (both should match)
SQL > select thread#,sequence#,applied from dba_logstdby_log;
SQL> select sequence#, status from v$archived_log;( on primary) Both sequence# should match
on primary db
SQL > alter system switch logfile ;
SQL > alter system archive log current ; ( to make sure current transactions come thru)
check tail of alert log of standby to make sure these redologs shipped & mined
standby db
SQL> ALTER DATABASE STOP LOGICAL STANDBY APPLY; (stop SQL Apply)
SQL> shutdown immediate;
Lsnrctl stop listener_corp_remrpt-haprimary db
SQL > shutdown immediate ;
Lsnrctl stop listener_corp_remprd-ha
Dont shutdown abort for any case, if both dbs are going down, first stop SQL apply on standby, take primary down and then take standby down)
Startup
primary
SQL>startup;
Lsnrctl start listener_corp_remprd-ha
Standby
SQL > startup
SQL > alter database start logical standby apply immediate ;
Lsnrctl start listener_corp_remrpt-ha -
Script for cold backup on windows
looking for a script that can be scheduled nightly to perform
a cold backup to disk of a 8.1.7 database on windows.
while i've seen many, i'm looking for one that will keep 3 days worth
of backups... then write over the oldest etc...
thanks
dgset term off
set head off
set feedback off
set verify off
spool c:\coldbackup.bat
select 'copy '||name||' c:\DBBACKUP' from v$datafile;
select 'copy '||name||' c:\DBBACKUP' from v$controlfile;
select 'copy '||name||' c:\DBBACKUP' from v$tempfile;
select 'copy '||member||' c:\DBBACKUP' from v$logfile;
spool off
shutdown IMMEDIATE
host c:\coldbackup.bat
startup
host del c:\coldbackup.bat
set term on
set head on
set feedback on
set verify on -
Unix Cold Backup To Windows Machine
Is it possible to restore a cold backup of 9.2 oracle to a windows operating system.
My problem is, i have a cold backup and i want to restore just one datafile ..It's NOT possible to restore Unix cold bacup of Oracle database to Windows machine. You HAVE to restore it on the same OS
Kamran Agayev A. (10g OCP)
http://kamranagayev.wordpress.com
[Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/] -
Script for cold backup using RMAN
Dear all,
db_version:-10.2.0.4
os_version:- Windows 2003 server
I wish to schedule a script that will take cold backup of my database using RMAN.
Any help is appreciated ..
Edited by: user12000301 on May 18, 2011 5:02 AMDear All,
Thanks a lot for your valuable time :
However i have managed to do it as follows :
1. First i have configure the parameter of RMAN ( Since it is my UAT in Noarchive log mode), I have never tried RMAN cold backup on the same.
Following is the out put of SHOW ALL;
RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 2 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'D:\DB\RMAN_BKP\BACKUPS%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'D:\DB\RMAN_BKP\BACKUPS\DB_%U.%r';
CONFIGURE MAXSETSIZE TO UNLIMITED;
CONFIGURE ENCRYPTION FOR DATABASE OFF;
CONFIGURE ENCRYPTION ALGORITHM 'AES128';
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'D:\DB\RMAN_BKP\BACKUPS\SNCFDB.ORA';
2. I have created a rman_cold_bkp.bat file which has following entry :
cd c:\oracle10g\bin
set oracle_sid=DB
rman target system/*** @D:\DB\RMAN_BKP\SCRIPT\rman_cold_bkp.rcv log=D:\DB\RMAN_BKP\SCRIPT\rman_cold_bkp.log
exit
3. Whereas rman_cold_bkp.rcv file contains following contents:
run
allocate channel C1 device type disk;
shutdown immediate;
startup mount;
backup database;
alter database open;
release channel C1;
exit
I did checked it and it;s working fine for me :-)
Regards,
Girish
Maybe you are looking for
-
HT1386 How do you know when your back up is complete from you ipad to computer
How do you know if r back up is on your computer when finished
-
No way to definitely delete an iphone app in itunes tab
I have a very long list of unused app in the left column of the app itunes tab... And no way to delete them. I have looked everywhere in the web, some people say that, when deleting an app, there should be a pop-up window asking me if a want to only
-
I'm having trouble connecting a Logitech Internet Chat headset to the Line In port on my Mac Mini. Plugging in the wire for the headphone parts works fine, but when I plug in the wire fo the microphone, I cannot get it to work, and record sound in Sk
-
I want to know how to call navigate to page in new window.
Hi, I want to know how to call navigate to page in new window. Following is the code which i am using on Event OnInputProcessing. navigation->goto_page( 'index.htm' ). From the above code i am able to open the index.htm in the same window. but I nee
-
Firefox crashes when accessign certain sections on Ebay
When going to ebay.com and accessing certain sections, "Selling Manager Pro Summary" in particular, Firefox crashes. It does not crash on the main page, only on that particular section. We have tried deleting history, cache and cookies and it was wor