ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling
complimentary technical Workshops on Database Security for the first 30
Oracle Database customers located anywhere in North America, EMEA, LATAM, or
APAC that send an email to
asra_us@oracle.com. Request a Workshop for
your organization today.
Purpose
This package provides in-database support for the Oracle
ZDLRA and ZFS Backup Appliances. It is not installed by default.
The phrase "Container Group" as used in this package refers to Backup Appliance Container Groups not to the Oracle 12c Container Database.
AUTHID
CURRENT_USER
Data Types
TYPE names$_t ...
Dependencies
ALL_USERS
DBMS_STANDARD
KBRSLIB
DBMS_ASSERT
DBMS_UTILITY
Dependencies
Only STANDARD
Documented
No
Exceptions
Error Code
Reason
ORA-00439
Feature not enabled: recovery appliance is not enabled
ORA-19569
No device is allocated to this session
ORA-45155
The Recovery Appliance has not been installed
ORA-45279
Container group <container_group_name> not exist
First Available
12.1
Installation
SQL> @?/rdbms/admin/dbmsrsicd.plb
SP2-0808: Package created with compilation warnings
Library created.
SQL> sho err
No errors.
SQL> @?/rdbms/admin/prvtrsicd.plb
SP2-0810: Package Body created with compilation warnings
SQL> sho err
Errors for PACKAGE BODY KBRSI_ICD:
LINE/COL ERROR
-------- -----------------------------------------------------------------
212/3 PLW-06006: uncalled procedure "PRINT" is removed.
365/27 PLW-06010: keyword "TYPE" used as a defined name
383/20 PLW-06010: keyword "TYPE" used as a defined name
526/24 PLW-07203: parameter 'USERNAME' may benefit from use of the NOCOPY compiler hint
527/24 PLW-07203: parameter 'PASSWORD' may benefit from use of the NOCOPYcompiler hint
528/24 PLW-07203: parameter 'URL' may benefit from use of the NOCOPY compiler hint
560/28 PLW-07203: parameter 'HOSTLST' may benefit from use of the NOCOPY compiler hint
638/27 PLW-07203: parameter 'FINCARN' may benefit from use of the NOCOPY compiler hint
664/23 PLW-07203: parameter 'OFNAME' may benefit from use of the NOCOPY compiler hint
690/25 PLW-07203: parameter 'OFNAME' may benefit from use of the NOCOPY compiler hint
761/32 PLW-06010: keyword "CONVERT" used as a defined name
770/28 PLW-06010: keyword "CONVERT" used as a defined name
903/28 PLW-06010: keyword "KEY" used as a defined name
916/24 PLW-06010: keyword "KEY" used as a defined name
932/27 PLW-06010: keyword "KEY" used as a defined name
1141/28 PLW-06010: keyword "VALUE" used as a defined name
1160/32 PLW-07203: parameter 'FNAME' may benefit from use of the NOCOPY compiler hint
1527/33 PLW-06010: keyword "FORCE" used as a defined name
1540/35 PLW-06010: keyword "FORCE" used as a defined name
1617/43 PLW-07203: parameter 'GNAME' may benefit from use of the NOCOPY compiler hint
1631/37 PLW-07203: parameter 'GNAME' may benefit from use of the NOCOPY compiler hint
1827/35 PLW-06010: keyword "NAME" used as a defined name
1828/35 PLW-06010: keyword "VALUE" used as a defined name
2027/21 PLW-06010: keyword "VALUE" used as a defined name
Returns an exception if a Backup (Recovery) Appliance is not enabled
kbrsi_icd.ba_enabled;
exec kbrsi_icd.ba_enabled
BEGIN kbrsi_icd.ba_enabled; END;
*
ERROR at line 1:
ORA-00439: feature not enabled: recovery appliance is not enabled
ORA-06512: at "SYS.KBRSI_ICD", line 1966
ORA-06512: at line 1
SELECT kbrsi_icd.container_bdapi_reload_config
FROM dual;
SELECT kbrsi_icd.container_bdapi_reload_config
*
ERROR at line 1:
ORA-45275: container: 'ZDLRA metadata is not installed/initialized'
ORA-06512: at "SYS.KBRSI_ICD", line 1814
kbrsi_icd.container_bdapi_settrace(
trclvldsk IN BINARY_INTEGER,
trclvlmem IN BINARY_INTEGER,
scope IN BINARY_INTEGER)
RETURN BINARY_INTEGER;
SELECT kbrsi_icd.container_bdapi_settrace(1, 1, 1)
FROM dual;
SELECT kbrsi_icd.container_bdapi_settrace(1, 1, 1)
*
ERROR at line 1:
ORA-45275: container: 'ZDLRA metadata is not installed/initialized'
ORA-06512: at "SYS.KBRSI_ICD", line 1795
ORA-06512: at line 1
kbrsi_icd.container_bdapi_test(
testcode IN BINARY_INTEGER,
tstvalin IN BINARY_INTEGER,
ti_ub4_1 IN BINARY_INTEGER,
ti_ub4_2 IN BINARY_INTEGER,
ti_ub4_3 IN BINARY_INTEGER,
ti_ub4_4 IN BINARY_INTEGER,
tstvalout OUT BINARY_INTEGER,
apiver OUT BINARY_INTEGER,
to_ub4_1 OUT BINARY_INTEGER,
to_ub4_2 OUT BINARY_INTEGER,
to_ub4_3 OUT BINARY_INTEGER,
to_ub4_4 OUT BINARY_INTEGER)
RETURN BINARY_INTEGER;
This init procedure performed the reported disconnect.
kbrsi_icd.container_system_init;
exec kbrsi_icd.container_system_init;
ERROR:
ORA-03114: not connected to ORACLE
BEGIN kbrsi_icd.container_system_init; END;
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Process ID: 42937
Session ID: 214 Serial number: 50951
kbrsi_icd.create_container_group(gname IN VARCHAR2);
ALTER SESSION SET tracefile_identifier = 'test_plan1';
Session altered.
ALTER SESSION SET EVENTS '1004trace name context forever, level 12';
Session altered.
exec kbrsi_icd.create_container_group('UWCONTGRP');
BEGIN kbrsi_icd.create_container_group('UWCONTGRP'); END;
*
ERROR at line 1:
ORA-45285: Cannot create more than 0 container groups.
ORA-06512: at "SYS.KBRSI_ICD", line 1492
ORA-06512: at "SYS.KBRSI_ICD", line 1503
ORA-06512: at line 1
ALTER SESSION SET EVENTS '1004trace name context OFF';
-- here is the relevant trace output giving an indicatiuon of what may be coming in a future release.
-- reformated to make the output eaier to read.
SELECT obj#, type#, ctime, mtime, stime, status, dataobj#, flags, oid$, spare1, spare2, spare3, signature, spare7, spare8, spare9, NVL(dflcollid,16382), creappid, creverid, modappid, modverid, crepatchid, modpatchid
FROM obj$
WHERE owner#=:1
AND name=:2
AND namespace=:3
AND remoteowner IS NULL
AND linkname IS NULL
AND subname IS NULL;
SELECT NVL(MAX(amrv_key),0)
FROM amrv$;
WHERE gname = :bv_gname
AND doneid=0;
-- amrv$ is defined in $ORACLE_HOME/rdbms/admin/catcont.sql and referenced in recover.bsq
SELECT NVL(max(1),0)
FROM amgrp$
WHERE gname = :bv_gname;
--this table is also defined in catcont.sql
SELECT MIN(nextkey)
FROM (
SELECT gid, gid+1 nextkey, LEAD(gid,1,0) OVER (ORDER BY gid) nextval
FROM (
SELECT gid
FROM amgrp$
UNION
SELECT 0
FROM dual)
)
WHERE nextkey <> nextval;
exec kbrsi_icd.deleteBpsbt('TEST');
BEGIN kbrsi_icd.deleteBpsbt('TEST'); END;
*
ERROR at line 1:
ORA-19569: no device is allocated to this session
ORA-06512: at "SYS.KBRSI_ICD", line 1209
ORA-06512: at line 1
kbrsi_icd.dg_find_ct_key(
P_DBID IN NUMBER,
P_TKEY IN NUMBER,
P_RESET_SCN IN NUMBER,
P_RESET_TIME IN NUMBER,
P_THREAD IN NUMBER,
P_SEQUENCE IN NUMBER)
RETURN NUMBER;
kbrsi_icd.dg_new_log(
P_DBID IN NUMBER,
P_TKEY IN NUMBER,
P_RESET_SCN IN NUMBER,
P_RESET_TIME IN NUMBER,
P_THREAD IN NUMBER,
P_SEQUENCE IN NUMBER,
P_SIZE IN NUMBER,
P_LIVE_REDO IN BOOLEAN,
P_CTKEY OUT NUMBER,
P_SLKEY OUT NUMBER)
RETURN BINARY_INTEGER;
kbrsi_icd.drop_container_group(
gname IN VARCHAR2,
force IN NUMBER,
keep_container IN NUMBER);
-- intentionally chose a container group name that could not possibly exist
exec kbrsi_icd.drop_container_group('ZZYZX', 0, 1);
BEGIN kbrsi_icd.drop_container_group('ZZYZX', 0, 1); END;
*
ERROR at line 1:
ORA-45275: container: 'ZDLRA metadata is not installed/initialized'
ORA-06512: at "SYS.KBRSI_ICD", line 1525
ORA-06512: at "SYS.KBRSI_ICD", line 1543
ORA-06512: at line 1
Appears to raise an exception if an Oracle Recovery Appliance is not configured and available
kbrsi_icd.isOrsaLive RETURN BOOLEAN;
BEGIN
IF kbrsi_icd.isOrsaLive THEN
dbms_output.put_line('T');
ELSE
dbms_output.put_line('F');
END IF;
END;
/
BEGIN
*
ERROR at line 1:
ORA-45155: The Recovery Appliance has not been installed.
ORA-06512: at "SYS.KBRSI_ICD", line 247
ORA-06512: at "SYS.KBRSI_ICD", line 1453
ORA-06512: at line 2
kbrsi_icd.rsAddToSBTCatalog(
bpkey IN NUMBER,
dbver IN NUMBER,
dbname IN VARCHAR2,
dbid IN NUMBER,
handle IN VARCHAR2,
setstamp IN NUMBER,
setcount IN NUMBER,
pieceno IN NUMBER,
pieceblksize IN NUMBER,
tag IN VARCHAR2,
bstyp IN NUMBER);
kbrsi_icd.rsCopyFile(
ifname IN VARCHAR2,
ofname IN OUT VARCHAR2,
fize OUT NUMBER,
sldir IN VARCHAR2,
action IN BINARY_INTEGER,
alg_over_alloc IN BINARY_INTEGER);
exec kbrsi_icd.rsfpeek('TestFileName');
BEGIN kbrsi_icd.rsfpeek('TestFileName'); END;
*
ERROR at line 1:
ORA-19625: error identifying file TestFileName
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 7
ORA-06512: at "SYS.KBRSI_ICD", line 1977
ORA-06512: at line 1
Returns the RS debug flags if a Recovery Appliance is installed
kbrsi_icd.rsGetDebugFlags RETURN NUMBER;
SELECT kbrsi_icd.rsGetDebugFlags
FROM dual;
SELECT kbrsi_icd.rsGetDebugFlags
*
ERROR at line 1:
ORA-45155: The Recovery Appliance has not been installed.
ORA-06512: at "SYS.KBRSI_ICD", line 247
ORA-06512: at "SYS.KBRSI_ICD", line 1500
kbrsi_icd.rsGroupArchSBT(
PIECENAME IN VARCHAR2,
DB_KEY IN NUMBER,
LIB_KEY IN NUMBER,
TASK_ID IN NUMBER,
COMP_ALGO IN VARCHAR2,
ENC_ALGO IN NUMBER,
KEYID IN VARCHAR2,
KEYID_LEN IN NUMBER,
BP_COUNT IN NUMBER,
TEMPL_KEY IN NUMBER,
BKP_BYTES OUT NUMBER);
kbrsi_icd.rsInspectBackupPiece(
handle IN VARCHAR2,
vbkey IN NUMBER,
bpsize IN NUMBER,
chktype IN NUMBER,
fno IN NUMBER,
lib_key IN NUMBER,
ct_key IN NUMBER,
bpkey OUT NUMBER,
TEMPLATE_KEY IN NUMBER);
kbrsi_icd.rsSchedLock(waitforwork IN BINARY_INTEGER);
SQL> exec kbrsi_icd.rsSchedLock(1);
BEGIN kbrsi_icd.rsSchedLock(1); END;
*
ERROR at line 1:
ORA-00904: "SYS"."RAI_SCHEMA": invalid identifier
ORA-06512: at "SYS.KBRSI_ICD", line 163
ORA-06512: at "SYS.KBRSI_ICD", line 773
ORA-06512: at line 1
exec kbrsi_icd.rsSetDebugFlags(1);
BEGIN kbrsi_icd.rsSetDebugFlags(1); END;
*
ERROR at line 1:
ORA-45155: The Recovery Appliance has not been installed.
ORA-06512: at "SYS.KBRSI_ICD", line 247
ORA-06512: at "SYS.KBRSI_ICD", line 1482
ORA-06512: at line 1
kbrsi_icd.rsSetTrace(
newsession IN NUMBER,
errsession IN NUMBER);
exec kbrsi_icd.rsSetTrace(100, 101);
BEGIN kbrsi_icd.rsSetTrace(100, 101); END;
*
ERROR at line 1:
ORA-45155: The Recovery Appliance has not been installed.
ORA-06512: at "SYS.KBRSI_ICD", line 247
ORA-06512: at "SYS.KBRSI_ICD", line 1046
ORA-06512: at line 1
BEGIN
IF kbrsi_icd.rsTimerLock THEN
dbms_output.put_line('T');
ELSE
dbms_output.put_line('F');
END IF;
END;
/
BEGIN
*
ERROR at line 1: ORA-00600: internal error code, arguments: [kbrsosqlerr-program-error], [], [], [], [], [], [], [], [], [], [], []
ORA-45199: Error ORA-06550: line 1, column 332:
PL/SQL: ORA-00942: table or view does not exist
ORA-06550: line 1, column 7:
PL/SQL: SQL Statement ignored
encountered when executing BEGIN SELECT /*+ RESULT_CACHE */ MAX(DECODE(name, '_sgacommsize', value)), MAX(DECODE(name, '_pgacommsize', value)), MAX(DECODE(name,
'network_chunksize', value)), MAX(DECODE(name, '_largepoolpct', value)), MAX(DECODE(name, '_sharedpoolpct', value)) INTO :sgacommsize, :pgacommsize, :chunksize, :largepoolpct,
:sharedpoolpct FROM config WHERE name IN ( '_sgacommsize', '_pgacommsize', 'network_chunksize', '_largepoolpct', '_sharedpoolpct');END;.
ORA-06512: at "SYS.KBRSI_ICD", line 712
ORA-06512: at "SYS.KBRSI_ICD", line 733
ORA-06512: at line 2
kbrsi_icd.wallet2URL(
wallet_loc IN VARCHAR2,
cred_alias IN VARCHAR2,
username OUT VARCHAR2,
password OUT VARCHAR2,
url OUT VARCHAR2,
client IN VARCHAR2);
Tests write I/O performance to a Oracle Backup Appliance
kbrsi_icd.writeIO_test(
filename IN VARCHAR2,
filesize IN VARCHAR2,
chunksize IN VARCHAR2,
nowrite IN BOOLEAN,
containerwrite IN BOOLEAN,
cputime OUT NUMBER)
RETURN NUMBER;
DECLARE
cTime NUMBER;
retVal NUMBER;
BEGIN
retVal := kbrsi_icd.writeIO_test('A', '100M', '4K', TRUE, TRUE, cTime);
dbms_output.put_line(cTime);
END;
/
DECLARE
*
ERROR at line 1:
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 36: File name too long
Additional information: 9
ORA-06512: at "SYS.KBRSI_ICD", line 1877
ORA-06512: at "SYS.KBRSI_ICD", line 1914
ORA-06512: at line 5