Dbms_backup_restore.deviceallocate
what i am doing wrong? i know other better options for rman restore/recovery but just want to test these too
SQL> declare
2 devtype varchar2(256);
3 done boolean;
4 begin
5 devtype:=dbms_backup_restore.deviceallocate(type=>'sbt',params=>'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bi
n64/tdpo.opt)', ident=>'t1';
6 dbms_backup_restore.restoresetdatafile;
dbms_backup_restore.restorecontrolfileto('/tmp/test/controlfile_name.ctl');
7 8 dbms_backup_restore.restorebackuppiece('c-1031094670-20100618-01', DONE=>done);
9 dbms_backup_restore.devicedeallocate('t1');
10 end;
11 /
devtype:=dbms_backup_restore.deviceallocate(type=>'sbt',params=>'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/t
dpo.opt)', ident=>'t1';
ERROR at line 5:
ORA-06550: line 5, column 143:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
) , * & = - + < / > at in is mod remainder not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
LIKE4_ LIKEC_ between || multiset member SUBMULTISET_
The symbol ")" was substituted for ";" to continue.
SQL> declare
2 devtype varchar2(256);
3 done boolean;
4 begin
5 devtype:=dbms_backup_restore.deviceallocate(type=>'sbt',params=>'ENV=TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)', ident=>'t1');
6 dbms_backup_restore.restoresetdatafile;
dbms_backup_restore.restorecontrolfileto('/tmp/test/controlfile_name.ctl');
7 8 dbms_backup_restore.restorebackuppiece('c-1031094670-20100618-01', DONE=>done);
9 dbms_backup_restore.devicedeallocate('t1');
end;
10 11 /
declare
ERROR at line 1:
ORA-19624: operation failed, retry possible
ORA-19554: error allocating device, device type: SBT, device name:
ORA-27001: unsupported device type
Additional information: 1
ORA-06512: at "SYS.DBMS_BACKUP_RESTORE", line 170
ORA-06512: at "SYS.DBMS_BACKUP_RESTORE", line 145
ORA-06512: at line 5
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
oracle:tuldcorpadb01:dcxt$sbttest test
The sbt function pointers are loaded from libobk.a(shr.o) library.
-- sbtinit succeeded
Return code -1 from sbtinit, bsercoer = 0, bsercerrno = 0
Message 0 not found; product=RDBMS; facility=SBT
Similar Messages
-
Backup archive dbms_backup_restore
Hi everyone,
I have a question, i am making a stored procedure that do a backup to my database all using dbms_backup_restore, it should that this stored procedure will be executing since app. net for our support.
The code is find and works, but some databases are in RAC so i can't find a method for execute backup all archives of all threads via dbms_backup_restore package, i was able of backup only the archives of 1 thread not of all.
If somebody have some idea please i will be happy
Regards.Hi, this is my script:
--Iniciamos el backup de archives
execute immediate('alter system archive log current');
for i in 1..lista_min_seq.count loop
select dbms_backup_restore.deviceallocate(type=>NULL,ident=>'c1') into v_result from dual;
dbms_backup_restore.backupsetarchivedlog(v_stamp,v_count);
v_sequencia:=lista_min_seq(i);
v_bk:=v_dir_bk||'backup_log_thread_'||to_char(v_sequencia.thread#)||'_'||v_fecha_bk||'.bk';
for c in c_sequencias(v_sequencia.thread#,v_sequencia.seq#) loop
dbms_backup_restore.backuparchivedlog(c.recid,c.stamp);
end loop;
dbms_backup_restore.backuppiececreate(v_bk,v_pieceno,v_resultado,v_handle,v_comment,v_media,v_concur,NULL,NULL);
if v_resultado=false then
raise_application_error(-20000,'El Backup de Archivelogs tuvo problemas para ejecutarse.');
end if;
dbms_backup_restore.devicedeallocate('c1');
dbms_backup_restore.backupcancel;
end loop;
I need that the procedures too backup the threads logs of my others nodes. -
Signature of package "SYS.DBMS_BACKUP_RESTORE" has been changed
Hi all,
The Rman backups for the production database is continously failing since yesterday with Ora-04062 error. Did compiled the Database package (DBMS_BACKUP_RESTORE) manually but the issue is not sorted out.
The database version is 9.2.0.8 on Sun Solaris 5.10 version.
Could any one let me know what is the next step to get the issue sorted out.
Thanks
KumareshanYesterday early morning we got this error message:
RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03007: retryable error occurred during execution of command: allocate
RMAN-07004: unhandled exception during command execution on channel sbt1
RMAN-10035: exception raised in RPC: ORA-19554: error allocating device, device type: SBT_TAPE, device name:
ORA-27211: Failed to load Media Management Library
RMAN-10031: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.DEVICEALLOCATE
Later the Backup team linked the NMO library, since then we are getting this error message (ORA-04062).
The database version is 9.2.0.8 and the Catalog database version is 9.2.0.5
kumareshan -
Oracle 10g ora 12560 and ora 12514 errors
i am a new oracle user. and i have some problems
i installed 10g then,
when i was creating a database,
i received an error messagge "ora-12560",
therefore i cancelled creating database.
i run sqlplus, i received error messagge again
but this messagge differ from first one. it is "ora-12514"
and i tested net manager my oranokta in tnsnames,
same problem is continuesly
and last thing i have a toshiba notebook with intel centrino 1.6
and windows xp with sp2.
i attached below my tnsnames, listener and sqlnet.ora files.
listener.ora
# listener.ora Network Configuration File: D:\oracle\product\10.1.0\db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\product\10.1.0\db_1)
(PROGRAM = extproc)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = muttim)(PORT = 1521))
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
sqlnet.ora
# sqlnet.ora Network Configuration File: D:\oracle\product\10.1.0\db_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES)
tnsnames.ora
# tnsnames.ora Network Configuration File: D:\oracle\product\10.1.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
ORA10 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = muttim)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = Ora10)
ORANOKTA =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = muttim)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = OraNokta)
thank you for helphi oradba
i opened
start=>run=>services.msc
i didn't find "oracleservice<sid>"
and
i found dbca logfiles,
i attached them
cloneDBCreation.log
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0641: "EXECUTE" sunucu bağlantısı gerektirir
ORA-12560: TNS: Protokol bağdaştırıcısı hatası
ORA-12560: TNS: Protokol bağdaştırıcısı hatası
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
ERROR:
ORA-12560: TNS: Protokol bağdaştırıcısı hatası
CloneRmanRestore.log
ORA-12560: TNS: Protokol bağdaştırıcısı hatası
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
ERROR:
ORA-12560: TNS: Protokol bağdaştırıcısı hatası
lockAccount.log
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
postDBCreation.log
ERROR:
ORA-12560: TNS: Protokol bağdaştırıcısı hatası
SP2-0640: Bağlı değil
ORA-12560: TNS: Protokol bağdaştırıcısı hatası
ERROR:
ORA-12560: TNS: Protokol bağdaştırıcısı hatası
ORA-12560: TNS: Protokol bağdaştırıcısı hatası
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0641: "EXECUTE" sunucu bağlantısı gerektirir
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
ERROR:
ORA-12560: TNS: Protokol bağdaştırıcısı hatası
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
postScripts.log
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
ERROR:
ORA-12560: TNS: Protokol bağdaştırıcısı hatası
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
ERROR:
ORA-12560: TNS: Protokol bağdaştırıcısı hatası
SP2-0640: Bağlı değil
ERROR:
ORA-12560: TNS: Protokol bağdaştırıcısı hatası
dropping default lexer preference...
SP2-0640: Bağlı değil
dropping default wordlist preference...
SP2-0640: Bağlı değil
dropping default stoplist preference...
SP2-0640: Bağlı değil
dropping default policy...
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
lang_abbr değerini girin: SP2-0310: "D:\oracle\product\10.1.0\db_1\ctx\admin\defaults\drdefset.sql" dosyası açılamıyor
ERROR:
ORA-12560: TNS: Protokol bağdaştırıcısı hatası
SP2-0640: Bağlı değil
SP2-0641: "EXECUTE" sunucu bağlantısı gerektirir
SP2-0640: Bağlı değil
rmanRestoreDatafiles.sql
set echo off;
set serveroutput on;
select systimestamp from dual;
variable devicename varchar2(255);
declare
omfname varchar2(512) := NULL;
done boolean;
begin
dbms_output.put_line(' ');
dbms_output.put_line(' Allocating device.... ');
dbms_output.put_line(' Specifying datafiles... ');
:devicename := dbms_backup_restore.deviceAllocate;
dbms_output.put_line(' Specifing datafiles... ');
dbms_backup_restore.restoreSetDataFile;
dbms_backup_restore.restoreDataFileTo(4, 'D:\oracle\product\10.1.0\oradata\OraNoktaDB\USERS01.DBF', 0, 'USERS');
dbms_backup_restore.restoreDataFileTo(3, 'D:\oracle\product\10.1.0\oradata\OraNoktaDB\SYSAUX01.DBF', 0, 'SYSAUX');
dbms_backup_restore.restoreDataFileTo(2, 'D:\oracle\product\10.1.0\oradata\OraNoktaDB\UNDOTBS01.DBF', 0, 'UNDOTBS1');
dbms_backup_restore.restoreDataFileTo(1, 'D:\oracle\product\10.1.0\oradata\OraNoktaDB\SYSTEM01.DBF', 0, 'SYSTEM');
dbms_output.put_line(' Restoring ... ');
dbms_backup_restore.restoreBackupPiece('D:\oracle\product\10.1.0\db_1\assistants\dbca\templates\Seed_Database.dfb', done);
if done then
dbms_output.put_line(' Restore done.');
else
dbms_output.put_line(' ORA-XXXX: Restore failed ');
end if;
dbms_backup_restore.deviceDeallocate;
end;
select systimestamp from dual;
ultraSearchCfg.log
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
============== Ultra Search Configuration ==============
============== argument list
WKSYSPW=XXXXXXXX
JDBC_CONNSTR=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=muttim)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=OraNokta)))
LAUNCH_ANYWHERE=false
CONN_STRING=
OH=D:\oracle\product\10.1.0\db_1
JDBCDRIVER_PATH=D:\oracle\product\10.1.0\db_1\jdbc\lib\classes12.zip
JDBCNLS_PATH=D:\oracle\product\10.1.0\db_1\jdbc\lib\nls_charset12.zip
JRE_HOME=D:\oracle\product\10.1.0\db_1\jdk\jre\
JAVA_EXE_PATH=D:\oracle\product\10.1.0\db_1\jdk\bin\java.exe
PSEP=;
CTXHX=D:\oracle\product\10.1.0\db_1\bin\ctxhx.exe
==================
ERROR:
ORA-12560: TNS: Protokol bağdaştırıcısı hatası
SP2-0640: Bağlı değil
============== populating the WK$CRAWLER_CONFIG_DEFAULT table
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
============== load crawler classpath
...... setting the crawler classpath
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
============== updating crawler configuration
SP2-0640: Bağlı değil
SP2-0641: "EXECUTE" sunucu bağlantısı gerektirir
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
...... creating lexer preference
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
SP2-0640: Bağlı değil
...... creating wordlist preference
SP2-0640: Bağlı değil
...... creating storage preference
SP2-0640: Bağlı değil
...... creating stoplist
SP2-0640: Bağlı değil
...... creating section group
SP2-0640: Bağlı değil
...... creating zone sections
SP2-0640: Bağlı değil
...... creating field sections
SP2-0640: Bağlı değil
...... creating filter preference
SP2-0640: Bağlı değil
...... creating datastore preference
SP2-0640: Bağlı değil
... checking for invalid objects... see list below
================== list start
SP2-0640: Bağlı değil
================== list end
============== End of Configuration ==============
note : my operating system's language is turkish. -
Database restore with just one backup set
Hallo experts,
I got a big problem with restoring my XE database. I have a newly created full backup from my XE. While saving the flashback_area I got a hard crash on my system but I saved the last backup set file on a server. Unfortunately I was not able to save other backup sets and I think, there was a special backup of my control files. The restore on another system does not work because of invalid piece.
The data of this database is necessary for my work. Is there anybody out there who can help to restore the data with the existing backup set.
I did not change the entire structure of my original XE database. I only created to schemas with data in. is there any solution to restore the data.
Thanks for any help.
HolgerHi you all,
I think that somebody will be interested in the solution of my problem,so I post it here and in german on my website (www.datacubus.de).
My XEdatabase is successfully restored and I walked through some undocumented and not supported features of ORACLE to win the challenge.
The first fact is, that ORACLE XE has a very static structure if you use it as is. The datafiles are predefined and so a manual restore with a foreign backup piece seems to be possible.
Here is my way:
Create a backup of your controlfile
ALTER DATABASE BACKUP CONTROLFILE TO TRACE;
Shutdown your database
shutdown immediate
Start the database in nomount mode
[holger@MSA04071]$ rman nocatalog target /
RMAN> startup force nomount;
RMAN> quit
Restore the datafiles
I used the following script to restore the datafiles from the backup piece without any check:
declare
devtype varchar2(256);
v_file varchar2(255);
done boolean;
begin
v_file:='/usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/backupset/o1_mf_nnndf_TAG20070420T234848_32lfb0w9_.bkp';
devtype:= dbms_backup_restore.DeviceAllocate(type => '',ident => 'D1');
dbms_backup_restore.RestoreSetDatafile;
dbms_backup_restore.RestoreDatafileTo(dfnumber => 1,toname=>'/usr/lib/oracle/xe/oradata/XE/system.dbf');
dbms_backup_restore.RestoreDatafileTo(dfnumber => 2,toname=>'/usr/lib/oracle/xe/oradata/XE/undo.dbf');
dbms_backup_restore.RestoreDatafileTo(dfnumber => 3,toname=>'/usr/lib/oracle/xe/oradata/XE/sysaux.dbf');
dbms_backup_restore.RestoreDatafileTo(dfnumber => 4,toname=>'/usr/lib/oracle/xe/oradata/XE/users.dbf');
dbms_backup_restore.RestoreBackupPiece(done => done,handle => v_file,params => null);
dbms_backup_restore.DeviceDeallocate;
end;
Start this script as sysdba. But by carefull. This only works if no entire change of datafiles had taken place!
Reset DBID
Because of the saved DBID within the datafile, the database can't be opened. But there is a little trick for resetting the DBID.
shutdown;
startup mount;
execute dbms_backup_restore.zeroDbid(0);
shutdown normal;
Delete or rename existing Controlfile
Edit trace file
You have to modify your controlfile script as follows:
1. Only use the CREATE CONTROLFILE... block
2. Delete RECOVER DATABASE block
3. Replace REUSE with SET
4. Replace NORESETLOGS with RESETLOGS
Create new control file
Use the CREATE CONTROLFILE block for creation of a new control file.
Open Database
alter database open resetlogs;
Much work but all my data is back and now I will backup the whole flashback_area to avoid further nightmares.
Bye
Holger -
Hi everyone, hit errors below when doing rman duplicate database, anyone can assist?
database mounted
released channel: ORA_AUX_DISK_1
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=87 device type=DISK
released channel: ORA_AUX_DISK_1
restarting auxiliary database without server parameter file
Errors restarting database
RMAN-00600: internal error, arguments [6007] [] [] [] []
RMAN-03009: failure of allocate command on ORA_AUX_TAPE_1 channel at 03/14/2013 15:51:21
RMAN-10035: exception raised in RPC:
ORA-19624: operation failed, retry possible
ORA-19554: error allocating device, device type: TAPE, device name:
ORA-27001: unsupported device type
ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 235
RMAN-10031: RPC Error: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.DEVICEALLOCATE
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 03/14/2013 15:51:21
RMAN-05501: aborting duplication of target database
RMAN-03009: failure of allocate command on ORA_AUX_TAPE_1 channel at 03/14/2013 15:51:21
ORA-19554: error allocating device, device type: TAPE, device name:
ORA-27001: unsupported device typeHi.
Tried but kenot...
This command will not work if if I execute in duplicate database?
I am now trying duplicate the database from a server to remote server.
using command below
DUPLICATE DATABASE TO NEW_DB_NAME
PFILE = PFILE_LOCATION
BACKUP LOCATION '/DUMP';
NOFILENAMECHECK; -
ORA-00600 during the OracleXE instalation
After the instalation I tried to go on http://127.0.0.1/apex but I got error.Than I found in file xe_ora_600.trc error that you can see below. I examined some directories and found in E:\oraclexe\oradata\XE\ only 2 files "undo.dbf" and "users.dbf", no "system.dbf" and "contral.dbf". I tried reinstall OracleXE with local English-US but this didn't work. I got the same error.
*** ACTION NAME:(0000007 STARTED120) 2006-06-06 16:36:05.984
*** MODULE NAME:(restore full datafile) 2006-06-06 16:36:05.984
*** SERVICE NAME:() 2006-06-06 16:36:05.984
*** SESSION ID:(38.1) 2006-06-06 16:36:05.984
*** 2006-06-06 16:36:05.984
ksedmp: internal or fatal error
ORA-00600: internal error code, arguments: [krbrckhr_fail], [E:\ORACLEXE\APP\ORACLE\PRODUCT\10.2.0\SERVER\CONFIG\SEEDDB\EXPRESS.DFB], [3], [128], [3], [8323], [], []
Current SQL statement for this session:
declare
omfname varchar2(512) := NULL;
done boolean;
begin
dbms_output.put_line(' ');
dbms_output.put_line(' Allocating device.... ');
dbms_output.put_line(' Specifying datafiles... ');
:devicename := dbms_backup_restore.deviceAllocate;
dbms_output.put_line(' Specifing datafiles... ');
dbms_backup_restore.restoreSetDataFile;
dbms_backup_restore.restoreDataFileTo(1, 'E:\oraclexe\oradata\XE\system.dbf', 0, 'SYSTEM');
dbms_backup_restore.restoreDataFileTo(2, 'E:\oraclexe\oradata\XE\undo.dbf', 0, 'UNDOTBS1');
dbms_backup_restore.restoreDataFileTo(3, 'E:\oraclexe\\oradata\XE\sysaux.dbf', 0, 'SYSAUX');
dbms_backup_restore.restoreDataFileTo(4, 'E:\oraclexe\oradata\XE\users.dbf', 0, 'USERS');
dbms_output.put_line(' Restoring ... ');
dbms_backup_restore.restoreBackupPiece('E:\oraclexe\app\oracle\product\10.2.0\server\config\seeddb\EXPRESS.dfb', done);
if done then
dbms_output.put_line(' Restore done.');
else
dbms_output.put_line(' ORA-XXXX: Restore failed ');
end if;
dbms_backup_restore.deviceDeallocate;
end;Oracle XE has it's own forum - to register and discuss XE problems with XE experts use URL http://www.oracle.com/technology/xe/registration
Once you have registered, you can sign in to the forums and voila - the link to the XE forum is there. But you do have to sign in. -
Backing up control file to trace
Hi blokes,
I been trying to include a copy of my controlfile scripts in my hot backup. i.e
"ALTER DATABASE BACKUP CONTROLFILE TO TRACE AS ' /PATH/CONTROL.TXT" It worked for every database except the oracle8i databases.
I would appreciate if someone could let me know if it is not supported in oracle8i
Regards..
Shebby.backup controlfile to trace; this will create a trace file in your udump folder.
Your other option is you can use the following sql to restore the controlfile from your backup set. I've used this on 8i.
DECLARE
v_dev varchar2(50); -- device type allocated for restore
v_done boolean; -- has the controlfile been fully extracted yet
type t_fileTable is table of varchar2(255)
index by binary_integer;
v_fileTable t_fileTable; -- Stores the backuppiece names
v_maxPieces number:=1; -- Number of backuppieces in backupset
BEGIN
-- Initialise the filetable & number of backup pieces in the backupset
-- This section of code MUST be edited to reflect the customer's available
-- backupset before the procedure is compiled and run. In this example, the
-- backupset consists of 4 pieces:
v_fileTable(1):='/yourbackuploc/prod_l8imjqop_1_1704';
-- Allocate a device. In this example, I have specified 'sbt_tape' as I am
-- reading backuppieces from the media manager. If the backuppiece is on disk,
-- specify type=>null
v_dev:=sys.dbms_backup_restore.deviceAllocate(type=>'', ident=>'d1');
-- Begin the restore conversation
sys.dbms_backup_restore.restoreSetDatafile;
-- Specify where the controlfile is to be recreated
sys.dbms_backup_restore.restoreControlfileTo(cfname=>'/location/yourcontrolfile.ctl');
-- Restore the controlfile
FOR i IN 1..v_maxPieces LOOP
sys.dbms_backup_restore.restoreBackupPiece(done=>v_done,handle=>v_fileTable(i), params=>null);
IF v_done THEN
GOTO all_done;
END IF;
END LOOP;
<<all_done>>
-- Deallocate the device
sys.dbms_backup_restore.deviceDeallocate;
END;
/ -
RMAN backup failes with ORA-19624 occurred during call to DBMS_BACKUP_RESTO
RMAN backup up failes with following errors. It works some times and then failes. When it failes then if i un install and reinstall Oralec agent and Backup cliet then it start working OK for few days and then again start getting error. See the messages below...
Recovery Manager: Release 8.1.7.0.0 - Production
RMAN-06005: connected to target database: MIMSDEVH (DBID=3525230908)
RMAN-06008: connected to recovery catalog database
RMAN> RUN { 2> execute script tapelevel0; 3> }
RMAN-03021: executing script: tapelevel0
RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-03026: error recovery releasing channel resources
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03015: error occurred in stored script tapelevel0
RMAN-03007: retryable error occurred during execution of command: allocate
RMAN-07004: unhandled exception during command execution on channel ch00
RMAN-10035: exception raised in RPC: ORA-19554: error allocating device, device type: SBT_TAPE, device name:
ORA-19557: device error, device type: SBT_TAPE, device name:
ORA-27000: skgfqsbi: failed to initialize storage subsystem (SBT) layer
ORA-19511: SBT error = 4110, errno = 0, BACKUP_DIR environment variable is not set
RMAN-10031: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.DEVICEALLOCATE
Send me some solution...hi,
what is your backup script
can you post back the result of the command
show all;
from the rman command prompt
regards
Alan -
Hello gurus!
I have a number of files in the filesystem and i need to find out the names and creation dates of these files. Please do not suggest Java as that is not an option.
So far i get the names of the files from the SYS side with a procedure that I can call from the user side. The procedure returns an XML string:
create or replace procedure list_directory(directory varchar2, retResultSet OUT VARCHAR2) is
ns VARCHAR2(1024);
v_directory VARCHAR2(1024);
BEGIN
v_directory := directory;
SYS.DBMS_BACKUP_RESTORE.SEARCHFILES(v_directory, ns);
retResultSet := '<list>';
FOR each_file IN (SELECT fname_krbmsft AS name FROM x$krbmsft) LOOP
--DBMS_OUTPUT.PUT_LINE(each_file.name);
retResultSet := retResultSet || '<file>' ||each_file.name|| '</file>';
END LOOP;
retResultSet := retResultSet || '</list>';
end list_directory;Question 1:
Something like each_file.creation_date would be perfect but it seems like the filename is the only attribute available here from x$krbmsft. Am i wrong? Any other way on the SYS side to get the date?
Question 2:
On the users side i could use UTL_FILE to get filesize but not much more valuable information. Can i get the creation date somehow with UTL_FILE or similar?
Any help is appreciated!Anyone got any ideas?Maybe a method as described in Re: Read all file names from Directory. may help (Shows also FileCreationDate).
-
Hi,
My primary and stand by db are 11.2.0.3
from my primary db host , when i executed the below commands , it errors out . Can you please adive the fix
RMAN> connect target sys/sys@chicago;
connected to target database:chicago (DBID=4194693498)
RMAN> connect auxiliary sys/sys@austin;
**PL/SQL package SYS.DBMS_BACKUP_RESTORE version 11.02.00.01 in AUXILIARY database is not current**
**PL/SQL package SYS.DBMS_RCVMAN version 11.02.00.01 in AUXILIARY database is not current**
**connected to auxiliary database: austin (DBID=4194693498)**
Can you please advice how to over come it
Thanks
[email protected]
Edited by: user12096071 on Feb 14, 2012 6:59 PMHi ,
I am trying to build the active dataguard using the below 3 commands. Both my primary and stand by are at 11.2.0.3 . I deleted all the datafile on stand by.
I issued below command from my primary database
RMAN> connect target sys/xxxxx@chicago ( executed successfully )
RMAN> connect auxiliary sys/xxxxx@austin ( got below error )
**PL/SQL package SYS.DBMS_BACKUP_RESTORE version 11.02.00.01 in AUXILIARY database is not current**
**PL/SQL package SYS.DBMS_RCVMAN version 11.02.00.01 in AUXILIARY database is not current**
**connected to auxiliary database: austin (DBID=4194693498)**
RMAN> run{duplicate target database for standby from active database;} ( yet to execute this command).
Do i need to execute above command from stand by host?
thanks
Naveen -
Datafiles UNKNOWN after dbms_backup_restore
Hi..
I am doing ASM to ASM database cloning on Linux.
I have restored the datafiles using the dbms_backup_restore procedure from the backupset, but the datafiles are named as "UNKNOWN" after the restore.
The datafiles are named as in below :
Type Redund Striped Time Sys Name
DATAFILE UNPROT COARSE SEP 21 10:00:00 Y UNKNOWN.298.794572463
DATAFILE UNPROT COARSE SEP 21 10:00:00 Y UNKNOWN.299.794572455
One important thing to inform you, the datafiles are restoring nicely with the datafiles names on the filesystem, but problem only on ASM.
Could you please help me out ?
Thanks
Arjun.hi,
pls take a look at this doc
http://blog.ronnyegner-consulting.de/2010/11/03/how-to-restore-an-rman-backup-without-any-existing-control-files/
Restoring will create the datafile in either you default db-creation dest or in $ORACLE_HOME/dbs. The names unfortunately are lost thus all datafiles are name something like “unnamed<number>” (e.g. “unnamed001″ and so on).
After restoring all datafile you need to re-create the control file.
CREATE CONTROLFILE REUSE DATABASE ORA11P RESETLOGS NOARCHIVELOG
MAXLOGFILES 32
MAXLOGMEMBERS 2
MAXDATAFILES 32
MAXINSTANCES 1
MAXLOGHISTORY 449
LOGFILE
GROUP 1 '/path/oracle/dbs/t_log1.f' SIZE 500K,
GROUP 2 '/path/oracle/dbs/t_log2.f' SIZE 500K
# STANDBY LOGFILE
DATAFILE
'/path/oracle/dbs/t_db1.f',
'/path/oracle/dbs/dbu19i.dbf',
'/path/oracle/dbs/tbs_11.f',
'/path/oracle/dbs/smundo.dbf',
'/path/oracle/dbs/demo.dbf'
CHARACTER SET WE8ISO8859P1
regards,
Edited by: dataseven on 24.Eyl.2012 04:54 -
Dbms_backup_restore package
Hello, people!
Can someone advise me whether it is legal to use this package API for backup creation? The problem is that I have to develop some stored procedures doing backups. These procedures must be called from Java and I do not want to use RMAN. :-( Is it legal to use this package? Or may it be designed for some internal use? Thank you.It is probably legal, BUT it is probably (99% sure, internal use only) NOT supported. You can find some info on http://www.cuddletech.com/articles/oracle/node63.html. Even on this link it says...
Please note that the PL/SQL interface we used above is undocumented and Oracle will not assist you in using it. It also (supposedly) changes between releases. Unfortunetly, this is the only way. The only documentation that even mentions it is avalible only if you have a MetaLink account, in DocID 60545.1.
But there is already more info on the internet (and use of this package) then one would suspect. -
Error ora-15081 (and several others) while creating a new db in Solaris
Hi all,
OS: Solaris 11
DB: 11.2.0.3.5 (2 node rac)
While creating a new db on a Solaris 11 env, via dbca, the following stack error appeared to me:
ORA-19624: operation failed, retry possible
ORA-19870: error while restoring backup piece path[...]
ORA-19504: failed to create file "+MYDG"
ORA-00372: file cannot be modified at this time
ORA-15196: invalid ASM block header [kfc.c:19572] [1] [257] [0 != 821602346]
ORA-15081: failed to submit an I/O operation to a disk
ORA-15066: offlining disk "dsk_0001" in group "MYDG" may result in data loss
ORA-06512: at SYS.X$DBMS_BACKUP_RESTORE, line5827The dbca (ran as oracle user) aborts at 15%.
There are a lot of errors in this stack, and i'm not pretty sure which error is the main cause of this issue, but I think it's the "ORA-15081: failed to submit an I/O operation to a disk" that is the bad guy here. I did some researches and found that some possible sollutions:
1) One said that this error might be caused by bad permissions on the raw devices used in the "MYDG" diskgroup (i'm using 6 devices with external redundancy), but my devices are all with the grid:asmadmin and 660 permissions
2) Another said that this might be a problem with the owner:group of the oracle binaries. In ny installation the oracle binaries ($ORACLE_HOME/bin) are with the oracle:oinstall. I thougth of addind the asmadmin group to the oracle user, but i'm not sure what are the implications of this change. What do you thing?
What am I doing wrong and how can i solve it?
Thanks in advance for your pacience and attention.Here follows the output:
NAME MOUNT_S HEADER_STATU MODE_ST STATE GROUP_NUMBER PATH
DG02HML_0000 CACHED MEMBER ONLINE NORMAL 3 /dev/rdsk/c0t60060E8005487F000000487F000 00500d0s0
DG02HML_0001 CACHED MEMBER ONLINE NORMAL 3 /dev/rdsk/c0t60060E8005487F000000487F000 00502d0s0
DG02HML_0002 CACHED MEMBER ONLINE NORMAL 3 /dev/rdsk/c0t60060E8005487F000000487F000 00504d0s0
DG02HML_0003 CACHED MEMBER ONLINE NORMAL 3 /dev/rdsk/c0t60060E8005487F000000487F000 00506d0s0
DG02HML_0004 CACHED MEMBER ONLINE NORMAL 3 /dev/rdsk/c0t60060E8005487F000000487F000 00508d0s0
DG02HML_0005 CACHED MEMBER ONLINE NORMAL 3 /dev/rdsk/c0t60060E8005487F000000487F000 0050Ad0s0 -
RC-00118: Error occurred during creation of database
adcrdb.sh started at Mon Nov 14 16:16:13 EAT 2011
The environment settings are as follows ...
ORACLE_HOME : /u04/d01/tech_st/11.2.0
ORACLE_SID : JCLONE
TWO_TASK :
PATH : /usr/bin:/u04/d01/tech_st/11.2.0/bin:/usr/bin:/usr/sbin:/u0 4/d01/tech_st/11.2.0/jdk/bin:/usr/ccs/bin:/bin:/usr/bin/X11:/usr/local/bin:/u04/ d01/tech_st/11.2.0/appsutil/clone/bin/../jre/jre/bin:/usr/lib/qt-3.3/bin:/usr/ke rberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbi n:/usr/bin:/usr/X11R6/bin:/root/bin:.
LD_LIBRARY_PATH : /u04/d01/tech_st/11.2.0/lib:/usr/X11R6/lib:/usr/openwin/lib :/u04/d01/tech_st/11.2.0/ctx/lib
Executable : /u04/d01/tech_st/11.2.0/bin/sqlplus
The log information will be written to
/u04/d01/tech_st/11.2.0/appsutil/log/JCLONE_oracle/adcrdb_JCLONE.txt
Creating the control file for JCLONE_oracle database ...
SQL*Plus: Release 11.2.0.2.0 Production on Mon Nov 14 16:16:13 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
ORACLE instance shut down.
Connected to an idle instance.
ORACLE instance started.
Total System Global Area 1071333376 bytes
Fixed Size 1348968 bytes
Variable Size 427821720 bytes
Database Buffers 629145600 bytes
Redo Buffers 13017088 bytes
CREATE CONTROLFILE REUSE SET DATABASE "JCLONE"
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01159: file is not from same database as previous files - wrong database id
ORA-01110: data file 1: '/u04/d01/apps_st/data/system01.dbf'
alter database open resetlogs
ERROR at line 1:
ORA-01507: database not mounted
alter tablespace TEMP add tempfile '/u04/d01/apps_st/data/temp01.dbf' REUSE
ERROR at line 1:
ORA-01109: database not open
ALTER DATABASE RENAME GLOBAL_NAME TO "JCLONE.jtl.co.ke"
ERROR at line 1:
ORA-01109: database not open
ORA-01507: database not mounted
ORACLE instance shut down.
Connected to an idle instance.
ORACLE instance started.
Total System Global Area 1071333376 bytes
Fixed Size 1348968 bytes
Variable Size 427821720 bytes
Database Buffers 629145600 bytes
Redo Buffers 13017088 bytes
Database mounted.
BEGIN dbms_backup_restore.zeroDbid(0); END;
ERROR at line 1:
ORA-01119: error in creating database file
'/u04/d01/tech_st/11.2.0/dbs/MISSING00015'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 4754
ORA-06512: at line 1
ORACLE instance shut down.
Connected to an idle instance.
ORACLE instance started.
Total System Global Area 1071333376 bytes
Fixed Size 1348968 bytes
Variable Size 427821720 bytes
Database Buffers 629145600 bytes
Redo Buffers 13017088 bytes
CREATE CONTROLFILE REUSE SET DATABASE "JCLONE"
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01159: file is not from same database as previous files - wrong database id
ORA-01110: data file 1: '/u04/d01/apps_st/data/system01.dbf'
alter database open resetlogs
ERROR at line 1:
ORA-01507: database not mounted
alter tablespace TEMP add tempfile '/u04/d01/apps_st/data/temp01.dbf' REUSE
ERROR at line 1:
ORA-01109: database not open
ALTER DATABASE RENAME GLOBAL_NAME TO "JCLONE.jtl.co.ke"
ERROR at line 1:
ORA-01109: database not open
Error Running create/replace library with adupdlib.sql
ORA-01109: database not open
PL/SQL procedure successfully completed.
File created.
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Pr oduction
With the Partitioning, OLAP, Data Mining and Real Application Testing options
exit_code=0
Checking for errors ...
The database has not been successfully created. Shutting down the instance ...
SQL*Plus: Release 11.2.0.2.0 Production on Mon Nov 14 16:16:32 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected.
ORACLE instance shut down.
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Pr oduction
With the Partitioning, OLAP, Data Mining and Real Application Testing options
.end std out.
.end err out.
ADX Database Utility
getConnectionUsingAppsJDBCConnector() -->
APPS_JDBC_URL='null'
Trying to get connection using SID based connect descriptor
getConnection() -->
sDbHost : oracle
sDbDomain : jtl.co.ke
sDbPort : 1524
sDbSid : JCLONE
sDbUser : apps
Trying to connect using SID...
getConnectionUsingSID() -->
JDBC URL: jdbc:oracle:thin:@oracle.jtl.co.ke:1524:JCLONE
Exception occurred: java.sql.SQLException: IO Error: The Network Adapter cou ld not establish the connection
Trying to connect using SID as ServiceName
getConnectionUsingServiceName() -->
JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle .jtl.co.ke)(PORT=1524))(CONNECT_DATA=(SERVICE_NAME=JCLONE)))
Exception occurred: java.sql.SQLException: IO Error: The Network Adapter cou ld not establish the connection
Trying to connect using SID as ServiceName.DomainName
getConnectionUsingServiceName() -->
JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle .jtl.co.ke)(PORT=1524))(CONNECT_DATA=(SERVICE_NAME=JCLONE.jtl.co.ke)))
Exception occurred: java.sql.SQLException: IO Error: The Network Adapter cou ld not establish the connection
Connection could not be obtained; returning null
-------------------ADX Database Utility Finished---------------
RC-00118: Error occurred during creation of database
Raised by oracle.apps.ad.clone.ApplyDatabase
StackTrace:
java.lang.Exception: Control file creation failed
at oracle.apps.ad.clone.ApplyDatabase.<init>(ApplyDatabase.java:661)
at oracle.apps.ad.clone.ApplyDatabase.<init>(ApplyDatabase.java:328)
at oracle.apps.ad.clone.ApplyDatabase.<init>(ApplyDatabase.java:304)
at oracle.apps.ad.clone.ApplyDBTier.<init>(ApplyDBTier.java:154)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:501)
at oracle.apps.ad.clone.util.CloneProcessor.run(CloneProcessor.java:68)
at java.lang.Thread.run(Thread.java:595)
Current database Version is 11.2.0.2
Apps Version is 11.5.10.2
RUP version is 6
Forms Patchset version is 19
Please advise how to resolve this error ?
Regards
Mohammed.Please refer to these docs/links.
Troubleshooting RapidClone issues with Oracle Applications 11i [ID 364565.1]
Adcfgclone.pl DBTier is failing with error for dbms_backup_restore.zeroDbid(0) [ID 361157.1]
https://forums.oracle.com/forums/search.jspa?threadID=&q=ORA-01503+AND+ORA-01159+AND+ORA-01110&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
Thanks,
Hussein
Maybe you are looking for
-
I cannot edit my contacts after upgrading to IOS5 .
I cannot edit my contacts after upgrading to IOS5 . I can restore to factory settings but I want to keep my messages as they were.. what can I do? please someone help.. thanks in advance.
-
How big of a hard drive can I use?
Hi Folks, I would like to upgrade as the 160Gig drive I have is plum full. How big can I go in a T41,, 500, 650, 1T? Am I at the limit now? Thanks!
-
File Print on the list item doesn't print the whole content in IE8
Hi, I have this issue happened on my customer side. Their IE version is 8.0.7600.16385. By using this version of IE to do a file > print of a list item with long html content, the html content will get chop off. Refer to the screenshots. Print Previe
-
10.8.3 on mini memory issues
Since updating my 4GB late 2009 mini its functionality reduced to almost zero. PhotoShop and Dreamweaver both crash. Once crashed the machine must be restarted but will not restart and have to disconnect power to recycle. Apps then work only if they
-
Importing InDesign IDML results in blank chapter
I'm trying to import content into iBooks Author from InDesign. Apple's documentation says to export the InDesign document as an IDML file, then in iBooks Author go to Insert > Insert Chapter From... > InDesign File(IDML). However, when I try this, th