Varchar2 size as return code or output parameter ?
Hi everybody,
As far as i know , the limit size of a varchar2 is (4000) but it seems to be limited in my stored procedure to under then 255 caracteres. Does anyone have an ideas of what happen ?
When i execute the proc below, i get the first 200 caracteres when i change the value in the select SUBSTR(extract(msg_text,'/').getStringVal(),1,200) into chaine to select SUBSTR(extract(msg_text,'/').getStringVal(),1,255) into chaine , in my proc, i get an error message :
The following error has occurred:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 5
the msg_text colonne is a XMLTYPE column.
CREATE OR REPLACE function read_message(p_id_message IN NUMBER) RETURN VARCHAR2 AS
BEGIN
declare
chaine varchar2(4000);
begin
chaine := '';
dbms_output.enable(1000000);
select SUBSTR(extract(msg_text,'/').getStringVal(),1,200) into chaine
from message
where id_message= p_id_message ;
return chaine;
end;
END;
/
I think it doesn't have anything to do with the size.
From the docs
datatype Specify the datatype of the argument. An argument can have any
datatype supported by PL/SQL.
Datatypes cannot specify length, precision, or scale. For example, VARCHAR2(10) is
not valid, but VARCHAR2 is valid. Oracle derives the length, precision, and scale of
an argument from the environment from which the procedure is called.Cheers
Sarma.
Similar Messages
-
Function Modue with Dynamic Table as output parameter
Hi experts,
i have function (below) which reads "dynamically" data from table which is specify as input parameter, the data are "saved" in <ft>.
How can i return <ft> as output parameter of function module (table) ?
function
import parameter - > IC_TABLE
source code
data : lt_OPTIONS type standard table of RFC_DB_OPT,
lt_fields type standard table of rfc_db_fld,
lt_data type standard table of tab512,
la_rfcdata type tab512,
la_rfcfields type rfc_db_fld,
lr_dref type ref to data.
field-symbols: <ft> type table.
field-symbols: <structure> type any.
field-symbols: <field_to> type any.
field-symbols: <field_from> type any.
CALL FUNCTION 'RFC_READ_TABLE'
EXPORTING
query_table = IC_TABLE
DELIMITER = ' '
NO_DATA = ' '
ROWSKIPS = 0
ROWCOUNT = 0
tables
OPTIONS = lt_OPTIONS
fields = lt_fields
data = lt_data
EXCEPTIONS
TABLE_NOT_AVAILABLE = 1
TABLE_WITHOUT_DATA = 2
OPTION_NOT_VALID = 3
FIELD_NOT_VALID = 4
NOT_AUTHORIZED = 5
DATA_BUFFER_EXCEEDED = 6
OTHERS = 7.
create data lr_dref type table of (ic_table).
assign lr_dref->* to <ft>.
Fill data from OLTP table into ct_table.
assign local copy of initial line of <ft> to <structure>.
loop at lt_data into la_rfcdata.
loop at lt_fields into la_rfcfields.
assign component sy-tabix of structure <structure> to <field_to>.
if sy-subrc is initial.
assign la_rfcdata+la_rfcfields-offset(la_rfcfields-length)
to <field_from>.
<field_to> = <field_from>.
endif.
endloop.
append <structure> to <ft>.
endloop.
Thanks in advance
MartinHi Martin,
parameters with generic types are not allowed. So TYPE ANY TABLE etc. will not work. As Alex alreads said, you could return a reference to your table.
Your parameter should be typed like:
re_table type ref to data.
At the end of your function module get a reference of your table into your parameter:
get reference of <ft> into re_table
After the call of your function module you can now handle and work with your table as wished:
* Declaration
data: re_table type ref to data.
field-symbols: <my_table> type standard table.
* Assign reference to fieldsymbol
assign re_table->* to <my_table>
if sy-subrc NE 0.
" Error: Could not assign reference
endif.
Best regards,
Fabian -
Help with Input/Output Parameter Size using OLE DB Provider
I am using the OLE DB Provider for 9i in an Active Server Page to call a stored procedure in a 9i database. I pass have an input/output parameter (adVarChar with adSize=30) in which I pass a two digit number in, and expect to get a character value greater than 2 characters in return. However, when I execute the stored procedure call, it appears the value being returned in the parameter is being truncated to the size of the value I passed in (2 characters). Is there a way I can insure the parameter will return the entire length of the result regardless of the length of the input value?
cmd.Parameters.Add("retstatus", OracleDbType.Varchar2, 200, ParameterDirection.InputOutput); It seems to me that you're trying to use an OracleParameter constructor with parameter name, parameter type, parameter SIZE, and parameter direction. But OracleParameter class does not have any such constructor. Therefore, your test tries to use another constructor incorrectly.
OracleParameter has two constructors with four parameter ...
public OracleParameter(string parameterName, OracleDbType type, object obj, ParameterDirection direction)
public OracleParameter(string parameterName, OracleDbType type, int size, string srcColumn)
... and none of these matches your constructor. One way to solve this problem is to use appropriate constructor or OracleParameter properties. -
DISCVR PARAMETER -- LOV ON DESC BUT RETURN CODE VALUE
HOW DOES ONE IN DISCVR PARAMETER DIALOGUE CREATE A PARAMETER (SIMILAR TO ORACLE REPORT BUILDER, PICK CODE AND DESC -- HIDE FIRST COLUMN) WHERE THE
USER SEES THE CODE DESCRIPTION IN THE LOV BUT THE CORRESPONDING CODE VALUE IS WHAT IS RETURNED TO THE PARAMETER BIND VARIABLE ??And now Version 2.
I didn't put this into the 1st post as the formatting goes bonkers.
#>> Start of VERSION 2
call function 'MY_FUNCTION_MODULE'
destination RFCDEST
starting new task 'taskname'
performing receive_result on end of task
tables
orders_list = t_orders_packet
apo_orders_list = t_apo_orders
apo_resources = t_apo_resources
exceptions
COMMUNICATION_FAILURE = 1 MESSAGE MSG_TEXT
SYSTEM_FAILURE = 2 MESSAGE MSG_TEXT
NO_ORDERS_SUPPLIED = 3
NO_PEGGED_ORDERS_FOUND = 4
ORDERID_CONVERSION_ERROR = 5
OTHERS = 6.
WAIT UNTIL results_received = 'X' UP TO 60 SECONDS.
if sy-subrc is initial. << Now this is always ZERO
* do some stuff as RC was 0
else.
* log non-zero return code etc
endif.
FORM receive_result USING iv_taskname.
RECEIVE RESULTS FROM FUNCTION 'MY_FUNCTION_MODULE'
tables
orders_list = t_orders_packet
apo_orders_list = t_apo_orders
apo_resources = t_apo_resources
exceptions
COMMUNICATION_FAILURE = 1 MESSAGE MSG_TEXT
SYSTEM_FAILURE = 2 MESSAGE MSG_TEXT
NO_ORDERS_SUPPLIED = 3
NO_PEGGED_ORDERS_FOUND = 4
ORDERID_CONVERSION_ERROR = 5
OTHERS = 6.
results_received = 'X'.
endform. "receive_result
* < End of Version 2 -
How to call a Stored Procedure with a REF CURSOR output parameter
I am looking forward an example that call a stored function/procedure with a REF CURSOR output parameter and get the result.
In other words, I have a stored function/procedure that execute a SELECT statement using the OCI library and then it could get the values of each column and each row.
I put a code snippet, it have only the main thing to call a simple stored procedure and print the name of each column of the cursor, but I couldn´t to print out the values in the table that call the stored procedure.
I understand that the next step, it is to call a OCIStmtFetch.
How to associate the cursor with the OCIStmtFetch?
If you need more information, only tell me.
I am using ANSI C with HP-UX Operative System (C for HP-UX) and Oracle 10g.
Regards.
Antonio Garcia
/* callOracleSP */
#include <stdio.h>
#include <string.h>
#include <oci.h>
#include <stdlib.h>
char* pConnectChar ="server";
char* pUsernameChar = "user";
char* pPasswordChar = "passwd";
char* sqlCharArray1 = "BEGIN SP_GETCITIES(:s, :c); END;";
int retval;
ub4 parmcnt=0;
ub4 pos2=0;
text *pcoln[20];
ub4 namelen[20];
char state_key[5];
OCIStmt* pOciStatement;
OCIStmt* pOciStatCursor;
OCIError* pOciError;
OCIEnv* pOciEnviron;
OCIServer* pOciServer;
OCISession* pOciSession;
OCISvcCtx* pOciServiceContext;
OCIBind* pOciBind[500];
OCIParam* pOciParam;
int main()
retval = OCIEnvCreate(&pOciEnviron, OCI_DEFAULT, NULL, NULL, NULL, NULL,0,NULL);
retval = OCIEnvInit(&pOciEnviron, OCI_DEFAULT, 0, NULL);
retval = OCIHandleAlloc(pOciEnviron, (void **)&pOciError, OCI_HTYPE_ERROR, 0, NULL);
retval = OCIHandleAlloc(pOciEnviron, (void **)&pOciServiceContext, OCI_HTYPE_SVCCTX, 0, NULL);
retval = OCIHandleAlloc(pOciEnviron, (void **)&pOciStatement, OCI_HTYPE_STMT, 0, NULL);
retval = OCILogon(pOciEnviron,pOciError,&pOciServiceContext,(unsigned char *)pUsernameChar,
strlen(pUsernameChar), (unsigned char *)pPasswordChar, strlen(pPasswordChar),
(unsigned char *)pConnectChar,strlen(pConnectChar));
printf("OCILogon retval=%d\n",retval);
retval = OCIStmtPrepare(pOciStatement, pOciError, (unsigned char *)sqlCharArray1,strlen(sqlCharArray1),
OCI_NTV_SYNTAX, OCI_DEFAULT);
printf("StmtPrepare retval=%d\n",retval);
retval = OCIHandleAlloc(pOciEnviron, (void **)&pOciStatCursor, OCI_HTYPE_STMT, 0, NULL);
retval = OCIBindByPos(pOciStatement,&pOciBind[0], pOciError, (ub4) 1, (void *)&state_key,
(sb4) sizeof(state_key), SQLT_STR, (void *) 0, (ub2 *) 0, (ub2 *)0,(ub4)0, (ub4 *)0, (ub4) OCI_DEFAULT);
printf("BindByPos OCI_HTYPE_STMT retval=%d\n",retval);
retval = OCIBindByPos(pOciStatement,&pOciBind[1], pOciError, (ub4) 2, (void *)&pOciStatCursor,
(sb4) 0, SQLT_RSET, (void *) 0, (ub2 *) 0, (ub2 *)0,(ub4)0, (ub4 *)0, (ub4) OCI_DEFAULT);
printf("BindByPos OCI_HTYPE_STMT retval=%d\n",retval);
strcpy(state_key,"CA");
retval = OCIStmtExecute(pOciServiceContext, pOciStatement, pOciError, (ub4)1, (ub4) 0,
(OCISnapshot *)NULL, (OCISnapshot *)NULL, (ub4) OCI_DEFAULT);
printf("StmtExecute retval=%d\n",retval);
/* How to get the values of the cursor? */
/* Get number of parameters of the Cursor */
OCIAttrGet((void *) pOciStatCursor, (ub4)OCI_HTYPE_STMT, (void*) &parmcnt,(ub4 *) 0,
(ub4)OCI_ATTR_PARAM_COUNT, pOciError);
printf("\nNumber of parameters of the cursor = %d\n",parmcnt);
for (int pos = 1; pos <= (int)parmcnt; pos++)
OCIAttrGet((void *) pOciStatCursor, (ub4)OCI_HTYPE_STMT, (void*) &pos2,(ub4 *) 0,
(ub4)OCI_ATTR_CURRENT_POSITION, pOciError);
retval = OCIParamGet((void *)pOciStatCursor, (ub4)OCI_HTYPE_STMT, pOciError, (void **)&pOciParam,
(ub4) pos );
OCIAttrGet((void*) pOciParam, (ub4) OCI_DTYPE_PARAM,(void*) &pcoln[pos-1],(ub4 *) &namelen[pos-1],
(ub4) OCI_ATTR_NAME,(OCIError *)pOciError );
for (int i = 1; i <=(int)parmcnt; i++)
printf("Column %i\tNAME = %.*s\n",i,namelen[i-1],pcoln[i-1]);
return 0;
This is the script that create the table, insert records and create the stored procedure
CREATE TABLE CITIES (
STATE_CODE VARCHAR2(2) NULL,
CITY_CODE NUMBER(15,5) NULL,
CITY_NAME VARCHAR2(30) NULL
INSERT INTO CITIES(STATE_CODE, CITY_CODE, CITY_NAME)
VALUES('CA', 30, 'SAN DIEGO')
INSERT INTO CITIES(STATE_CODE, CITY_CODE, CITY_NAME)
VALUES('CA', 40, 'SACRAMENTO')
INSERT INTO CITIES(STATE_CODE, CITY_CODE, CITY_NAME)
VALUES('FL', 10, 'MIAMI')
INSERT INTO CITIES(STATE_CODE, CITY_CODE, CITY_NAME)
VALUES('FL', 20, 'ORLANDO')
INSERT INTO CITIES(STATE_CODE, CITY_CODE, CITY_NAME)
VALUES('NY', 10, 'NEW YORK')
INSERT INTO CITIES(STATE_CODE, CITY_CODE, CITY_NAME)
VALUES('NY', 20, 'ALBANY')
INSERT INTO CITIES(STATE_CODE, CITY_CODE, CITY_NAME)
VALUES('CA', 10, 'LOS ANGELES')
INSERT INTO CITIES(STATE_CODE, CITY_CODE, CITY_NAME)
VALUES('CA', 20, 'SAN FRANCISCO')
CREATE OR REPLACE PACKAGE globalPkg AUTHID CURRENT_USER AS
/* The following are T/SQL specific global variables. */
TYPE RCT1 IS REF CURSOR;/*new weak cursor definition*/
END globalPkg;
CREATE OR REPLACE PROCEDURE SP_ADDCITY(
P_STATE_CODE IN VARCHAR,
P_CITY_CODE IN NUMBER,
P_CITY_NAME IN VARCHAR2,
P_RETURN IN OUT NUMBER)
AS
StoO_error INTEGER;
StoO_selcnt INTEGER;
StoO_rowcnt INTEGER;
StoO_errmsg VARCHAR2(255);
BEGIN
StoO_rowcnt := 0;
StoO_error := 0;
StoO_selcnt := 0;
P_RETURN := 0;
INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
VALUES (P_STATE_CODE, P_CITY_CODE, P_CITY_NAME);
StoO_rowcnt := SQL%ROWCOUNT;
EXCEPTION
WHEN TOO_MANY_ROWS THEN
StoO_rowcnt := 2;
WHEN OTHERS THEN
StoO_rowcnt := 0;
StoO_selcnt := 0;
StoO_error := SQLCODE;
StoO_errmsg := SQLERRM;
IF StoO_error != 0 THEN
BEGIN
P_RETURN := 1;
RETURN;
END;
END IF;
END;
CREATE OR REPLACE PROCEDURE SP_GETCITIES(
STATE_KEY IN VARCHAR,
RC1 IN OUT globalPkg.RCT1)
AS
StoO_error INTEGER;
StoO_selcnt INTEGER;
StoO_rowcnt INTEGER;
StoO_errmsg VARCHAR2(255);
BEGIN
StoO_rowcnt := 0;
StoO_error := 0;
StoO_selcnt := 0;
OPEN RC1 FOR
SELECT STATE_CODE, CITY_CODE, CITY_NAME
FROM CITIES
WHERE STATE_CODE = STATE_KEY
ORDER BY CITY_CODE;
StoO_rowcnt := SQL%ROWCOUNT;
EXCEPTION
WHEN OTHERS THEN
StoO_rowcnt := 0;
StoO_error := SQLCODE;
StoO_errmsg := SQLERRM;
END;
/Hi Mark,
Thanks for your recommendations.
I change the code with OCIDefineByPos, one for each parameter from cursor and then use the OCIStmtFetch.
I don´t receive a error when call OCIDefineByPos, but when I call OCIStmtFetch receive a -1 error number.
What is wrong with the code?
The script is the same.
I need your help!
Best Regards!
Antonio Garcia (Mexico)
This the new code:
#include <stdio.h>
#include <string.h>
#include <oci.h>
#include <stdlib.h>
char* pConnectChar ="ORAC617";
char* pUsernameChar = "C617_005_DBO_01";
char* pPasswordChar = "Tempora1";
char* sqlCharArray1 = "BEGIN SP_GETCITIES(:s, :c); END;";
int retval;
ub4 parmcnt=0;
ub4 pos2=0;
sb2 *c_indp;
text *pcoln[20], *name,*name2;
ub4 namelen[20],len;
ub2 type,size;
char state_key[5];
OCIDefine *pdef;
OCIBind *p_bnd;
ub1 **c_buf;
OCIStmt* pOciStatement; /* Statement handle */
OCIStmt* pOciStatCursor; /* Statement handle */
OCIError* pOciError; /* Error handle */
OCIEnv* pOciEnviron; /* Environment handle */
OCIServer* pOciServer; /* Server handle */
OCISession* pOciSession; /* Session handle */
OCISvcCtx* pOciServiceContext; /* Service Context handle */
OCIBind* pOciBind[500]; /* Bind handle */
OCIParam* pOciParam; /* Param handle */
int OCI_Fetch(OCIStmt *p_select,OCIError *p_err, int *piOcc)
int iOcc, rc;
rc=OCIStmtFetch(p_select,p_err,1,OCI_FETCH_NEXT,OCI_DEFAULT);
printf("rc fetch %i",rc);
if(rc==0&&piOcc!=NULL){
printf("entro al if");
iOcc=*piOcc;
*piOcc=iOcc+1;
return rc;
int main()
int pos,i=0,rc;
retval = OCIEnvCreate(&pOciEnviron, OCI_DEFAULT, NULL, NULL, NULL, NULL,0,NULL);
printf("EnvCreate retval=%d\n", retval);
retval = OCIEnvInit(&pOciEnviron, OCI_DEFAULT, 0, NULL);
printf("EnvInit retval=%d\n",retval);
retval = OCIHandleAlloc(pOciEnviron, (void **)&pOciError, OCI_HTYPE_ERROR, 0, NULL);
printf("HandleAlloc OCI_HTYPE_ERROR retval=%d\n",retval);
retval = OCIHandleAlloc(pOciEnviron, (void **)&pOciServiceContext, OCI_HTYPE_SVCCTX, 0, NULL);
printf("HandleAlloc OCI_HTYPE_SVCCTX retval=%d\n",retval);
retval = OCIHandleAlloc(pOciEnviron, (void **)&pOciStatement, OCI_HTYPE_STMT, 0, NULL);
printf("HandleAlloc OCI_HTYPE_STMT retval=%d\n",retval);
retval = OCILogon(pOciEnviron,pOciError,&pOciServiceContext,(unsigned char *)pUsernameChar,
strlen(pUsernameChar), (unsigned char *)pPasswordChar, strlen(pPasswordChar),
(unsigned char *)pConnectChar,strlen(pConnectChar));
printf("OCILogon retval=%d\n",retval);
retval = OCIStmtPrepare(pOciStatement, pOciError, (unsigned char *)sqlCharArray1,strlen(sqlCharArray1),
OCI_NTV_SYNTAX, OCI_DEFAULT);
printf("StmtPrepare retval=%d\n",retval);
retval = OCIHandleAlloc(pOciEnviron, (void **)&pOciStatCursor, OCI_HTYPE_STMT, 0, NULL);
printf("HandleAlloc OCI_HTYPE_STMT retval=%d\n",retval);
retval = OCIBindByPos(pOciStatement,&pOciBind[0], pOciError, (ub4) 1, (void *)&state_key,
(sb4) sizeof(state_key), SQLT_STR, (void *) 0, (ub2 *) 0, (ub2 *)0,(ub4)0, (ub4 *)0, (ub4) OCI_DEFAULT);
printf("BindByPos OCI_HTYPE_STMT retval=%d\n",retval);
retval = OCIBindByPos(pOciStatement,&pOciBind[1], pOciError, (ub4) 2, (void *)&pOciStatCursor,
(sb4) 0, SQLT_RSET, (void *) 0, (ub2 *) 0, (ub2 *)0,(ub4)0, (ub4 *)0, (ub4) OCI_DEFAULT);
printf("BindByPos OCI_HTYPE_STMT retval=%d\n",retval);
strcpy(state_key,"CA");
retval = OCIStmtExecute(pOciServiceContext, pOciStatement, pOciError, (ub4)1, (ub4) 0,
(OCISnapshot *)NULL, (OCISnapshot *)NULL, (ub4) OCI_DEFAULT);
printf("StmtExecute retval=%d\n",retval);
c_buf=(ub1 **)calloc(sizeof(ub1 *),3);
c_indp=(sb2 *)calloc(sizeof(sb2 *),3);
// Get number of parameters of the Cursor
OCIAttrGet((void *) pOciStatCursor, (ub4)OCI_HTYPE_STMT, (void*) &parmcnt,(ub4 *) 0,
(ub4)OCI_ATTR_PARAM_COUNT, pOciError);
printf("\nNumber of parameters of the cursor = %d\n",parmcnt);
for (pos = 1; pos <= (int)parmcnt; pos++)
OCIAttrGet((void *) pOciStatCursor, (ub4)OCI_HTYPE_STMT, (void*) &pos2,(ub4 *) 0,
(ub4)OCI_ATTR_CURRENT_POSITION, pOciError);
retval = OCIParamGet((void *)pOciStatCursor, (ub4)OCI_HTYPE_STMT, pOciError, (void **)&pOciParam,(ub4) pos );
// Get the column name
OCIAttrGet((void*) pOciParam, (ub4) OCI_DTYPE_PARAM,(void*) &name,(ub4 *) &len, (ub4) OCI_ATTR_NAME,(OCIError *)pOciError );
// Get the column datatype
OCIAttrGet((void*) pOciParam, (ub4) OCI_DTYPE_PARAM,(void*) &type,(ub4 *)0,(ub4)OCI_ATTR_DATA_TYPE,(OCIError *)pOciError);
// Get the column size
OCIAttrGet((void*) pOciParam, (ub4) OCI_DTYPE_PARAM,(void*) &size,(ub4 *)0,(ub4)OCI_ATTR_DATA_SIZE,(OCIError *)pOciError);
printf("Column %i\tNAME = %.*s \ttype %d \tsize %d\n",pos,len,name,type,size);
// OCIDefine ByPos, one for each parameter
// c_buf store the STATE_CODE, CITY_CODE and CITY_NAME columns from the cursor
rc=OCIDefineByPos(pOciStatCursor,&pdef,(OCIError *)pOciError,pos,c_buf[pos-1],size+1,(ub2)type,(dvoid *)c_indp[pos-1],(ub2 *)0,(ub2 *)0,OCI_DEFAULT);
printf("OCIDefineByPos retval=%d\n,rc);
// call OCIStmtFetch. In the next line, I receive the error
rc=OCIStmtFetch(pOciStatCursor,pOciError,1,OCI_FETCH_NEXT,OCI_DEFAULT);
printf("rc fetch %i",rc);
return 0;
{code} -
Output parameter in plsql Block fails
Hello. I am testing using an anonymous Plsql block with one in and out parameter. The in parameter work fine but when I add the out, the plsql block fails.
This is my environment on a Windows 7 client attaching to a Solaris server. I am using Powershell 3.0, but it is very similar to #c. I have a .net framework of 4.5.
PS L064217> $GAC = $Env:Oracle_Home + "\" + "ODP.NET\bin\4\Oracle.DataAccess.dll"
PS L064217> [Void] [Reflection.Assembly]::LoadFile($Gac)
PS L064217> [Reflection.Assembly]::LoadFile($Gac)
GAC Version Location
True v4.0.30319 C:\windows\Microsoft.Net\assembly\GAC_64\Oracle.DataAccess\v4.0_4.112.3.0__89b4
SQL*Plus: Release 11.2.0.3.0 Production on Wed Nov 28 19:09:57 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsHere is a sample of my test code:
# Define Plsql Anonymous Block
$Table1 = 'AdvSearch_Statutes'
$Table2 = ($Table1).Substring(0, $Table1.Length-1) + '_Docs'
$Caml_Doc_Id = 'CHP201500010'
$Sql = " DECLARE "
$Sql += " vCamlId VARCHAR2(30) := ':Param1' "
$Sql += " vPath_Tx VARCHAR2(200); "
$Sql += " vDelRows_Nr PLS_INTEGER := 0; "
$Sql += " CURSOR Docs_Cur IS "
$Sql += " SELECT XPath "
$Sql += " FROM $Table2 "
$Sql += " WHERE Caml_Doc_Id = vCamlId; "
$Sql += " BEGIN "
$Sql += " OPEN Docs_Cur; "
$Sql += " LOOP "
$Sql += " FETCH Docs_Cur INTO vPath_Tx; "
$Sql += " EXIT WHEN Docs_Cur%NOTFOUND; "
$Sql += " IF (DBMS_XDB.ExistsResource(vPath_Tx)) "
$Sql += " THEN "
$Sql += " DelRows_Nr := DelRows_Nr + 1; "
$Sql += " DBMS_XDB.DeleteResource(vPath_Tx, DBMS_XDB.DELETE_RECURSIVE_FORCE); "
$Sql += " END IF; "
$Sql += " END LOOP; "
$Sql += " DELETE FROM $Table2 WHERE Caml_Doc_Id = vCamlId; "
$Sql += " vDelRows_Nr := vDelRows_Nr + SQL%ROWCOUNT; "
$Sql += " DELETE FROM $Table1 WHERE Caml_Doc_Id = vCamlId; "
$Sql += " vDelRows_Nr := vDelRows_Nr + SQL%ROWCOUNT; "
$Sql += " SELECT vDelRows_Nr INTO :Param2 FROM Dual; "
$Sql += " EXCEPTION "
$Sql += " WHEN OTHERS THEN ROLLBACK; "
$Sql += " END; "
# Set up the Connection and command objects using the prior defined information. Ensure that
# Bind by name is used.
$Conn = New-Object Oracle.DataAccess.Client.OracleConnection($Connect_Str)
$Cmd = New-Object Oracle.DataAccess.Client.OracleCommand($Sql, $Conn)
$Cmd.BindByName = $True
#Set up the parameters for use with the Sql command.
$Param1 = New-Object Oracle.DataAccess.Client.OracleParameter
$Param2 = New-Object Oracle.DataAccess.Client.OracleParameter
$Param1.DbType = 'AnsiString'
$Param1.OracleDbType = 'Varchar2'
$Param1.Direction = 'Input'
$Param1.ParameterName = ':Param1'
$Param1.Value = $Caml_Doc_Id
$Param2.DbType = 'Int32'
$Param2.OracleDbType = 'Int32'
$Param2.Direction = 'Output'
$Param2.ParameterName = ':Param2'
[Void] $Cmd.Parameters.Add($Param1)
[Void] $Cmd.Parameters.Add($Param2)
# Open connection to database and execute the command
Try
$Conn.Open();
$Result = $Cmd.ExecuteNonQuery();
If ($Param2.Value -Eq $Null) {$Counts = 0}
Else {$Count = ($Param2.Value).ToString()}
Write-Host "Return Code: $Result"
Write-Host "Rows Deleted: $Counts"
Catch [System.Exception]
$Param2
Write-Host $_.Exception.ToString() -ForeGroundColor "Red"
Finally
$Conn.Close();
$Conn.Dispose();
"`nSuccessful end of script"
}I have some output. It all seems to be okay. I am following a book rather closely, but after several attempts changing one thing or another, I still cannot find a way to send an out value. I have commented out the " SELECT vDelRows_Nr INTO :Param2 FROM Dual; " and that is the problem statement. Thank you for your help. The first portion is the plsql being echoed back, then I list out what Param2 is defined at. The last bit is the error returned.
PS L064217> .\Test_Odp_PLsqlBlock.ps1
DECLARE vCamlId VARCHAR2(30) := ':Param1' vPath_Tx VARCHAR2(200); vDelRows_Nr PLS_INTEGER := 0;
CURSOR Docs_Cur IS SELECT XPath FROM AdvSearch_Statute_Docs WHERE Caml_Doc_Id = vCamlId; BEGIN
OPEN Docs_Cur; LOOP FETCH Docs_Cur INTO vPath_Tx; EXIT WHEN Docs_Cur%NOTFOUND; IF (DBMS_XDB.ExistsR
esource(vPath_Tx)) THEN DelRows_Nr := DelRows_Nr + 1; DBMS_XDB.DeleteResource(vPath_Tx, DBMS_XDB.DEL
ETE_RECURSIVE_FORCE); END IF; END LOOP; DELETE FROM AdvSearch_Statute_Docs WHERE Caml_Doc_Id = vCamlId; v
DelRows_Nr := vDelRows_Nr + SQL%ROWCOUNT; DELETE FROM AdvSearch_Statutes WHERE Caml_Doc_Id = vCamlId; vDelRows_Nr
:= vDelRows_Nr + SQL%ROWCOUNT; SELECT vDelRows_Nr INTO :Param2 FROM Dual; EXCEPTION WHEN OTHERS THEN ROLLBACK;
END;
DbType : Int32
SourceColumnNullMapping : False
Direction : Output
IsNullable : False
Offset : 0
OracleDbTypeEx : Int32
OracleDbType : Int32
ParameterName : :Param2
Precision : 0
Scale : 0
Size : 0
ArrayBindSize :
SourceColumn :
SourceVersion : Current
Status : Success
ArrayBindStatus :
CollectionType : None
Value :
UdtTypeName :
Oracle.DataAccess.Client.OracleException ORA-01036: illegal variable name/number at Oracle.DataAccess.Client.OracleEx
ception.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object sr
c, String procedure, Boolean bCheck)
at Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery()
at CallSite.Target(Closure , CallSite , Object )Edited by: CRoberts on Nov 28, 2012 7:30 PMAs test
use NUMBER instead of PLS_INTEGER in PL/SQL
and
use Decimal instead of Int32 for Oracle parameter datatype -
How to check for null value of output parameter?
Hi guys, I get a test procedure with 2 output parameters and do nothing:
CREATE OR REPLACE PACKAGE BODY p_parameters_test AS
PROCEDURE p_null_output_basetype(p1 OUT NUMBER,p2 OUT VARCHAR2)
AS
BEGIN
DBMS_OUTPUT.PUT_LINE('DO NOTHING');
END p_null_output_basetype;
END;And I have below C# code:
cmd.CommandText = "p_parameters_test.p_null_output_basetype";
OracleParameter p1 = new OracleParameter("p1", OracleDbType.Decimal, System.Data.ParameterDirection.Output);
OracleParameter p2 = new OracleParameter("p2", OracleDbType.Varchar2, System.Data.ParameterDirection.Output);
cmd.Parameters.Add(p1);
cmd.Parameters.Add(p2);
try
conn.Open();
cmd.ExecuteNonQuery();
if (p1.Value==null)
Console.WriteLine("p1.Value==null");
else if (Convert.IsDBNull(p1.Value))
Console.WriteLine("Convert.IsDBNull(p1.Value)");
else
Console.WriteLine("p1 else "+p1.Value);
if (p2.Value==null)
Console.WriteLine("p2.Value==null");
else if (Convert.IsDBNull(p2.Value))
Console.WriteLine("Convert.IsDBNull(p2.Value)");
else
Console.WriteLine("p2 else "+p2.Value);
Console.WriteLine("finished");
catch......The output of it is:
p1 else null
p2 else null
Does anyone have any idea why it always goes to the 'else' of the condition-branching, and how can I check if the output parameter is null?
Thanks in advance.Morven... I ran into similar problems. Maybe you've found a solution of your own by now, but here's what I've learned...
The Value property of output parameters, like p1 and p2 in your code, actually varies, according to (I think) the OracleDbType of the parameter. You've got OracleDbType.Decimal for p1 and OracleDbType.Varchar2 for p2. These look about right, since they match the parameter types in your actual stored procedure.
After cmd.ExecuteNonQuery() executes, the respective Value properties of p1 and p2 are actually of different types. For p1, it's going to be "OracleDecimal" and for p2 it's "OracleString". Keep in miind that these are the types of the Value property of the OracleParameter objects, not the OracleParameter objects themselves.
OracleDecimal and OracleString (and some other types like OracleDate, etc.) have an "IsNull" property you can use if you cast the Value property to its runtime type...
if ((OracleDecimal)cmd.Parameters["p1"].Value).IsNull) { …do something… }
else { …do something else… }
Or maybe something like this...
Decimal p1val = ((OracleDecimal)cmd.Parameters["p1"].Value).IsNull ? 0 : ((OracleDecimal)cmd.Parameters["AVG_SALARY"].Value).Value;
I'll admit that expressions like this: ((OracleDecimal)cmd.Parameters["AVG_SALARY"].Value).Value look a little weird. But the "Value" of the "OracleDecimal" property is a regular .NET decimal type (System.Decimal). So, it's a "Value" of the "Value" property of the OracleParameter class.
Even when the stored procedure returns a null, the Value property is still populated. In the case of p1, it's populated with an OracleDecimal object (actually a struct) where IsNull is true. That's why "p1.Value==null" tests false.
From what I can see, OracleDecimal, OracleString, etc. will never be typed as DbNull, or DBNull.Value. So, that would be why Convert.IsDBNull(p1.Value)) always returns false. btw, it appears that these are Value types. That would suggest that coding something like like this, should be avoided…
OracleString p2val = ((OracleString)cmd.Parameters["p2"].Value;
if (p2val.IsNull) { …do something… }
else { …do something else… }
By assigning the value to another variable, you’d be actually creating an entire copy of the OracleString structure, which is pointless.
I hope that helps
Edited by: 897674 on Jan 3, 2012 10:44 AM
Edited by: 897674 on Jan 3, 2012 10:46 AM -
Getting error while Calling Oracle Stored Procedure with output Parameter
HI All,
From long days i am working on this but i unable to solve it.
Even i have studied so many forums in SAP but i didn't find the solution.
I am calling Oracle Store procedure with 3 inputs and 1 output without cursor.
Store Procedure:-
CREATE OR REPLACE PROCEDURE PDS.send_rm
IS
proc_name VARCHAR2(64) := 'send_rm';
destination_system VARCHAR2(32) := 'RAWMAT';
xml_message VARCHAR2(4000);
status_code INTEGER;
status_message VARCHAR2(128);
debug_message VARCHAR2(128);
p_ret INTEGER;
BEGIN
DBMS_OUTPUT.PUT_LINE( proc_name || ' started' );
xml_message := '<RAW_MATERIAL>'||
'<BAR_CODE>10000764601</BAR_CODE>'||
'<MATERIAL>1101448</MATERIAL>'||
'<VENDOR_CODE/>'||
'<PRODUCTION_DATE>0000-00-00</PRODUCTION_DATE>'||
'<EXPIRE_DATE>0000-00-00</EXPIRE_DATE>'||
'<BATCH/>'||
'<PO_NUM/>'||
'<MATERIAL_DESCRIPTION>POWER SUPPLY</MATERIAL_DESCRIPTION>'||
'<SPEC_NAME/>'||
'<STOCK_CODE>BSW-JH</STOCK_CODE>'||
'<INSPECTION_LOT>00</INSPECTION_LOT>'||
'<USAGE_DECISION_CODE/>'||
'<MATERIAL_GROUP>031</MATERIAL_GROUP>'||
'</RAW_MATERIAL>';
dbms_output.put_line('XML '||xml_message);
-- vp_interface.load_rawmat@cnprpt1_pds(SYSDATE, destination_system,
-- xml_message, p_ret);
vp_interface.load_rawmat(SYSDATE, destination_system,
xml_message, p_ret);
dbms_output.put_line('Return Code '||p_ret);
COMMIT;
EXCEPTION
WHEN OTHERS THEN
status_code := SQLCODE;
status_message := SUBSTR(SQLERRM, 1, 64);
-- Extract_Error_Logger(proc_name, 'LOCAL', SYSDATE, -999,
-- status_message, 0, debug_message);
ROLLBACK;
END send_rm;
And while i am calling this Store procedure in MII, I am facing error.
I have tried different ways but didnt solved
In SQL Query, i kept mode as: FixedQueryOutput
Can anyone tell me or send code for calling above store procedure
And onemore thing, While creating store procedure in Oracle for MII. Do we need to Create output parameter as cursor or normal.
Thanks,
Kind Regards,
Praveen Reddy MHi Praveen
Our wrapper was created because we could not modify the procedure we call (it was not returning a cursor).
CREATE OR REPLACE PROCEDURE CHECK_PUT_IN_USE
(STRCMPNAME in varchar2,
STRSCANLABEL in varchar2,
RCT1 out SYS_REFCURSOR
AS
charDispo Char(1);
charStatus Char(1);
intCatNo Integer;
charCatDispo Char(1);
strCatQual VarChar2(2);
strCatDesc VarChar2(30);
strMsg VarChar2(128);
BEGIN
qa.check_put_in_use@AR(STRCMPNAME,
STRSCANLABEL,
charDispo,
charStatus,
intCatNo,
charCatDispo,
strCatQual,
strCatDesc,
strMsg);
OPEN RCT1
FOR Select charDispo,charStatus,charDispo,charStatus,intCatNo,charCatDispo,strCatQual,strCatDesc,strMsg from Dual;
END;
Hope this helps
Regards
Amrik
then with a FixedQueryWithOutput
call mixar.qasap.wrapper_update_put_in_use('[Param.1]','[Param.2]',[Param.3],?)
Hope this helps. -
Hi i am executingthe below script in unix:
sqlplus -s ${SQL_USERID} <<EOF
whenever sqlerror exit sql.sqlcode
begin
UPDATE statement
end;
EOF
rc=$?
echo $rc
i am getting the return code as 139.
What does it mean?
How to make the query to be successful?
ThanksMy wild guess would be:
ORA-00907: missing right parenthesis
Whose idea was it to return sql.sqlcode though? The return code of Unix commands is an 8 bit number and can only go up to 255 (i.e. binary 11111111), which is fine for distinguishing between 0 (success) and 1 (failure) etc, after which it wraps around to 0 again. This means your 139 is mod(actual_error_code,256), and my guess is 907:
$> sqlplus username/pass
SQL*Plus: Release 11.2.0.1.0 Production on Thu Jun 2 18:59:41 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select (1 from dual;
select (1 from dual
ERROR at line 1:
ORA-00907: missing right parenthesis
SQL> exit sql.sqlcode
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
$> print $?
139Just for fun, here are the valid error codes that could give you 139:
begin
for r in (
select rownum as oracle_error
, mod(rownum,256) as return_code
, cast(null as varchar2(200)) as message
from dual
connect by rownum <= 20000
loop
if r.return_code = 139 then
r.message := sqlerrm(r.oracle_error * -1);
if r.message not like 'ORA-%: Message ' || r.oracle_error || ' not found;%' then
dbms_output.put_line(r.message);
end if;
end if;
end loop;
end;
ORA-00139: duplicate attribute
ORA-00395: online logs for the clone database must be renamed
ORA-00907: missing right parenthesis
ORA-01163: SIZE clause indicates (blocks), but should match header
ORA-01419: datdts: illegal format code
ORA-01675: max_commit_propagation_delay inconsistent with other instances
ORA-01931: cannot grant to a role
ORA-02187: invalid quota specification
ORA-02443: Cannot drop constraint - nonexistent constraint
ORA-03211: The segment does not exist or is not in a valid state
ORA-06027: NETASY: channel close failure
ORA-06539: target of OPEN must be a query
ORA-07563: sldext: $PARSE failure
ORA-08331: Wait operation timed out
ORA-10635: Invalid segment or tablespace type
ORA-10891: disable column pruning in ANSI join transformation
ORA-12171: TNS:could not resolve connect identifier:
ORA-12427: invalid input value for parameter
ORA-12683: encryption/crypto-checksumming: no Diffie-Hellman seed
ORA-13195: failed to generate maximum tile value
ORA-13451: GeoRaster metadata scaling function error
ORA-13707: Either the start snapshot or the end snapshot is incomplete or missing key statistics.
ORA-15243: is not a valid version number
ORA-16011: Remote File Server process is in Error state.
ORA-16267: Cannot instantiate a Logical Standby during a switchover
ORA-16523: operation requires the client to connect to instance ""
ORA-16779: the destination parameter of a database is set incorrectly
ORA-19595: archived log already included in backup conversation
ORA-19851: OS error while managing auxiliary databaseBy the same logic, you will notice that ORA-00256, ORA-01024, ORA-01280, ORA-01536 etc return 0, making you think your script succeeded when it actually failed with 'space quota exceeded for tablespace' etc.
Edited by: William Robertson on Jun 2, 2011 7:13 PM -
Backup Error "Return Code 0001 Success with warnings"
Hi All,
I have a problem while taking backup using brtools .We scheduled a full offline backup and in DB12 when i check the status of last successful backup then it shows like
Return Code 0001 Success with warnings
System: ECC6
OS:Solaris
DB:Oracle10g
What does this error mean there is no warning in log file also.
Anybody have any idea??
Thanks in AdvanceHi,
Thanks for your reply .
Here is my Logfile
TOO LONG .....
BR0051I BRBACKUP 7.00 (32)
BR0055I Start of database backup: bdzgizji.aff 2008-11-14 22.18.54
BR0484I BRBACKUP log file: /oracle/<MYSID>/sapbackup/bdzgizji.aff
BR0477I Oracle pfile /oracle/<MYSID>/102_64/dbs/init<MYSID>.ora created from spfile /oracle/<MYSID>/102_64/dbs/spfile<MYSID>.ora
BR0286W Size 2306875392 of file /oracle/<MYSID>/sapdata1/sr3700_2/sr3700.data2 is different from Oracle file size 2222989312
BR0101I Parameters
Name Value
oracle_sid <MYSID>
oracle_home /oracle/<MYSID>/102_64
oracle_profile /oracle/<MYSID>/102_64/dbs/init<MYSID>.ora
sapdata_home /oracle/<MYSID>
sap_profile /oracle/<MYSID>/102_64/dbs/init<MYSID>.sap
backup_mode ALL
backup_type offline_force
backup_dev_type util_file
util_par_file /oracle/<MYSID>/102_64/dbs/init<MYSID>.utl
system_info ora<MYSID>/ora<MYSID> DBD112 SunOS 5.10 Generic_127127-11 sun4v
oracle_info <MYSID> 10.2.0.2.0 8192 2867 21991272 DBD112 UTF8 UTF8
sap_info 700 SAPSR3 0002LK0003<MYSID>0011Q07320361650013NetWeaver_ORA
make_info sun_64 OCI_102 Feb 6 2008
command_line brbackup -u / -c -d util_file -t offline_force -m all -a -sd -c
BR0116I ARCHIVE LOG LIST before backup for database instance <MYSID>
Parameter Value
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /oracle/<MYSID>/oraarch/<MYSID>arch
Archive format %t_%s_%r.dbf
Oldest online log sequence 2864
Next log sequence to archive 2867
Current log sequence 2867 SCN: 21991272
Database block size 8192 Thread: 1
Current system change number 22007193 ResetId: 665869765
BR0118I Tablespaces and data files
Tablespace TS-Status F-Status File Size Id. Device Link Type MaxSize IncrSize BlkSize
PSAPSR3 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata1/sr3_1/sr3.data1 2097160192 4 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata1/sr3_2/sr3.data2 2097160192 5 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata1/sr3_3/sr3.data3 2097160192 6 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata1/sr3_4/sr3.data4 2097160192 7 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata1/sr3_5/sr3.data5 2097160192 8 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata2/sr3_10/sr3.data10 2118131712 13 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata2/sr3_6/sr3.data6 2097160192 9 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata2/sr3_7/sr3.data7 2097160192 10 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata2/sr3_8/sr3.data8 2097160192 11 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata2/sr3_9/sr3.data9 2097160192 12 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata3/sr3_11/sr3.data11 2181046272 14 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata3/sr3_12/sr3.data12 2369789952 15 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata3/sr3_13/sr3.data13 2181046272 16 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata3/sr3_14/sr3.data14 2202017792 17 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata3/sr3_15/sr3.data15 2118131712 18 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata4/sr3_16/sr3.data16 2306875392 19 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata4/sr3_17/sr3.data17 10485768192 20 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata4/sr3_18/sr3.data18 10485768192 21 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata4/sr3_19/sr3.data19 3292536832 22 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata4/sr3_20/sr3.data20 2097160192 23 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3700 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata1/sr3700_1/sr3700.data1 2160074752 24 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3700 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata1/sr3700_2/sr3700.data2 2222989312 25 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3700 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata1/sr3700_3/sr3700.data3 2411732992 26 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3700 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata1/sr3700_4/sr3700.data4 10485768192 27 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3700 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata2/sr3700_5/sr3700.data5 10485768192 28 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3700 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata2/sr3700_6/sr3700.data6 10485768192 29 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3700 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata2/sr3700_7/sr3700.data7 9374277632 30 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3700 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata2/sr3700_8/sr3700.data8 2789220352 31 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3700 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata3/sr3700_10/sr3700.data10 2327846912 33 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3700 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata3/sr3700_11/sr3700.data11 2411732992 34 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3700 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata3/sr3700_12/sr3700.data12 2181046272 35 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3700 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata3/sr3700_9/sr3700.data9 3187679232 32 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3700 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata4/sr3700_13/sr3700.data13 2160074752 36 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3700 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata4/sr3700_14/sr3700.data14 2327846912 37 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3700 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata4/sr3700_15/sr3700.data15 2222989312 38 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3700 ONLINE* ONLINE+ /oracle/<MYSID>/sapdata4/sr3700_16/sr3700.data16 2139103232 39 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPSR3700 ONLINE* ONLINE /oracle/<MYSID>/sapdata4/sr3700_17/sr3700.data17 2097160192 43 9764872 NOLINK FILE 0 0 8192
PSAPSR3700 ONLINE* ONLINE /oracle/<MYSID>/sapdata4/sr3700_18/sr3700.data18 2097160192 44 9764872 NOLINK FILE 0 0 8192
PSAPSR3700 ONLINE* ONLINE /oracle/<MYSID>/sapdata4/sr3700_19/sr3700.data19 2097160192 45 9764872 NOLINK FILE 0 0 8192
PSAPSR3USR ONLINE* ONLINE+ /oracle/<MYSID>/sapdata1/sr3usr_1/sr3usr.data1 20979712 40 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPTEMP ONLINE# ONLINE+ /oracle/<MYSID>/sapdata2/temp_1/temp.data1 2097160192 -1 9764872 NOLINK FILE 10485760000 20971520 8192
PSAPUNDO ONLINE- ONLINE+ /oracle/<MYSID>/sapdata3/undo_1/undo.data1 9374277632 2 9764872 NOLINK FILE 10485760000 20971520 8192
SYSAUX ONLINE* ONLINE+ /oracle/<MYSID>/sapdata1/sysaux_1/sysaux.data1 272637952 3 9764872 NOLINK FILE 10485760000 20971520 8192
SYSAUX ONLINE* ONLINE /oracle/<MYSID>/sapdata1/sysaux_2/sysaux.data2 2097160192 42 9764872 NOLINK FILE 0 0 8192
SYSTEM ONLINE* SYSTEM+ /oracle/<MYSID>/sapdata1/system_1/system.data1 880812032 1 9764872 NOLINK FILE 10485760000 20971520 8192
SYSTEM ONLINE* SYSTEM /oracle/<MYSID>/sapdata1/system_2/system.data2 2097160192 41 9764872 NOLINK FILE 0 0 8192
BR0119I Redo log files
File Size Group Device Status Link Type
/oracle/<MYSID>/origlogA/log_g11m1.dbf 52429312 1 9764872 INUSE NOLINK FILE
/oracle/<MYSID>/mirrlogA/log_g11m2.dbf 52429312 1 9764872 INUSE NOLINK FILE
/oracle/<MYSID>/origlogB/log_g12m1.dbf 52429312 2 9764872 INUSE NOLINK FILE
/oracle/<MYSID>/mirrlogB/log_g12m2.dbf 52429312 2 9764872 INUSE NOLINK FILE
/oracle/<MYSID>/origlogA/log_g13m1.dbf 52429312 3 9764872 INUSE NOLINK FILE
/oracle/<MYSID>/mirrlogA/log_g13m2.dbf 52429312 3 9764872 INUSE NOLINK FILE
/oracle/<MYSID>/origlogB/log_g14m1.dbf 52429312 4 9764872 INUSE NOLINK FILE
/oracle/<MYSID>/mirrlogB/log_g14m2.dbf 52429312 4 9764872 INUSE NOLINK FILE
BR0120I Control files
File Size Id. Device Link Type
/oracle/<MYSID>/origlogA/cntrl/cntrl<MYSID>.dbf 15908864 0 9764872 NOLINK FILE
/oracle/<MYSID>/origlogB/cntrl/cntrl<MYSID>.dbf 15908864 0 9764872 NOLINK FILE
/oracle/<MYSID>/sapdata1/cntrl/cntrl<MYSID>.dbf 15908864 0 9764872 NOLINK FILE
BR0280I BRBACKUP time stamp: 2008-11-14 22.18.57
BR0057I Backup of database: <MYSID>
BR0058I BRBACKUP action ID: bdzgizji
BR0059I BRBACKUP function ID: aff
BR0110I Backup mode: ALL
BR0077I Database files for backup:
/oracle/<MYSID>/origlogA/log_g11m1.dbf
/oracle/<MYSID>/origlogB/log_g12m1.dbf
/oracle/<MYSID>/origlogA/log_g13m1.dbf
/oracle/<MYSID>/origlogB/log_g14m1.dbf
/oracle/<MYSID>/origlogA/cntrl/cntrl<MYSID>.dbf
BR0061I 51 files found for backup, total size 146335.533 MB
BR0143I Backup type: offline_force
BR0130I Backup device type: util_file
BR0109I Files will be saved by backup utility
BR0289I BRARCHIVE will be started at the end of processing
BR0126I Unattended mode active - no operator confirmation required
BR0280I BRBACKUP time stamp: 2008-11-14 22.18.57
BR0307I Shutting down database instance <MYSID> ...
BR0280I BRBACKUP time stamp: 2008-11-14 22.20.47
BR0308I Shutdown of database instance <MYSID> successful
BR0280I BRBACKUP time stamp: 2008-11-14 22.20.47
BR0229I Calling backup utility with function 'backup'...
BR0278I Command output of '/usr/sap/<MYSID>/SYS/exe/run/backint -u <MYSID> -f backup -i /oracle/<MYSID>/sapbackup/.bdzgizji.lst -t file -p /oracle/<MYSID>/102_64/dbs/init<MYSID>.utl -c':
WARNING: sort_backup_type not specified in .utl file
WARNING: default sort_backup_type to <size> for backup
///Here i feel some doubt initially but it does not have to take anything with this error as same warning is there in DEV server log also but there backup is sucessful///
Program: /usr/sap/<MYSID>/SYS/exe/run/backint 6.0
Input File: /oracle/<MYSID>/sapbackup/.bdzgizji.lst
Profile: /oracle/<MYSID>/102_64/dbs/init<MYSID>.utl
Function: BACKUP
Backup Type: BACKUP_FILE
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata1/sr3_1/sr3.data1
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata1/sr3_2/sr3.data2
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata1/sr3_3/sr3.data3
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata1/sr3_4/sr3.data4
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata1/sr3_5/sr3.data5
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata2/sr3_10/sr3.data10
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata2/sr3_6/sr3.data6
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata2/sr3_7/sr3.data7
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata2/sr3_8/sr3.data8
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata2/sr3_9/sr3.data9
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata3/sr3_11/sr3.data11
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata3/sr3_12/sr3.data12
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata3/sr3_13/sr3.data13
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata3/sr3_14/sr3.data14
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata3/sr3_15/sr3.data15
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata4/sr3_16/sr3.data16
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata4/sr3_17/sr3.data17
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata4/sr3_18/sr3.data18
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata4/sr3_19/sr3.data19
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata4/sr3_20/sr3.data20
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata1/sr3700_1/sr3700.data1
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata1/sr3700_2/sr3700.data2
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata1/sr3700_3/sr3700.data3
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata1/sr3700_4/sr3700.data4
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata2/sr3700_5/sr3700.data5
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata2/sr3700_6/sr3700.data6
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata2/sr3700_7/sr3700.data7
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata2/sr3700_8/sr3700.data8
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata3/sr3700_10/sr3700.data10
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata3/sr3700_11/sr3700.data11
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata3/sr3700_12/sr3700.data12
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata3/sr3700_9/sr3700.data9
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata4/sr3700_13/sr3700.data13
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata4/sr3700_14/sr3700.data14
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata4/sr3700_15/sr3700.data15
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata4/sr3700_16/sr3700.data16
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata4/sr3700_17/sr3700.data17
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata4/sr3700_18/sr3700.data18
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata4/sr3700_19/sr3700.data19
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata1/sr3usr_1/sr3usr.data1
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata2/temp_1/temp.data1
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata3/undo_1/undo.data1
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata1/sysaux_1/sysaux.data1
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata1/sysaux_2/sysaux.data2
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata1/system_1/system.data1
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/sapdata1/system_2/system.data2
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/origlogA/log_g11m1.dbf
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/origlogB/log_g12m1.dbf
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/origlogA/log_g13m1.dbf
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/origlogB/log_g14m1.dbf
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
#FILE..... /oracle/<MYSID>/origlogA/cntrl/cntrl<MYSID>.dbf
#SAVED.... VXF1226681408
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.02
BR0232I 51 of 51 files saved by backup utility
BR0230I Backup utility called successfully
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.04
BR0304I Starting and opening database instance <MYSID> ...
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.35
BR0305I Start and open of database instance <MYSID> successful
BR0117I ARCHIVE LOG LIST after backup for database instance <MYSID>
Parameter Value
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /oracle/<MYSID>/oraarch/<MYSID>arch
Archive format %t_%s_%r.dbf
Oldest online log sequence 2864
Next log sequence to archive 2867
Current log sequence 2867 SCN: 21991272
Database block size 8192 Thread: 1
Current system change number 22012086 ResetId: 665869765
BR0280I BRBACKUP time stamp: 2008-11-15 05.11.37
BR0229I Calling backup utility with function 'backup'...
BR0278I Command output of '/usr/sap/<MYSID>/SYS/exe/run/backint -u <MYSID> -f backup -i /oracle/<MYSID>/sapbackup/.bdzgizji.lst -t file -p /oracle/<MYSID>/102_64/dbs/init<MYSID>.utl -c':
WARNING: sort_backup_type not specified in .utl file
WARNING: default sort_backup_type to <size> for backup
Program: /usr/sap/<MYSID>/SYS/exe/run/backint 6.0
Input File: /oracle/<MYSID>/sapbackup/.bdzgizji.lst
Profile: /oracle/<MYSID>/102_64/dbs/init<MYSID>.utl
Function: BACKUP
Backup Type: BACKUP_FILE
BR0280I BRBACKUP time stamp: 2008-11-15 05.12.09
#PFLOG.... /oracle/<MYSID>/102_64/dbs/init<MYSID>.ora
#SAVED.... VXF1226706058
BR0280I BRBACKUP time stamp: 2008-11-15 05.12.09
#PFLOG.... /oracle/<MYSID>/102_64/dbs/spfile<MYSID>.ora
#SAVED.... VXF1226706058
BR0280I BRBACKUP time stamp: 2008-11-15 05.12.09
#PFLOG.... /oracle/<MYSID>/102_64/dbs/init<MYSID>.sap
#SAVED.... VXF1226706058
BR0280I BRBACKUP time stamp: 2008-11-15 05.12.09
#PFLOG.... /oracle/<MYSID>/102_64/dbs/init<MYSID>.utl
#SAVED.... VXF1226706058
BR0280I BRBACKUP time stamp: 2008-11-15 05.12.09
#PFLOG.... /oracle/<MYSID>/sapreorg/space<MYSID>.log
#SAVED.... VXF1226706058
BR0280I BRBACKUP time stamp: 2008-11-15 05.12.09
#PFLOG.... /oracle/<MYSID>/sapreorg/struc<MYSID>.log
#SAVED.... VXF1226706058
BR0280I BRBACKUP time stamp: 2008-11-15 05.12.09
#PFLOG.... /oracle/<MYSID>/sapbackup/bdzgizji.aff
#SAVED.... VXF1226706058
BR0280I BRBACKUP time stamp: 2008-11-15 05.12.09
#PFLOG.... /oracle/<MYSID>/sapbackup/back<MYSID>.log
#SAVED.... VXF1226706058
BR0280I BRBACKUP time stamp: 2008-11-15 05.12.09
BR0232I 8 of 8 files saved by backup utility
BR0230I Backup utility called successfully
BR0056I End of database backup: bdzgizji.aff 2008-11-15 05.12.09
BR0280I BRBACKUP time stamp: 2008-11-15 05.12.13
BR0053I BRBACKUP completed successfully with warnings
BR0280I BRBACKUP time stamp: 2008-11-15 05.12.13
BR0291I BRARCHIVE will be started with options '-U -d util_file -sd -c'
BR0280I BRBACKUP time stamp: 2008-11-15 05.13.36
BR0292I Execution of BRARCHIVE finished with return code 0
Please suggest as i am not able to understand that error code.
Thanks -
Command return code of 255 (65280) during Grid Infrastructure Installation
I am trying to create a 2-node RAC 11gR2. I am using OEL 5 Update 4. I am using NFS as shared storage. The time on both node is same. Both nodes have 4GB RAM each. Following is my IP settings from /etc/hosts on both nodes:
[oracle@vis ~]$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
# Public
10.8.5.191 vis.awc.com vis
10.8.5.192 vsstest.awc.com vsstest
#Private
192.168.0.101 vis-priv.awc.com vis-priv
192.168.0.102 vsstest-priv.awc.com vsstest-priv
#Virtual
10.8.5.166 vis-vip.awc.com vis-vip
10.8.5.170 vsstest-vip.awc.com vsstest-vip
# SCAN
10.8.5.182 rac-scan.awc.com rac-scan
#NAS
192.168.0.101 nas1.awc.com nas1
I am getting error during the Grid Infrastructure installation, when I run the root.sh script through root. Following is the logfile showing the error (/u01/app/11.2.0/grid/cfgtoollogs/crsconfig/rootcrs_vis.log):
2010-02-02 11:58:05: The configuration parameter file /u01/app/11.2.0/grid/crs/install/crsconfig_params is valid
2010-02-02 11:58:05: Checking for super user privileges
2010-02-02 11:58:05: User has super user privileges
2010-02-02 11:58:05: ### Printing the configuration values from files:
2010-02-02 11:58:05: /u01/app/11.2.0/grid/crs/install/crsconfig_params
2010-02-02 11:58:05: /u01/app/11.2.0/grid/crs/install/s_crsconfig_defs
2010-02-02 11:58:05: ASM_DISCOVERY_STRING=
2010-02-02 11:58:05: ASM_DISKS=
2010-02-02 11:58:05: ASM_DISK_GROUP=
2010-02-02 11:58:05: ASM_REDUNDANCY=
2010-02-02 11:58:05: ASM_SPFILE=
2010-02-02 11:58:05: ASM_UPGRADE=false
2010-02-02 11:58:05: CLSCFG_MISSCOUNT=
2010-02-02 11:58:05: CLUSTER_GUID=
2010-02-02 11:58:05: CLUSTER_NAME=rac-scan
2010-02-02 11:58:05: CRS_NODEVIPS='vis-vip/255.248.0.0/eth0,vsstest-vip/255.248.0.0/eth0'
2010-02-02 11:58:05: CRS_STORAGE_OPTION=2
2010-02-02 11:58:05: CSS_LEASEDURATION=400
2010-02-02 11:58:05: DIRPREFIX=
2010-02-02 11:58:05: DISABLE_OPROCD=0
2010-02-02 11:58:05: EMBASEJAR_NAME=oemlt.jar
2010-02-02 11:58:05: EWTJAR_NAME=ewt3.jar
2010-02-02 11:58:05: EXTERNAL_ORACLE_BIN=/opt/oracle/bin
2010-02-02 11:58:05: GNS_ADDR_LIST=
2010-02-02 11:58:05: GNS_ALLOW_NET_LIST=
2010-02-02 11:58:05: GNS_CONF=false
2010-02-02 11:58:05: GNS_DENY_ITF_LIST=
2010-02-02 11:58:05: GNS_DENY_NET_LIST=
2010-02-02 11:58:05: GNS_DOMAIN_LIST=
2010-02-02 11:58:05: GPNPCONFIGDIR=/u01/app/11.2.0/grid
2010-02-02 11:58:05: GPNPGCONFIGDIR=/u01/app/11.2.0/grid
2010-02-02 11:58:05: GPNP_PA=
2010-02-02 11:58:05: HELPJAR_NAME=help4.jar
2010-02-02 11:58:05: HOST_NAME_LIST=vis,vsstest
2010-02-02 11:58:05: ID=/etc/init.d
2010-02-02 11:58:05: INIT=/sbin/init
2010-02-02 11:58:05: IT=/etc/inittab
2010-02-02 11:58:05: JEWTJAR_NAME=jewt4.jar
2010-02-02 11:58:05: JLIBDIR=/u01/app/11.2.0/grid/jlib
2010-02-02 11:58:05: JREDIR=/u01/app/11.2.0/grid/jdk/jre/
2010-02-02 11:58:06: LANGUAGE_ID=AMERICAN_AMERICA.AL32UTF8
2010-02-02 11:58:06: MSGFILE=/var/adm/messages
2010-02-02 11:58:06: NETCFGJAR_NAME=netcfg.jar
2010-02-02 11:58:06: NETWORKS="eth0"/10.8.0.0:public,"eth1"/192.168.0.0:cluster_interconnect
2010-02-02 11:58:06: NEW_HOST_NAME_LIST=
2010-02-02 11:58:06: NEW_NODEVIPS='vis-vip/255.248.0.0/eth0,vsstest-vip/255.248.0.0/eth0'
2010-02-02 11:58:06: NEW_NODE_NAME_LIST=
2010-02-02 11:58:06: NEW_PRIVATE_NAME_LIST=
2010-02-02 11:58:06: NODELIST=vis,vsstest
2010-02-02 11:58:06: NODE_NAME_LIST=vis,vsstest
2010-02-02 11:58:06: OCFS_CONFIG=
2010-02-02 11:58:06: OCRCONFIG=/etc/oracle/ocr.loc
2010-02-02 11:58:06: OCRCONFIGDIR=/etc/oracle
2010-02-02 11:58:06: OCRID=
2010-02-02 11:58:06: OCRLOC=ocr.loc
2010-02-02 11:58:06: OCR_LOCATIONS=/u01/shared_config/ocr_configuration
2010-02-02 11:58:06: OLASTGASPDIR=/etc/oracle/lastgasp
2010-02-02 11:58:06: OLRCONFIG=/etc/oracle/olr.loc
2010-02-02 11:58:06: OLRCONFIGDIR=/etc/oracle
2010-02-02 11:58:06: OLRLOC=olr.loc
2010-02-02 11:58:06: OPROCDCHECKDIR=/etc/oracle/oprocd/check
2010-02-02 11:58:06: OPROCDDIR=/etc/oracle/oprocd
2010-02-02 11:58:06: OPROCDFATALDIR=/etc/oracle/oprocd/fatal
2010-02-02 11:58:06: OPROCDSTOPDIR=/etc/oracle/oprocd/stop
2010-02-02 11:58:06: ORACLE_BASE=/u01/app/oracle
2010-02-02 11:58:06: ORACLE_HOME=/u01/app/11.2.0/grid
2010-02-02 11:58:06: ORACLE_OWNER=oracle
2010-02-02 11:58:06: ORA_ASM_GROUP=dba
2010-02-02 11:58:06: ORA_DBA_GROUP=oinstall
2010-02-02 11:58:06: PRIVATE_NAME_LIST=
2010-02-02 11:58:06: RCALLDIR=/etc/rc.d/rc0.d /etc/rc.d/rc1.d /etc/rc.d/rc2.d /etc/rc.d/rc3.d /etc/rc.d/rc4.d /etc/rc.d/rc5.d /etc/rc.d/rc6.d
2010-02-02 11:58:06: RCKDIR=/etc/rc.d/rc0.d /etc/rc.d/rc1.d /etc/rc.d/rc2.d /etc/rc.d/rc4.d /etc/rc.d/rc6.d
2010-02-02 11:58:06: RCSDIR=/etc/rc.d/rc3.d /etc/rc.d/rc5.d
2010-02-02 11:58:06: RC_KILL=K19
2010-02-02 11:58:06: RC_KILL_OLD=K96
2010-02-02 11:58:06: RC_START=S96
2010-02-02 11:58:06: SCAN_NAME=rac-scan.awc.com
2010-02-02 11:58:06: SCAN_PORT=1521
2010-02-02 11:58:06: SCRBASE=/etc/oracle/scls_scr
2010-02-02 11:58:06: SHAREJAR_NAME=share.jar
2010-02-02 11:58:06: SILENT=false
2010-02-02 11:58:06: SO_EXT=so
2010-02-02 11:58:06: SRVCFGLOC=srvConfig.loc
2010-02-02 11:58:06: SRVCONFIG=/var/opt/oracle/srvConfig.loc
2010-02-02 11:58:06: SRVCONFIGDIR=/var/opt/oracle
2010-02-02 11:58:06: VNDR_CLUSTER=false
2010-02-02 11:58:06: VOTING_DISKS=/u01/shared_config/voting_disk
2010-02-02 11:58:06: ### Printing other configuration values ###
2010-02-02 11:58:06: CLSCFG_EXTRA_PARMS=
2010-02-02 11:58:06: CRSDelete=0
2010-02-02 11:58:06: CRSPatch=0
2010-02-02 11:58:06: DEBUG=
2010-02-02 11:58:06: DOWNGRADE=
2010-02-02 11:58:06: HAS_GROUP=oinstall
2010-02-02 11:58:06: HAS_USER=root
2010-02-02 11:58:06: HOST=vis
2010-02-02 11:58:07: IS_SIHA=0
2010-02-02 11:58:07: OLR_DIRECTORY=/u01/app/11.2.0/grid/cdata
2010-02-02 11:58:07: OLR_LOCATION=/u01/app/11.2.0/grid/cdata/vis.olr
2010-02-02 11:58:07: ORA_CRS_HOME=/u01/app/11.2.0/grid
2010-02-02 11:58:07: SUPERUSER=root
2010-02-02 11:58:07: UPGRADE=
2010-02-02 11:58:07: VF_DISCOVERY_STRING=/u01/shared_config/voting_disk
2010-02-02 11:58:07: addfile=/u01/app/11.2.0/grid/crs/install/crsconfig_addparams
2010-02-02 11:58:07: crscfg_trace=1
2010-02-02 11:58:07: crscfg_trace_file=/u01/app/11.2.0/grid/cfgtoollogs/crsconfig/rootcrs_vis.log
2010-02-02 11:58:07: hosts=
2010-02-02 11:58:07: oldcrshome=
2010-02-02 11:58:07: oldcrsver=
2010-02-02 11:58:07: osdfile=/u01/app/11.2.0/grid/crs/install/s_crsconfig_defs
2010-02-02 11:58:07: parameters_valid=1
2010-02-02 11:58:07: paramfile=/u01/app/11.2.0/grid/crs/install/crsconfig_params
2010-02-02 11:58:07: platform_family=unix
2010-02-02 11:58:07: srvctl_trc_suff=0
2010-02-02 11:58:07: unlock_crshome=
2010-02-02 11:58:07: user_is_superuser=1
2010-02-02 11:58:07: ### Printing of configuration values complete ###
2010-02-02 11:58:07: Oracle CRS stack is not configured yet
2010-02-02 11:58:07: CRS is not yet configured. Hence, will proceed to configure CRS
2010-02-02 11:58:07: Cluster-wide one-time actions... Done!
2010-02-02 11:58:17: set owner/group of OCR path
2010-02-02 11:58:17: Oracle CRS home = /u01/app/11.2.0/grid
2010-02-02 11:58:17: Host name = vis
2010-02-02 11:58:17: CRS user = oracle
2010-02-02 11:58:17: Oracle CRS home = /u01/app/11.2.0/grid
2010-02-02 11:58:17: GPnP host = vis
2010-02-02 11:58:17: Oracle GPnP home = /u01/app/11.2.0/grid/gpnp
2010-02-02 11:58:17: Oracle GPnP local home = /u01/app/11.2.0/grid/gpnp/vis
2010-02-02 11:58:17: GPnP directories verified.
2010-02-02 11:58:17: Checking to see if Oracle CRS stack is already configured
2010-02-02 11:58:17: Oracle CRS stack is not configured yet
2010-02-02 11:58:17: ---Checking local gpnp setup...
2010-02-02 11:58:18: The setup file "/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml" does not exist
2010-02-02 11:58:18: The setup file "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer/cwallet.sso" does not exist
2010-02-02 11:58:18: The setup file "/u01/app/11.2.0/grid/gpnp/vis/wallets/prdr/cwallet.sso" does not exist
2010-02-02 11:58:18: chk gpnphome /u01/app/11.2.0/grid/gpnp/vis: profile_ok 0 wallet_ok 0 r/o_wallet_ok 0
2010-02-02 11:58:18: chk gpnphome /u01/app/11.2.0/grid/gpnp/vis: INVALID (bad profile/wallet)
2010-02-02 11:58:18: ---Checking cluster-wide gpnp setup...
2010-02-02 11:58:18: The setup file "/u01/app/11.2.0/grid/gpnp/profiles/peer/profile.xml" does not exist
2010-02-02 11:58:18: The setup file "/u01/app/11.2.0/grid/gpnp/wallets/peer/cwallet.sso" does not exist
2010-02-02 11:58:18: The setup file "/u01/app/11.2.0/grid/gpnp/wallets/prdr/cwallet.sso" does not exist
2010-02-02 11:58:18: chk gpnphome /u01/app/11.2.0/grid/gpnp: profile_ok 0 wallet_ok 0 r/o_wallet_ok 0
2010-02-02 11:58:18: chk gpnphome /u01/app/11.2.0/grid/gpnp: INVALID (bad profile/wallet)
2010-02-02 11:58:18: gpnp setup checked: local valid? 0 cluster-wide valid? 0
2010-02-02 11:58:18: gpnp setup: NONE
2010-02-02 11:58:18: GPNP configuration required
2010-02-02 11:58:18: Validating for SI-CSS configuration
2010-02-02 11:58:18: Retrieving OCR main disk location
2010-02-02 11:58:18: Opening file OCRCONFIG
2010-02-02 11:58:18: Value () is set for key=ocrconfig_loc
2010-02-02 11:58:18: Unable to retrieve ocr disk info
2010-02-02 11:58:18: Checking to see if any 9i GSD is up
2010-02-02 11:58:18: libskgxnBase_lib = /etc/ORCLcluster/oracm/lib/libskgxn2.so
2010-02-02 11:58:18: libskgxn_lib = /opt/ORCLcluster/lib/libskgxn2.so
2010-02-02 11:58:18: SKGXN library file does not exists
2010-02-02 11:58:18: OLR location = /u01/app/11.2.0/grid/cdata/vis.olr
2010-02-02 11:58:18: Oracle CRS Home = /u01/app/11.2.0/grid
2010-02-02 11:58:18: Validating /etc/oracle/olr.loc file for OLR location /u01/app/11.2.0/grid/cdata/vis.olr
2010-02-02 11:58:18: /etc/oracle/olr.loc already exists. Backing up /etc/oracle/olr.loc to /etc/oracle/olr.loc.orig
2010-02-02 11:58:18: Oracle CRS home = /u01/app/11.2.0/grid
2010-02-02 11:58:18: Oracle cluster name = rac-scan
2010-02-02 11:58:18: OCR locations = /u01/shared_config/ocr_configuration
2010-02-02 11:58:18: Validating OCR
2010-02-02 11:58:18: Retrieving OCR location used by previous installations
2010-02-02 11:58:18: Opening file OCRCONFIG
2010-02-02 11:58:18: Value () is set for key=ocrconfig_loc
2010-02-02 11:58:18: Opening file OCRCONFIG
2010-02-02 11:58:18: Value () is set for key=ocrmirrorconfig_loc
2010-02-02 11:58:18: Opening file OCRCONFIG
2010-02-02 11:58:18: Value () is set for key=ocrconfig_loc3
2010-02-02 11:58:18: Opening file OCRCONFIG
2010-02-02 11:58:18: Value () is set for key=ocrconfig_loc4
2010-02-02 11:58:18: Opening file OCRCONFIG
2010-02-02 11:58:18: Value () is set for key=ocrconfig_loc5
2010-02-02 11:58:18: Checking if OCR sync file exists
2010-02-02 11:58:18: No need to sync OCR file
2010-02-02 11:58:18: OCR_LOCATION=/u01/shared_config/ocr_configuration
2010-02-02 11:58:18: OCR_MIRROR_LOCATION=
2010-02-02 11:58:18: OCR_MIRROR_LOC3=
2010-02-02 11:58:18: OCR_MIRROR_LOC4=
2010-02-02 11:58:19: OCR_MIRROR_LOC5=
2010-02-02 11:58:19: Current OCR location=
2010-02-02 11:58:19: Current OCR mirror location=
2010-02-02 11:58:19: Current OCR mirror loc3=
2010-02-02 11:58:19: Current OCR mirror loc4=
2010-02-02 11:58:19: Current OCR mirror loc5=
2010-02-02 11:58:19: Verifying current OCR settings with user entered values
2010-02-02 11:58:19: Setting OCR locations in /etc/oracle/ocr.loc
2010-02-02 11:58:19: Validating OCR locations in /etc/oracle/ocr.loc
2010-02-02 11:58:19: Checking for existence of /etc/oracle/ocr.loc
2010-02-02 11:58:19: Backing up /etc/oracle/ocr.loc to /etc/oracle/ocr.loc.orig
2010-02-02 11:58:19: Setting ocr location /u01/shared_config/ocr_configuration
2010-02-02 11:58:19: Creating or upgrading Oracle Local Registry (OLR)
2010-02-02 11:58:20: OLR successfully created or upgraded
2010-02-02 11:58:20: /u01/app/11.2.0/grid/bin/clscfg -localadd
2010-02-02 11:58:21: Keys created in the OLR successfully
2010-02-02 11:58:21: GPnP setup state: none
2010-02-02 11:58:21: Creating local GPnP setup for clustered node...
2010-02-02 11:58:21: Oracle CRS home = /u01/app/11.2.0/grid
2010-02-02 11:58:21: Oracle GPnP wallets home = /u01/app/11.2.0/grid/gpnp/vis/wallets
2010-02-02 11:58:21: Checking if GPnP setup exists
2010-02-02 11:58:21: /u01/app/11.2.0/grid/gpnp/vis/wallets/peer/cwallet.sso wallet must be created
2010-02-02 11:58:21: Removing old wallets/certificates, if any
2010-02-02 11:58:21: Creating GPnP Root Wallet...
2010-02-02 11:58:21: /u01/app/11.2.0/grid/bin/orapki wallet create -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/root" -pwd gpnp_wallet1 -nologo
2010-02-02 11:58:22: Creating GPnP Root Certificate...
2010-02-02 11:58:22: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/root" -pwd gpnp_wallet1 -self_signed -dn "CN=GPnP_root" -keysize 1024 -validity 9999 -nologo
2010-02-02 11:58:24: Exporting GPnP Root Certificate...
2010-02-02 11:58:24: /u01/app/11.2.0/grid/bin/orapki wallet export -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/root" -pwd gpnp_wallet1 -dn "CN=GPnP_root" -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/root/b64certificate.txt" -nologo
2010-02-02 11:58:25: Creating GPnP Peer Wallet...
2010-02-02 11:58:25: /u01/app/11.2.0/grid/bin/orapki wallet create -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer" -pwd gpnp_wallet1 -auto_login -nologo
2010-02-02 11:58:25: Creating GPnP Profile Reader Wallet...
2010-02-02 11:58:25: /u01/app/11.2.0/grid/bin/orapki wallet create -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/prdr" -pwd gpnp_wallet1 -auto_login -nologo
2010-02-02 11:58:26: Creating GPnP PA Wallet...
2010-02-02 11:58:26: /u01/app/11.2.0/grid/bin/orapki wallet create -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa" -pwd gpnp_wallet1 -auto_login -nologo
2010-02-02 11:58:27: Adding private key to GPnP Peer Wallet...
2010-02-02 11:58:27: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer" -pwd gpnp_wallet1 -dn "CN=GPnP_peer" -keysize 1024 -nologo
2010-02-02 11:58:28: Adding private key to GPnP PA Wallet...
2010-02-02 11:58:28: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa" -pwd gpnp_wallet1 -dn "CN=GPnP_pa" -keysize 1024 -nologo
2010-02-02 11:58:29: Creating certificate request for GPnP Peer Wallet...
2010-02-02 11:58:29: /u01/app/11.2.0/grid/bin/orapki wallet export -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer" -pwd gpnp_wallet1 -dn "CN=GPnP_peer" -request "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer/certreq.txt" -nologo
2010-02-02 11:58:30: Creating certificate request for GPnP PA Wallet...
2010-02-02 11:58:30: /u01/app/11.2.0/grid/bin/orapki wallet export -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa" -pwd gpnp_wallet1 -dn "CN=GPnP_pa" -request "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa/certreq.txt" -nologo
2010-02-02 11:58:31: Creating certificate for GPnP Peer Wallet...
2010-02-02 11:58:31: /u01/app/11.2.0/grid/bin/orapki cert create -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/root" -pwd gpnp_wallet1 -request "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer/certreq.txt" -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer/cert.txt" -validity 9999 -nologo
2010-02-02 11:58:32: Creating certificate for GPnP PA Wallet...
2010-02-02 11:58:32: /u01/app/11.2.0/grid/bin/orapki cert create -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/root" -pwd gpnp_wallet1 -request "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa/certreq.txt" -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa/cert.txt" -validity 9999 -nologo
2010-02-02 11:58:33: Adding Root Certificate TP to GPnP Peer Wallet...
2010-02-02 11:58:33: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer" -pwd gpnp_wallet1 -trusted_cert -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/root/b64certificate.txt" -nologo
2010-02-02 11:58:34: Adding Root Certificate TP to GPnP Profile Reader Wallet...
2010-02-02 11:58:34: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/prdr" -pwd gpnp_wallet1 -trusted_cert -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/root/b64certificate.txt" -nologo
2010-02-02 11:58:34: Adding Root Certificate TP to GPnP PA Wallet...
2010-02-02 11:58:34: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa" -pwd gpnp_wallet1 -trusted_cert -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/root/b64certificate.txt" -nologo
2010-02-02 11:58:35: Adding PA Certificate as a TP into a GPnP Peer Wallet...
2010-02-02 11:58:35: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer" -pwd gpnp_wallet1 -trusted_cert -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa/cert.txt" -nologo
2010-02-02 11:58:36: Adding peer Certificate as a TP into a GPnP PA Wallet...
2010-02-02 11:58:36: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa" -pwd gpnp_wallet1 -trusted_cert -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer/cert.txt" -nologo
2010-02-02 11:58:37: Adding PA Certificate as a TP into a GPnP Profile Reader Wallet...
2010-02-02 11:58:37: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/prdr" -pwd gpnp_wallet1 -trusted_cert -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa/cert.txt" -nologo
2010-02-02 11:58:38: Adding peer Certificate as a TP into a GPnP Profile Reader Wallet...
2010-02-02 11:58:38: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/prdr" -pwd gpnp_wallet1 -trusted_cert -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer/cert.txt" -nologo
2010-02-02 11:58:39: Adding PA Certificate as a TP into a GPnP Peer Wallet...
2010-02-02 11:58:39: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer" -pwd gpnp_wallet1 -user_cert -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer/cert.txt" -nologo
2010-02-02 11:58:40: Adding peer Certificate as a TP into a GPnP PA Wallet...
2010-02-02 11:58:40: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa" -pwd gpnp_wallet1 -user_cert -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa/cert.txt" -nologo
2010-02-02 11:58:41: GPnP Wallets ownership/permissions successfully set.
2010-02-02 11:58:41: GPnP Wallets successfully created.
2010-02-02 11:58:41: <--- GPnP wallets successfully created
2010-02-02 11:58:41: Creating GPnP peer profile --->
2010-02-02 11:58:41: Oracle CRS home = /u01/app/11.2.0/grid
2010-02-02 11:58:41: Oracle GPnP profiles home = /u01/app/11.2.0/grid/gpnp/vis/profiles
2010-02-02 11:58:41: Oracle GPnP profiles parameters:
2010-02-02 11:58:41: paloc==
2010-02-02 11:58:41: cname=rac-scan=
2010-02-02 11:58:41: cssdisco=/u01/shared_config/voting_disk=
2010-02-02 11:58:41: cssld=400=
2010-02-02 11:58:41: asmdisco==
2010-02-02 11:58:41: asmspf==
2010-02-02 11:58:41: netlst="eth0"/10.8.0.0:public,"eth1"/192.168.0.0:cluster_interconnect=
2010-02-02 11:58:41: ocrid==
2010-02-02 11:58:41: clusterguid==
2010-02-02 11:58:41: Checking if GPnP setup exists
2010-02-02 11:58:41: /u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml profile must be created
2010-02-02 11:58:41: OCRID is not available, hence not set in GPnP Profile
2010-02-02 11:58:42: ClusterGUID is not available, hence not set in GPnP Profile
2010-02-02 11:58:42: gpnptool: run /u01/app/11.2.0/grid/bin/gpnptool create -o="/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml" -ovr -prf -prf_sq=1 -prf_cn=rac-scan -prf_pa="" -hnet=gen -gen:hnet_nm="*" -gen:net=net1 -net1:net_ip="10.8.0.0" -net1:net_ada="eth0" -net1:net_use="public" -gen:net=net2 -net2:net_ip="192.168.0.0" -net2:net_ada="eth1" -net2:net_use="cluster_interconnect" -css=css -css:css_dis="/u01/shared_config/voting_disk" -css:css_ld=400 -asm=asm -asm:asm_dis="++no-value-at-profile-creation--never-updated-through-ASM++" -asm:asm_spf=""
2010-02-02 11:58:42: Running as user oracle: /u01/app/11.2.0/grid/bin/gpnptool create -o="/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml" -ovr -prf -prf_sq=1 -prf_cn=rac-scan -prf_pa="" -hnet=gen -gen:hnet_nm="*" -gen:net=net1 -net1:net_ip="10.8.0.0" -net1:net_ada="eth0" -net1:net_use="public" -gen:net=net2 -net2:net_ip="192.168.0.0" -net2:net_ada="eth1" -net2:net_use="cluster_interconnect" -css=css -css:css_dis="/u01/shared_config/voting_disk" -css:css_ld=400 -asm=asm -asm:asm_dis="++no-value-at-profile-creation--never-updated-through-ASM++" -asm:asm_spf=""
2010-02-02 11:58:42: s_run_as_user2: Running /bin/su oracle -c ' /u01/app/11.2.0/grid/bin/gpnptool create -o="/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml" -ovr -prf -prf_sq=1 -prf_cn=rac-scan -prf_pa="" -hnet=gen -gen:hnet_nm="*" -gen:net=net1 -net1:net_ip="10.8.0.0" -net1:net_ada="eth0" -net1:net_use="public" -gen:net=net2 -net2:net_ip="192.168.0.0" -net2:net_ada="eth1" -net2:net_use="cluster_interconnect" -css=css -css:css_dis="/u01/shared_config/voting_disk" -css:css_ld=400 -asm=asm -asm:asm_dis="++no-value-at-profile-creation--never-updated-through-ASM++" -asm:asm_spf="" '
2010-02-02 11:58:42: Removing file /tmp/fileXUKYkK
2010-02-02 11:58:42: Successfully removed file: /tmp/fileXUKYkK
2010-02-02 11:58:42: /bin/su successfully executed
2010-02-02 11:58:42: gpnptool: rc=0
2010-02-02 11:58:42: gpnptool output:
Resulting profile written to "/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml".
Success.
2010-02-02 11:58:42: gpnptool: run /u01/app/11.2.0/grid/bin/gpnptool sign -p="/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml" -o="/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml" -ovr -w="file:/u01/app/11.2.0/grid/gpnp/vis/wallets/peer" -rmws
2010-02-02 11:58:42: Running as user oracle: /u01/app/11.2.0/grid/bin/gpnptool sign -p="/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml" -o="/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml" -ovr -w="file:/u01/app/11.2.0/grid/gpnp/vis/wallets/peer" -rmws
2010-02-02 11:58:42: s_run_as_user2: Running /bin/su oracle -c ' /u01/app/11.2.0/grid/bin/gpnptool sign -p="/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml" -o="/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml" -ovr -w="file:/u01/app/11.2.0/grid/gpnp/vis/wallets/peer" -rmws '
2010-02-02 11:58:43: Removing file /tmp/file4E7Vnj
2010-02-02 11:58:43: Successfully removed file: /tmp/file4E7Vnj
2010-02-02 11:58:43: /bin/su successfully executed
2010-02-02 11:58:43: gpnptool: rc=0
2010-02-02 11:58:43: gpnptool output:
Resulting profile written to "/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml".
Success.
2010-02-02 11:58:43: GPnP peer profile create successfully completed.
2010-02-02 11:58:43: <--- GPnP peer profile successfully created
2010-02-02 11:58:43: GPnP local setup successfully created
2010-02-02 11:58:43: Registering ohasd
2010-02-02 11:58:43: init file = /u01/app/11.2.0/grid/crs/init/init.ohasd
2010-02-02 11:58:43: Copying file /u01/app/11.2.0/grid/crs/init/init.ohasd to /etc/init.d directory
2010-02-02 11:58:43: Setting init.ohasd permission in /etc/init.d directory
2010-02-02 11:58:43: init file = /u01/app/11.2.0/grid/crs/init/ohasd
2010-02-02 11:58:43: Copying file /u01/app/11.2.0/grid/crs/init/ohasd to /etc/init.d directory
2010-02-02 11:58:43: Setting ohasd permission in /etc/init.d directory
2010-02-02 11:58:43: Removing "/etc/rc.d/rc3.d/S96ohasd"
2010-02-02 11:58:43: Removing file /etc/rc.d/rc3.d/S96ohasd
2010-02-02 11:58:43: Failure with return code 1 from command rm /etc/rc.d/rc3.d/S96ohasd
2010-02-02 11:58:43: Failed to remove file:
2010-02-02 11:58:43: Creating a link "/etc/rc.d/rc3.d/S96ohasd" pointing to /etc/init.d/ohasd
2010-02-02 11:58:43: Removing "/etc/rc.d/rc5.d/S96ohasd"
2010-02-02 11:58:43: Removing file /etc/rc.d/rc5.d/S96ohasd
2010-02-02 11:58:43: Failure with return code 1 from command rm /etc/rc.d/rc5.d/S96ohasd
2010-02-02 11:58:43: Failed to remove file:
2010-02-02 11:58:43: Creating a link "/etc/rc.d/rc5.d/S96ohasd" pointing to /etc/init.d/ohasd
2010-02-02 11:58:43: Removing "/etc/rc.d/rc0.d/K19ohasd"
2010-02-02 11:58:43: Removing file /etc/rc.d/rc0.d/K19ohasd
2010-02-02 11:58:43: Failure with return code 1 from command rm /etc/rc.d/rc0.d/K19ohasd
2010-02-02 11:58:43: Failed to remove file:
2010-02-02 11:58:43: Creating a link "/etc/rc.d/rc0.d/K19ohasd" pointing to /etc/init.d/ohasd
2010-02-02 11:58:43: Removing "/etc/rc.d/rc1.d/K19ohasd"
2010-02-02 11:58:43: Removing file /etc/rc.d/rc1.d/K19ohasd
2010-02-02 11:58:43: Failure with return code 1 from command rm /etc/rc.d/rc1.d/K19ohasd
2010-02-02 11:58:44: Failed to remove file:
2010-02-02 11:58:44: Creating a link "/etc/rc.d/rc1.d/K19ohasd" pointing to /etc/init.d/ohasd
2010-02-02 11:58:44: Removing "/etc/rc.d/rc2.d/K19ohasd"
2010-02-02 11:58:44: Removing file /etc/rc.d/rc2.d/K19ohasd
2010-02-02 11:58:44: Failure with return code 1 from command rm /etc/rc.d/rc2.d/K19ohasd
2010-02-02 11:58:44: Failed to remove file:
2010-02-02 11:58:44: Creating a link "/etc/rc.d/rc2.d/K19ohasd" pointing to /etc/init.d/ohasd
2010-02-02 11:58:44: Removing "/etc/rc.d/rc4.d/K19ohasd"
2010-02-02 11:58:44: Removing file /etc/rc.d/rc4.d/K19ohasd
2010-02-02 11:58:44: Failure with return code 1 from command rm /etc/rc.d/rc4.d/K19ohasd
2010-02-02 11:58:44: Failed to remove file:
2010-02-02 11:58:44: Creating a link "/etc/rc.d/rc4.d/K19ohasd" pointing to /etc/init.d/ohasd
2010-02-02 11:58:44: Removing "/etc/rc.d/rc6.d/K19ohasd"
2010-02-02 11:58:44: Removing file /etc/rc.d/rc6.d/K19ohasd
2010-02-02 11:58:44: Failure with return code 1 from command rm /etc/rc.d/rc6.d/K19ohasd
2010-02-02 11:58:44: Failed to remove file:
2010-02-02 11:58:44: Creating a link "/etc/rc.d/rc6.d/K19ohasd" pointing to /etc/init.d/ohasd
2010-02-02 11:58:44: The file ohasd has been successfully linked to the RC directories
2010-02-02 11:58:44: Starting ohasd
2010-02-02 11:58:44: itab entries=
2010-02-02 11:58:49: Created backup /etc/inittab.no_crs
2010-02-02 11:58:49: Appending to /etc/inittab.tmp:
2010-02-02 11:58:50: h1:35:respawn:/etc/init.d/init.ohasd run >/dev/null 2>&1 </dev/null
2010-02-02 11:58:50: Done updating /etc/inittab.tmp
2010-02-02 11:58:50: Saved /etc/inittab.crs
2010-02-02 11:58:50: Installed new /etc/inittab
2010-02-02 11:58:55: ohasd is starting
2010-02-02 11:58:55: Checking ohasd
2010-02-02 11:58:55: ohasd started successfully
2010-02-02 11:58:55: Creating CRS resources and dependencies
2010-02-02 11:58:55: Configuring HASD
2010-02-02 11:58:55: Registering type ora.daemon.type
2010-02-02 11:58:59: Registering type ora.mdns.type
2010-02-02 11:59:00: Registering type ora.gpnp.type
2010-02-02 11:59:01: Registering type ora.gipc.type
2010-02-02 11:59:02: Registering type ora.cssd.type
2010-02-02 11:59:04: Registering type ora.cssdmonitor.type
2010-02-02 11:59:07: Registering type ora.crs.type
2010-02-02 11:59:08: Registering type ora.evm.type
2010-02-02 11:59:09: Registering type ora.ctss.type
2010-02-02 11:59:10: Registering type ora.asm.type
2010-02-02 11:59:13: Registering type ora.drivers.acfs.type
2010-02-02 11:59:14: Registering type ora.diskmon.type
2010-02-02 11:59:34: ADVM/ACFS is configured
2010-02-02 11:59:35: Successfully created CRS resources for cluster daemon and ASM
2010-02-02 11:59:35: Checking if initial configuration has been performed
2010-02-02 11:59:35: Starting CSS in exclusive mode
2010-02-02 12:00:04: CRS-2672: Attempting to start 'ora.gipcd' on 'vis'
2010-02-02 12:00:04: CRS-2672: Attempting to start 'ora.mdnsd' on 'vis'
2010-02-02 12:00:04: CRS-2676: Start of 'ora.gipcd' on 'vis' succeeded
2010-02-02 12:00:04: CRS-2676: Start of 'ora.mdnsd' on 'vis' succeeded
2010-02-02 12:00:04: CRS-2672: Attempting to start 'ora.gpnpd' on 'vis'
2010-02-02 12:00:04: CRS-2676: Start of 'ora.gpnpd' on 'vis' succeeded
2010-02-02 12:00:04: CRS-2672: Attempting to start 'ora.cssdmonitor' on 'vis'
2010-02-02 12:00:04: CRS-2676: Start of 'ora.cssdmonitor' on 'vis' succeeded
2010-02-02 12:00:04: CRS-2672: Attempting to start 'ora.cssd' on 'vis'
2010-02-02 12:00:04: CRS-2672: Attempting to start 'ora.diskmon' on 'vis'
2010-02-02 12:00:04: CRS-2676: Start of 'ora.diskmon' on 'vis' succeeded
2010-02-02 12:00:04: CRS-2676: Start of 'ora.cssd' on 'vis' succeeded
2010-02-02 12:00:04: Querying for existing CSS voting disks
2010-02-02 12:00:04: Performing initial configuration for cluster
2010-02-02 12:00:51: Start of resource "ora.ctssd -init" Succeeded
2010-02-02 12:00:51: Creating or upgrading OCR keys
2010-02-02 12:00:51: Command return code of 255 (65280) from command: /u01/app/11.2.0/grid/bin/ocrconfig -upgrade oracle oinstall
2010-02-02 12:00:51: Failed to create Oracle Cluster Registry configuration, rc 255
2010-02-02 12:00:51: Exiting exclusive mode
2010-02-02 12:00:51: Command return code of 1 (256) from command: /u01/app/11.2.0/grid/bin/crsctl stop resource ora.crsd -init
2010-02-02 12:00:51: Stop of resource "ora.crsd -init" failed
2010-02-02 12:00:51: Failed to stop CRSD
2010-02-02 12:01:20: Initial cluster configuration failed. See /u01/app/11.2.0/grid/cfgtoollogs/crsconfig/rootcrs_vis.log for detailsHi,
I am trying to setup Oracle 11gR2 RAC setup on RHEL 5.4 64-bit machine, during grid installation i am also getting the same error.
2010-07-12 03:12:42: Removing file /etc/rc.d/rc6.d/K19ohasd
2010-07-12 03:12:42: Failure with return code 1 from command rm /etc/rc.d/rc6.d/K19ohasd
2010-07-12 03:12:42: Failed to remove file:
2010-07-12 03:12:42: Creating a link "/etc/rc.d/rc6.d/K19ohasd" pointing to /etc/init.d/ohasd
2010-07-12 03:12:42: The file ohasd has been successfully linked to the RC directories
2010-07-12 03:12:42: Starting ohasd
2010-07-12 03:12:42: itab entries=
2010-07-12 03:12:47: Created backup /etc/inittab.no_crs
2010-07-12 03:12:47: Appending to /etc/inittab.tmp:
2010-07-12 03:12:47: h1:35:respawn:/etc/init.d/init.ohasd run >/dev/null 2>&1 </dev/null
2010-07-12 03:12:47: Done updating /etc/inittab.tmp
2010-07-12 03:12:47: Saved /etc/inittab.crs
2010-07-12 03:12:47: Installed new /etc/inittab
2010-07-12 03:13:03: ohasd is starting
2010-07-12 03:13:03: Checking ohasd
2010-07-12 03:13:03: ohasd started successfully
2010-07-12 03:13:03: Creating CRS resources and dependencies
2010-07-12 03:13:03: Configuring HASD
2010-07-12 03:13:03: Registering type ora.daemon.type
2010-07-12 03:13:04: Registering type ora.mdns.type
2010-07-12 03:13:04: Registering type ora.gpnp.type
2010-07-12 03:13:04: Registering type ora.gipc.type
2010-07-12 03:13:05: Registering type ora.cssd.type
2010-07-12 03:13:05: Registering type ora.cssdmonitor.type
2010-07-12 03:13:06: Registering type ora.crs.type
2010-07-12 03:13:06: Registering type ora.evm.type
2010-07-12 03:13:07: Registering type ora.ctss.type
2010-07-12 03:13:07: Registering type ora.asm.type
2010-07-12 03:13:08: Registering type ora.drivers.acfs.type
2010-07-12 03:13:08: Registering type ora.diskmon.type
2010-07-12 03:13:35: ADVM/ACFS is configured
2010-07-12 03:13:35: Successfully created CRS resources for cluster daemon and ASM
2010-07-12 03:13:35: Checking if initial configuration has been performed
2010-07-12 03:13:35: Starting CSS in exclusive mode
2010-07-12 03:14:04: CRS-2672: Attempting to start 'ora.gipcd' on 'lodvmrhn3'
2010-07-12 03:14:04: CRS-2672: Attempting to start 'ora.mdnsd' on 'lodvmrhn3'
2010-07-12 03:14:04: CRS-2676: Start of 'ora.mdnsd' on 'lodvmrhn3' succeeded
2010-07-12 03:14:04: CRS-2676: Start of 'ora.gipcd' on 'lodvmrhn3' succeeded
2010-07-12 03:14:04: CRS-2672: Attempting to start 'ora.gpnpd' on 'lodvmrhn3'
2010-07-12 03:14:04: CRS-2676: Start of 'ora.gpnpd' on 'lodvmrhn3' succeeded
2010-07-12 03:14:04: CRS-2672: Attempting to start 'ora.cssdmonitor' on 'lodvmrhn3'
2010-07-12 03:14:04: CRS-2676: Start of 'ora.cssdmonitor' on 'lodvmrhn3' succeeded
2010-07-12 03:14:04: CRS-2672: Attempting to start 'ora.cssd' on 'lodvmrhn3'
2010-07-12 03:14:04: CRS-2672: Attempting to start 'ora.diskmon' on 'lodvmrhn3'
2010-07-12 03:14:04: CRS-2676: Start of 'ora.diskmon' on 'lodvmrhn3' succeeded
2010-07-12 03:14:04: CRS-2676: Start of 'ora.cssd' on 'lodvmrhn3' succeeded
2010-07-12 03:14:04: Querying for existing CSS voting disks
2010-07-12 03:14:05: Performing initial configuration for cluster
2010-07-12 03:14:06: Start of resource "ora.ctssd -init" Succeeded
2010-07-12 03:14:06: Creating or upgrading OCR keys
2010-07-12 03:14:06: Command return code of 255 (65280) from command: /u01/app/11.2.0/grid/bin/ocrconfig -upgrade oracle oinstall
2010-07-12 03:14:06: Failed to create Oracle Cluster Registry configuration, rc 255
2010-07-12 03:14:06: Exiting exclusive mode
2010-07-12 03:14:06: Command return code of 1 (256) from command: /u01/app/11.2.0/grid/bin/crsctl stop resource ora.crsd -init
2010-07-12 03:14:06: Stop of resource "ora.crsd -init" failed
2010-07-12 03:14:06: Failed to stop CRSD
2010-07-12 03:14:34: Initial cluster configuration failed. See /u01/app/11.2.0/grid/cfgtoollogs/crsconfig/rootcrs_lodvmrhn3.log for details
Please hel me to resole the issue.
I have followed exact steps mentioned in the http://www.oracle-base.com/articles/11g/OracleDB11gR2RACInstallationOnLinuxUsingNFS.php -
Custom action with XML type input and output parameter.
Hi,
I want to develop custom action with xml type input and/or output parameter.
Is there sample code for java side. How is the definition of input and/or output parameter and set/get methods?
does it need special .jar file to develop custom action like this?
Thanks.Cemil - yes, you can use XML data types. Use the class
com.sap.lhcommon.xml.XMLDataType
for your parameter type. Here is a snippet from a custom action we use to log XML (instead of just returning the #text node like the default logger does):
public class XMLLogger extends ActionReflectionBase
private String source;
private String eventType;
private String textMessage;
private XMLDataType xmlMessage;
public XMLLogger()
log = new Logger("UserLog");
source = DEFAULT_SOURCE;
eventType = TYPE_INFO;
textMessage = "";
xmlMessage = new XMLDataType();
public XMLDataType getXmlMessage()
return xmlMessage;
public void setXmlMessage(XMLDataType xmlMessage)
this.xmlMessage = xmlMessage;
public void Invoke(Transaction transaction, ILog ilog)
StringBuffer sb = new StringBuffer();
sb.append('[');
sb.append(source);
sb.append("] ");
sb.append(textMessage);
sb.append(XMLUtils.convertXmlToString(xmlMessage));
XMLUtils is a helper class we wrote - it's just a bunch of standard Java XML boilerplate code. The important part you need to know is XMLDataType.getDocument() will return an org.w3c.dom.Document.
I hope that was enough information to help.
-tim -
Associative Array with more than one field - retrieving as output parameter
Hello,
I'm developing an C# Application that is showing a datagrid with results from a PL/SQL procedure inside a Package.
The .net project is in .net 4 and the DB is an oracle 10g.
I have read the odp.net sample about the associative array. I could successfully pass as an input parameter a string[] and dealing with it inside my PL/SQL procedure.
Now it become more complex to me because I would like to return an associative array defined like this :
TYPE r_FinalExtract IS RECORD
RecordmyTable myTable%ROWTYPE,
Tel1 varchar2(25),
Tel1Libelle varchar2(50),
Tel2 varchar2(25),
Tel2Libelle varchar2(50),
Tel3 varchar2(25),
Tel3Libelle varchar2(50),
Tel4 varchar2(25),
Tel4Libelle varchar2(50),
Tel5 varchar2(25),
Tel5Libelle varchar2(50),
Email1 varchar2(50),
Email1Libelle varchar2(50),
Email2 varchar2(50),
Email2Libelle varchar2(50)
TYPE t_FinalExtract IS TABLE OF r_FinalExtract INDEX BY BINARY_INTEGER;
You can guess my PL/SQL stored procedure is filling this collection.
The spec of my procedure :
PROCEDURE P_SELECTDATA( ptab_ListRef IN t_AssocArrayVarchar2, ptab_Result OUT t_FinalExtract );
Unfortunately, in my .net project, I don't know how to deal with that.
I tryed to add p_Result as an output parameter but you have to define the OracleCollectionType for that parameter and the array type is not the good one because my t_FinalExtract is not a simple array...
I searched over the internet and the only one thread I could find is someone who was doing like me... and finally reply to his own thread 3 months later and said that he had to create CSV lines and return a table of varchar2...
This is what I will do because I'm loosing time for finding the way to do it with my associative array, but if someone has the solution I would be glad to read it.
Thanks in advance.For PL/SQL records, I would recommend using User-Defined Types (UDTs), rather than associative arrays.
You can read more on how to use ODP.NET UDTs here:
http://docs.oracle.com/cd/E20434_01/doc/win.112/e23174/featUDTs.htm#CJAGCAID
Strictly speaking, ODP.NET doesn't support PL/SQL Records per se. Instead, ODP.NET supports building any generic UDT in the Oracle DB, which covers the effective functionality of a Record.
If you want to walk through the process of taking a sample DB UDT, generating a .NET custom class, then passing an instance between DB and application, here's a tutorial that shows you how to do that:
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/dotnet/userdefinedtypes/userDefinedTypes.htm -
Calling Stored Procedure with Boolean Output Parameter
Hi all,
I'm running into an issue (or is it a BUG) when calling a Database Stored Procedure that has an output parameter of the boolean type.
procedure proc(p_text in varchar2, p_result out boolean)
is
.....I use the following 'standard' code (developer guide 36-19 36-20) to invoke this procedure from my application module.
try {
// 1. Define the PL/SQL block for the statement to invoke
String stmt = "begin proc(?,?); end;";
// 2. Create the CallableStatement for the PL/SQL block
st = getDBTransaction().createCallableStatement(stmt, 0);
// 3. Register the positions and types of the OUT parameters
st.registerOutParameter(2, Types.BOOLEAN);
// 4. Set the bind values of the IN parameters
st.setObject(1, "Some text");
// 5. Execute the statement
st.executeUpdate();
..............................As soon as 'st.registerOutParameter(2, Types.BOOLEAN);' is invoked I run into a SQLexception. "Invalid ColumnType: 16". Obviously 16 refers to Types.BOOLEAN.
[edit by Luc]
SOLUTION / WORKAROUND
To answer my own question.
It looks like BOOLEAN output parameters are not supported. I just Read "Appendix D Troubleshooting" of the Oracle® Database JDBC Developer's Guide and Reference 10g Release 2 (10.2).
I found that JDBC drivers do not support the passing of BOOLEAN parameters to PL/SQL stored procedures. If a PL/SQL procedure contains BOOLEAN values, you can work around the restriction by wrapping the PL/SQL procedure with a second PL/SQL procedure that accepts the argument as an INT and passes it to the first stored procedure. When the second procedure is called, the server performs the conversion from INT to BOOLEAN.
I'm not very happy with this but I guess I've no choice.
Regards Luc
Edited by: lucbors on Nov 30, 2010 10:37 AMfyi
Related to the solution/workaround posted by Luc.
see "Do Oracle's JDBC drivers support PL/SQL tables/result sets/records/booleans? "
at http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#34_05
regards
Jan Vervecken -
VARRAY as Stored Proc output parameter
VARRAY as Stored Proc output parameter
I have an Oracle VARRAY data type declared as follows:
CREATE TYPE NUMBER_ARRAY AS VARRAY(100) OF NUMBER;
I have a stored procedure which takes a single input and
returns a NUMBER_ARRAY as output:
CREATE OR REPLACE PROCEDURE one_in_number_array_out(
IN_PARAM IN NUMBER,
OUT_NUMBER_ARRAY OUT NUMBER_ARRAY )
IS
BEGIN
-- OUT_NUMBER_ARRAY getting populated here
END one_in_number_array_out;
I want to be able hit this proc using TopLink StoreProcedureCall objects and retrieve through a map.
I thought I would be able to do something like:
public void execute() {
StoredProcedureCall call = new StoredProcedureCall();
call.setProcedureName( getStoredProcedureName() );
call.addNamedArgumentValue("IN_NUMBER_PARAM", new Double(324) );
call.addNamedOutputArgument("OUT_NUMBER_ARRAY", "numberArray"); // use an alias
ClientSession clientSession = .....getClientSession();
// EXCEPTION OCCURS on following call:
Map row = (Map) clientSession.executeSelectingCall( call ).firstElement();
Object numberArray = row.get( "numberArray" );
System.out.println("numberArray = " + numberArray);
But, when I call the stored proc I get the following stack trace:
LOCAL EXCEPTION STACK:
EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DatabaseException
EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'ONE_IN_NUMBER_ARRAY_OUT'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
INTERNAL EXCEPTION: java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'ONE_IN_NUMBER_ARRAY_OUT'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
ERROR CODE: 6550
at oracle.toplink.exceptions.DatabaseException.sqlException(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown Source)
at oracle.toplink.threetier.ServerSession.executeCall(Unknown Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeSelectCall(Unknown Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeSelect(Unknown Source)
at oracle.toplink.queryframework.DataReadQuery.executeNonCursor(Unknown Source)
at oracle.toplink.queryframework.DataReadQuery.execute(Unknown Source)
at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
at oracle.toplink.queryframework.ReadQuery.execute(Unknown Source)
at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
at oracle.toplink.threetier.ServerSession.internalExecuteQuery(Unknown Source)
at oracle.toplink.threetier.ClientSession.internalExecuteQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeSelectingCall(Unknown Source)
at com.gs.lab.rr.db.plsql.gs_practice_pkg.OneInNumberArrayOutStoredProcedure.execute(OneInNumberArrayOutStoredProcedure.java:51)
at com.gs.lab.rr.db.plsql.gs_practice_pkg.PracticeStoredProceduresTest.testOneInNumberArrayOutStoredProcedure(PracticeStoredProceduresTest.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:329)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:218)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:151)
INTERNAL EXCEPTION STACK:
java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'ONE_IN_NUMBER_ARRAY_OUT'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown Source)
at oracle.toplink.threetier.ServerSession.executeCall(Unknown Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeSelectCall(Unknown Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeSelect(Unknown Source)
at oracle.toplink.queryframework.DataReadQuery.executeNonCursor(Unknown Source)
at oracle.toplink.queryframework.DataReadQuery.execute(Unknown Source)
at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
at oracle.toplink.queryframework.ReadQuery.execute(Unknown Source)
at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
at oracle.toplink.threetier.ServerSession.internalExecuteQuery(Unknown Source)
at oracle.toplink.threetier.ClientSession.internalExecuteQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeSelectingCall(Unknown Source)
at com.gs.lab.rr.db.plsql.gs_practice_pkg.OneInNumberArrayOutStoredProcedure.execute(OneInNumberArrayOutStoredProcedure.java:51)
at com.gs.lab.rr.db.plsql.gs_practice_pkg.PracticeStoredProceduresTest.testOneInNumberArrayOutStoredProcedure(PracticeStoredProceduresTest.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:329)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:218)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:151)
Thanks in advance,
JohnUsing the SQL/ObjectRelational types as stored procedure arguments is not supported. But it may work...
You should not pass in the reference to the array type. Instead, do something like this:
call.addNamedOutputArgument("OUT_NUMBER_ARRAY", "OUT_NUMBER_ARRAY");
Hope this helps. If not, I suspect it would take some technical services to do this as I don't think the source.zip contains the classes involved in this.
- Don
Maybe you are looking for
-
How do you get SSL to work on Mac OS X Server 10.5.8?
Hi, I have created a SSL certificate (twice with the server admin tools and once with the openssl command) and I get this in the log of the apache web service: [error] Init: Pass phrase incorrect I have searched but aside from changing the httpd.conf
-
I bought a song from the itunes store and downloaded it and it said download was complete but when i go to play the song it will only play the first 14seconds of it then it cuts off. what should I do to retrieve the rest of the song?
-
Console reporting webkit having hundreds of wakeups per second
I have been noticing frequent computer slowdowns on my 2011 MacBook Pro, always fully patched. Checking Console, I found dozens of reports from Webkit saying things like "140 wake ups per second for 194 seconds" I think these are related!!! Can some
-
All my apps. are automatically shutting off when I try to use them.. They were working just fine yesterday, and today they just kick me back to my home screen! How do I get them to start working again. And my sleep/wake button is broken... so how
-
Best Practice Clean Install (Same Old Chestnut for Sure)
OK, I'm sure the answer is somewhere in this forum but each part is so spread out and I'm getting the sequence mixed up on the best way to make the transition to Tiger in consideration of my current setup. So, thanks in advance for being patient and