Hello all,
I'm sharing information about how oracle rac is installed on windows 2008 server enterprise edition R2. A few months ago, i configured it successfully on VMWare server environment with shared disks.
Finally, i tested it on 2 Dell server R810 with E7540 (48 cores, 128gb ram) and Dell Equallogic 6510 storage of 14tb capacity with RAID 10.
While configuration phase of installation, i ended up with windows dead blue screen many times. (DRIVER_IRQL_NOT_LESS_OR_EQUAL) The reason of this error was Oracle Grid infrastructure can not be installed on servers with more 32 cores. So i turned of Turbo HT and oracle grid infrastructure installation completed smoothly. After installation you can patch grid with 10637621 and re-enable turbo to 48 cores. If you see this blue screen, page 7 of the second pdf below can help you.
You can use following document for installation & troubleshooting.
http://www.mits.mn/RACGuides_Rac11gR2OnWindows.pdf
http://www.mits.mn/WTRB_11g.pdf
PS: Take care of database version. If you download oracle by the time you will download 11g 2.0.1 version. When you try to patch 10637621 on it, it will require you to install oracle.rdbms.rsf, 11.2.0.2.0 component. So don't use 11g2.0.1, use version 11g2.0.2. It seems not preferred to patch 11g2.0.2 on 11g2.0.1. It's recommended to install freshly. You can download it from metalink, it's not listed current on public download page. WTRB_11g.pdf is guide to patch 11g2.0.2, not 11g2.0.1.
Tuesday, October 11, 2011
Oracle 11R2 RAC on Windows 2008 server
Monday, March 24, 2008
oracle cast function in stored procedure
There is a thing can be called stupid in oracle. I can't understand the reason!
This is a piece of code in a Oracle Trigger. Decimal numbers are compared roundly by double precision.
if (cast(to_char(:new.unit_price) as number(14,2)) = cast(to_char(v_ppl_unit_price) as number(14,2))) then
:new.unit_price := v_temp_new_unit_price;
end if;
But after executed this code, an error is occurred:
Error: PLS-00103: Encountered the symbol "(" when expecting one of the following:
. ) @ %
The symbol ")" was substituted for "(" to continue.
Line: 122
Text: if ( cast(:new.unit_price as number(14, 5)) =
And i found out how to fix it.
that is declare a subtype, and use it on cast:
declare
subtype number_14_2 is number(14, 2);
...
begin
...
if (cast(to_char(:new.unit_price) as number_14_2) = cast(to_char(v_ppl_unit_price) as number_14_2)) then
:new.unit_price := v_temp_new_unit_price;
end if;
...
end
It's done! How strange!
Tuesday, March 11, 2008
ORA-06502 error occurred while calling stored procedure from C#
Here is a Oracle stored procedure.
create or replace procedure GETVPNOFROMPNO(p_pno in varchar2, ret out varchar2) is
r SYS_REFCURSOR;
npno1 varchar2(255);
retval varchar2(255);
begin
retval:= p_pno;
open r for
select npno from parts_for_update_npno where parts_for_update_npno.pno= p_pno and npno is not null;
fetch r into npno1;
if r%NOTFOUND then
ret:= retval;
return;
end if;
retval:= p_pno||' /'||npno1;
ret:= retval;
end GETVPNOFROMPNO;
As you see, there is no need of REF CURSOR. I declared it just for further use.
And here is a function that calls the stored procedure above.
public static string getVPNOfromPNO(OracleConnection c, string pno)
{
OracleCommand cmd = null;
try
{
c.Open();
cmd = c.CreateCommand();
cmd.CommandText = "GETVPNOFROMPNO";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("p_pno", OracleType.VarChar);
cmd.Parameters["p_pno"].Value = pno;
cmd.Parameters["p_pno"].Direction = ParameterDirection.Input;
cmd.Parameters.Add("ret", OracleType.VarChar);
cmd.Parameters["ret"].Value = "";
cmd.Parameters["ret"].Direction = ParameterDirection.Output;
cmd.ExecuteNonQuery();
c.Close();
//MessageBox.Show("Suces");
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
Program.setStatus("Error while getting ...!", ex);
}
return cmd.Parameters["ret"].Value.ToString();
}
Do you think there is any error? I thought not, but there was.
While executing, this code throws "ORA-06502: numeric or value error: character string buffer too small" exception.
The error is corrected by changing cmd.Parameters["ret"].Value = ""; to cmd.Parameters["ret"].Value = "__________________";
Why? I used parameter for getting output value. The too small string buffer in the error description is cmd.Parameters["ret"].Value that is length of zero. After setting enough space for this variable, it was OK. If i used oracle function, it would be OK without any problem.