Backup & Recovery :: Execute A BATCH File Through PLSQL?
May 30, 2012
execute a BATCH File through PLSQL.
BEGIN
dbms_scheduler.Create_schedule(schedule_name => 'RMAN_TICKER_STARTING',
repeat_interval => 'FREQ=DAILY;BYHOUR=9; BYMINUTE=15,30,45,59',
comments
=> 'schedule to run daily');
dbms_scheduler.Create_program (program_name => 'TICKER_PROGRAME',
[code]....
It was created successfully, but when I execute, it shows the error message.
BEGIN
dbms_scheduler.Run_job ('RMAN_TICKER_JOB', TRUE);
END;
begin
dbms_scheduler.run_job (
'RMAN_TICKER_JOB',TRUE);
end;
Error at line 1
ORA-27370: job slave failed to launch a job of type EXECUTABLE
ORA-27300: OS system dependent operation:accessing execution agent failed with status: 2
[code]....
But I have the CMD file in the location - "F:FEEDLGRTOOLSfeedlgr.cmd".
View 2 Replies
ADVERTISEMENT
May 3, 2011
I am trying to setup incremental backup on my windows OS based server using RMAN command in batch file. When I use batch file in OS scheduler it is working fine, when I am calling same batch file from my LOCAL desktop PC it throws errors as below.
D:> \3.193.211.19sgdba
mankp_acressit.bat
D:>rman catalog rman/******@acressit target / cmd
file=E:sgdba
mankp_arch.rcv log E:sgdba
mansit_arch_rman_backup.log
RMAN-00557: could not open MSGLOG "E:sgdba
[code]....
Both single and double quotes (' or ") are accepted for a quoted-string.
Quotes are not required unless the string contains embedded white-space.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00556: could not open CMDFILE "E:sgdba
mankp_arch.rcv"
[code]....
* on my DB server I am login using my administrator account, on my PC I dont have admin account.
* I have checked remote execution using local user as well as admin user.
* I have checked the permission and my local ID & EVERYONE has all permission in that folder.
View 2 Replies
View Related
Nov 17, 2012
We have configured tivoli and getting the below error while execute rman backup.
> rman target / catalog rman/*****@CATLOGDB
Recovery Manager: Release 11.2.0.3.0 - Production on Sat Nov 17 13:35:03 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: AMTMXPRD (DBID=534215973)
connected to recovery catalog database
[code]....
View 6 Replies
View Related
May 18, 2011
exp system/abc@c file=c:dmp_%date%.dmp log=c:log.txt owner=xyz
I run this script through batch file its working.Problem is dump file showing with this format C:dmp_wed.dmp.I want to date format like that C:dmp_18052011.dmp.
for date formatting.How I can add date format in a batch file.
View 5 Replies
View Related
Oct 18, 2012
I just switched my STBDY DB to a PRIMARY DB and I am ran the following:
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
using target database control file instead of recovery catalog
old RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
new RMAN configuration parameters are successfully stored
ORA-00245: control file backup operation failed
RMAN-08132: WARNING: cannot update recovery area reclaimable file list
RMAN> show all;
RMAN configuration parameters for database with db_unique_name ORARZULB are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 30 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
[code]....
what causes this warning and how to get rid of it?
View 2 Replies
View Related
Jan 28, 2011
I am tryign to run a split onlike full backup from the os useign the sap command which is linked to rman..Command that i am useing is ...
brbackup -u / -c force -t online_split -m full -p initBR1_onlinefull.sap
The backup goes thru but i get this erro on the end...
BR0522I 57 of 57 files/save sets processed by RMAN
BR0280I BRBACKUP time stamp: 2011-01-26 12.23.26
BR0505I Full database backup (level 0) using RMAN successful
BR0280I BRBACKUP time stamp: 2011-01-26 12.23.28
[code]...
Copyright (c) 1982, 2007, Oracle. All rights reserved.
RMAN>
connected to target database: BR1 (DBID=2250873886)
using target database control file instead of recovery catalog
RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20> 21> 22> 23> 24> 25> 26> 27> 28>
29> 30> 31> 32> 33> 34> 35> 36> 37> 38> 39> 40> 41> 42
[code]...
Recovery Manager complete.
ERR_RC: 1
BR0280I BRBACKUP time stamp: 2011-01-26 12.23.32
BR0279E Return code from 'brtools -f printcmd -U /oracle/BR1/sapbackup/..befcdgxn..cmd -C
/oracle/BR1/sapbackup/.befcdgxn.cmd | rsh scrbdefrmr207 /bin/sh -c "'LANG=C SHELL=/bin/sh/oracle/BR1/102_64/bin/rman
[code]...
I have check on the system .. There is not file like that but thwre on on the db i,e
eshtsm20:orabr1 88> pwd
/oracle/BR1/sapdata1/perfman_1
eshtsm20:orabr1 89> ls -ltr
total 102408
-rw-r----- 1 orabr1 dba 104865792 Aug 30 09:05 perfman.data1
View 13 Replies
View Related
Sep 27, 2011
Suppose I take a multi stream backup, say 3 streams.
So if a control file is backed up in say backup set 1, so is the whole control file is backed up in one backup piece or it may span multiple pieces?
A backup set may have multiple backup pieces.
View 2 Replies
View Related
Jul 11, 2012
I want to ask if I restore a control file from backup of say day2 and I recover till day1 using RMAN script, then what will be the state of my database? I mean day2 control file may be having SCN-Day2, and I am instructing RMAN to recover till past point in time that is SCN-Day1.
View 3 Replies
View Related
Sep 18, 2012
On my stand by DB when I run the following command I get this error:
Is this line really needed based on my run block?
run
{
sql 'ALTER DATABASE BACKUP CONTROLFILE TO TRACE';
allocate channel t1 type 'SBT_TAPE'
[Code]....
View 4 Replies
View Related
May 30, 2012
How can be identify a particular archive-log file have backup or not from rman catalog?
View 2 Replies
View Related
Dec 13, 2011
This is what I run
run {
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/dd_oraback/tkprod/%F';
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 22 DAYS;
sql 'alter system archive log current';
[code]...
So /dd_oraback is a Data Domain mount. Not sure if that makes any difference or not.
View 1 Replies
View Related
May 16, 2012
I am trying to open the database bur gettinf following errors
ERROR at line 1:
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: 'C:ORACLEPRODUCT10.2.0ORADATAORCLSYSTEM01.DBF'
SQL> shutdown
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 289406976 bytes
[code]....
View 1 Replies
View Related
May 11, 2012
I am trying to move my data files from one location to other as i ran out of space.
SQL> alter database rename file 'C:oracleproduct10.2.0oradataSPF433SPF433ADW_DATA.DBF' to 'D:OracleDatafilesSPF433SPF433ADW_DATA.DBF';
Database Altered
SQL> alter database rename file 'C:oracleproduct10.2.0oradataSPF433SPF433ADW_DATATEMP.DBF' to 'D:OracleDatafilesSPF433SPF433ADW_DATATEMP.DBF'
Database Altered
Now when i am trying to run Alter Database open I get ORA-01113: file 5 needs media recovery error
View 11 Replies
View Related
Jan 26, 2012
I have an oracle autoback of controlfile and spfile. I am trying to restore the production database using this backup, into a new server with a different directory structure.
I have completed the following steps in the restore process.
1. Creating a pfile from spfile
2. Changing the the location of cdump, udump, bdump and the control files ( there are three )
3. Then creating a spfile from this pfile
I am stuck on the next step where to rename all the datafiles and tempfile and restore the database. Following is what I did.
After mounting the database in RMAN, tried to run the following.
RMAN> run
2> {
3> allocate channel c1 device type disk
4> ;
5> @/home/oracle/rman_scripts/newloc.rman
6> SET NEWNAME FOR DATAFILE 1 TO '/u02/oradata/dorian/system01.dbf';
7> SET NEWNAME FOR DATAFILE 2 TO '/u02/oradata/dorian/undotbs01.dbf';
8> SET NEWNAME FOR DATAFILE 3 TO '/u02/oradata/dorian/sysaux01.dbf';
9> SET NEWNAME FOR DATAFILE 4 TO '/u02/oradata/dorian/users01.dbf';
[code]....
I am getting the following error message.
Starting restore at 25-JAN-2012 21:26:48
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 01/25/2012 21:26:49
RMAN-06026: some targets not found - aborting restore
RMAN-06100: no channel to restore a backup or copy of datafile 30
RMAN-06100: no channel to restore a backup or copy of datafile 29
RMAN-06100: no channel to restore a backup or copy of datafile 28
[code]....
View 14 Replies
View Related
Apr 3, 2013
I am trying to backup my control on a STBBY DB(RAC) and I am getting the ollowing error.
ORA-00245: control file backup failed; target is likely on a local file system
what the issue is? Note the FS is ACFS and can see on all my nodes
show all;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name PA01INS_IM3L059B are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
[code]...
ACFS file system
df -h /share/dbbkup/oracle/PA01INS/rman
Filesystem Size Used Avail Use% Mounted on
/dev/asm/pa01ins-33 75G 2.6G 73G 4% /share/dbbkup/oracle/PA01INS
rman cmdfile=control.rman
[code]...
View 2 Replies
View Related
Dec 16, 2011
how i can change backup datafile name into its original file name,bcoz at time backup datafile name is different and how i can change that name into its original datafile name so i apply recovery command in user managaed recovery..
View 7 Replies
View Related
Sep 27, 2011
I am trying to open my Mounted database with
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: 'F:APPADMINISTRATORORADATATHIRDBSYSTEM01.DBF'
To get rid of this , I tried following,
SQL> recover database using backup controlfile until cancel;
ORA-00279: change 1004739 generated at 09/26/2011 10:31:34 needed for thre
ORA-00289: suggestion :
F:APPADMINISTRATORFLASH_RECOVERY_AREATHIRDBARCHIVELOG2011_09_27O1_M
[code].....
View 2 Replies
View Related
Feb 10, 2011
I take hot backup of database at 10:00 am.After taking the hot backup 50 archived logs are created.Out of 50 i have backed up first 25 of them and at 5:00pm i lose complete database including control,data and the last 25 archived log files that were not backed up.So I am using latest hot backup to recover
I restore the control file backup and datafile backup taken during ho tbackup(10 am) and i issue the command
.......startup mount
>>>>>>>Recover database until cancel
!!!!!!! Apply the available 25 archive logs
then i give "cancel" since I dont have the next redo log .Now in which mode will the database open(Reset logs or no reset logs)
View 6 Replies
View Related
Dec 9, 2011
I want to restore control file from backup set,just as the flowing command,where location does the control file be restored to? how can i specify the location when restore control file?
restore controlfile from '/u01/rman_backup/mybak/df_768589733_7_1.bak';
View 2 Replies
View Related
May 28, 2012
taking the backup of a control file, as i am taking online backup, archive mode.
At first i have executed the statement
sql> alter database backup control file to trace;
then i have removed the control files and enterd some data in a table and committed it.As my oracle is not shutting down, so i shut aborted it. Now after saving the last file from the udump as obkp.sql i am unable to edit this file and use.
how to edit and use this file, so that i can startup my database normally.
View 4 Replies
View Related
Jan 5, 2012
When i issue this command ,how many times to backup controlfile?
RMAN> BACKUP CURRENT CONTROLFILE INCLUDE CURRENT CONTROLFILE;
Is there difference between 'BACKUP CURRENT CONTROLFILE INCLUDE CURRENT CONTROLFILE' and 'BACKUP CURRENT CONTROLFILE'?
View 2 Replies
View Related
Nov 12, 2012
During a duplicate process to a new database name, rman crashed after the restore but before the switch datafile all.So now, we have under ASM the data files under the correct (new) diskgroup but v$datafile contains the previous names (and so diskgroup) and v$datafile_header is empty. RMAN is completly lost, our solution is to manually rename each file under SQL*Plus using ALTER DATABASE RENAME FILE. Unfortunately, we are using or migrating to OMF, so file names are meaningless and we are unable to associate ASM files with database files.
Any way (query or anything else) to associate the ASM files to the database files. Here's an abstract of what we have for one (small) tablespace:
ASMCMD [+ORAXQG1_L136_DG1/ORAXPG1/DATAFILE] > ls -l N47CAW*
Type Redund Striped Time Sys Name
DATAFILE UNPROT COARSE NOV. 12 10:00:00 Y N47CAW1.276.799152039
DATAFILE UNPROT COARSE NOV. 12 10:00:00 Y N47CAW1.318.799151641
SQL> select file#, name from v$datafile where ts#=17
2 /
[code]...
View 11 Replies
View Related
Apr 9, 2011
Oracle10g to Sybase12.5 Migration:- How a Oracle dump file can be converted to any text file/xls file which will be loaded in sybase database later through BCP.
means
1.Exporting objects as dump file from Oracle.
2.Is there any tool/process available that can convert this into csv/txt/xls file.
3.This files can be loaded in sybase.
View 2 Replies
View Related
Jul 16, 2012
here's my question.
(I'm using PL/SQL Developer with Oracle 10g)
I have an table 'tbcontrol' where for each row I can have one or more sql statements (DML or DDL) in an column.
Example:
task | sql_scripts
1 | create table t1 (c1 number); insert into t1 (c1) values 100;
2 | create table t2 (c2 number); alter table t1 modify c1 not null default 0;
3 | alter table t2 modify c2 not null default 0; alter table t1 add c10 varchar2(10); create table t3 (c3 number not null default 0;
I need to create a procedure where I can pass an task number to execute the sql statements which are in the column 'sql_scripts'. Something like this:
create or replace sp_run_scripts (v_task number)
is
v_scripts varchar2(2000);
begin
select sql_scripts into v_scripts from tbcontrol where task = v_task
execute immediate v_scripts;
end;
But, here I'll have some problems:
- The script will have semicolons (EXECUTE IMMEDIATE doesn't support);
- If I put a begin/end like a PL/SQL script, I can only run DML statements because DDL statements have implicit commit.
- I can't use a cursor for execute each statement at a time because the scripts have multiples-rows. Even if I search for semicolons to 'separate' the scripts in the cursor (using SUBSTR and INSTR functions), I'll have problems with the semicolons between '' (quotations marks).
Now, I admit I'm lost.
Is there another way to make this process work?
View 20 Replies
View Related
Dec 10, 2011
what is the process of creating log file in database, Suppose if we have two user ,and both are logon through id & password,at that condition i want all log file from users who done at the database like any events.
View 1 Replies
View Related
Feb 1, 2012
When we see archive log destination is full , in that case how to backup archive log files using RMAN ?
View 1 Replies
View Related
Jan 30, 2012
Today we have taken a backup of the Live database, due to some issue, it got deleted before applying into the Disaster Recovery Location.
View 12 Replies
View Related
Nov 19, 2012
I have Backup File created in Oracle 11 g . How To restore it in Oracle 10g ?
View 12 Replies
View Related
Dec 2, 2011
I've recently moved jobs and am doing a lot of the normal things getting familiar with my new company's databases.I was checking through our production backup logs and came across something that looks a little funny. From the last two days backups, I see:
select completion_time, marked_corrupt, media_corrupt, logically_corrupt
from v$backup_datafile
where controlfile_type = 'B'
order by completion_time desc
COMPLETION_TIME MARKED_CORRUPT MEDIA_CORRUPT LOGICALLY_CORRUPT
01/12/2011 11:27:252011 1201 2
01/12/2011 11:26:180 0 0
01/12/2011 11:25:242011 1201 1
01/12/2011 11:15:562011 1201 0
01/12/2011 01:40:100 0 0
30/11/2011 11:23:482011 1130 2
30/11/2011 11:22:440 0 0
30/11/2011 11:21:562011 1130 1
30/11/2011 11:13:002011 1130 0
30/11/2011 01:41:010 0 0
The 01:40 record will come from our nightly command:
BACKUP INCREMENTAL LEVEL=0 FILESPERSET=20 FORMAT 'full_%d_%t_%s_%p'
DATABASE INCLUDE CURRENT CONTROLFILE
The 11AM records will come from the command:
BACKUP INCREMENTAL LEVEL=0 FORMAT 'ctl_%t_%s_%p' CURRENT CONTROLFILE;
(I know backups shouldn't still be running at 11am and we don't need level 0 backups every night, that's a seperate issue I'll be addressing! ) I see there's been a similar entry here in v$backup_datafile for all backups that there's records for. The database is up and running just fine. There are no unusual errors being reported by the database in OEM or the alert log.I tried looking at both our control files (yes, should have 3 - something else I've listed to change!) with dbverify which showed no issues - though I'm not sure if this is designed to work with control files.
If so, how could I confirm whether it's an issue with a specific controlfile (I'm assuming it's not an issue with the backup to tape itself, as it's reporting the same corruption every day)?I'd obviously like to diagnose this now while the db is up and running, rather than at 4am some morning during a crash and finding out my backup control files are no good!
View 10 Replies
View Related
Oct 16, 2012
I'm trying to write a bat file for the rman backups that can be used for any of our databases. I'm passing variables into the bat file and that is working fine (i.e. oracle_sid, drive letter, oracle_home), my problem is when the rman actually runs and calls the ctl file, the variables aren't being passed thru to that file.
View 3 Replies
View Related