With create procedure, How to clear Shared pool
Hi, I have a sql script file it contains
more than 300,000 line code, I use this file
to create procedure in the Oracle.
When I execute this sql script file, I receive a error message " out of cursor". I know when I create procedure, the procedure's code is stores in the shared pool. So when the code is stores out of shared pool's size, I receive that error.
But how can I clear shared pool? With commit statement, it won't be use.
Thanks a lot.
you may try:
alter system flush shared_pool;
null
Similar Messages
-
How to clear shared links in safari?
how to clear shared links in safari?
Hi Dominic23, appreciate your answer but I am referring to LinkedIn Shared Links, does that mean I have to log out of LinkedIn account, is there another way instead to logging out?
Thanks. -
Hi
When I add an ındex to sql query, I see that It does not use the new executıon plan, whıch ıs more effıcıent.
Is ıt possıble to clear shared pool so that it uses new executıon plan.whenver you altered the referenced object for that it has already contained the execution plan within the shared pool it would be invalidated.
http://download-uk.oracle.com/docs/cd/B28359_01/server.111/b28318/consist.htm#CIHCFBIJAs far as toad concern it would be appropriate to use oracle own tool tkprof for real plan viewing.Cost is not the criteria to metrics the sql performance.Using index depends upon the selectivity of yours data if yours stats are updated and CBO consider not to use index then dont need to bother about reading index ,there would be other issues which cause the performance,Understand index is not good nor bad.
Khurram
http://oraware.blogspot.com/ -
"Run Script" (F5) Flacky Behavior with CREATE PROCEDURE and PACKAGE
When I have the following create statement in a SQL Worksheet and run the script using "Run Script" (F5), I get the "PROCEDURE bogus Compiled." message. Why does it not tell me that there was a compile error? The procedure is marked with a little red "X" in the connections pane.
CREATE OR REPLACE PROCEDURE bogus IS
BEGIN
x := 1;
END;
/Also, when I have the following command in a SQL Worksheet and run the script using "Run Script" (F5), I get the "PROCEDURE bogus Compiled." message. The difference is that I removed the slash after the CREATE PROCEDURE command. I can go into that procedure in the database via the Connections pane, click on the compile button, and the procedure compiles with no errors. Why does it not compile in a script when missing the slash?
CREATE OR REPLACE PROCEDURE bogus IS
BEGIN
NULL;
END;I noticed the same flaky behavior with CREATE PACKAGE BODY as well. This is in version 1.0.0.14.67 on Windows XP. Has this been fixed in the latest version?
MikeI found a number of earlier posts on this (going back to at least v804), but I cannot find a thread with a response from the SQL Developer team - see:
Package compilation error
Succesful compilation message and Compiling Invalid Objects
Creating a stored procedure from a file does not show compilation errors
Re: Syntax Error Feedback
I assume that it is just a bug with SQL Developer that it does not check for compilation errors when determining the status message to display (ie "PROCEDURE bogus Compiled"). At least now we get the little red cross on the navigator to tell us it is invalid :) -
Create Procedure - How to Detect Compilation Errors
Hi,
I am working on an application where users will be able to type in their own stored procedures. I perform some basic parsing of the function spec, to make sure it is well-formed, but that's all the parsing I do. I assumed an SQLException would be thrown by the executeUpdate() call which creates the procedure if the procedure is malformed. This is not the case. executeUpdate() returns 0, whether or not the procedure was created with compilation errors.
After they type it in, I would like to be able to tell the user whether or not their procedure is syntactically correct. Given that writing a complete PL/SQL parser in Java is obviously out of the question, how can I do this? There must be a way.
Thanks in advance for any and all help,
JamesNote that there is a USER_ERRORS table.
You could DELETE FROM USER_ERRORS before issuing the procedure declaration and then SELECT ... FROM USER_ERRORS to see if errors have occured and if so to print them out. -
In creating Procedure how to add a Varchar column?
Hi, im doing a process to get a missing series of Official Reciepts (OR_NO Varchar2(10)). I have a problem running my procedure in a part of variable.
The error is ORA-06502 PL/SQL: numeric or value error .
In a sample statement below, if the value for nNo = 'PSFP000123' then if i add + 1 , variable nNo = ''PSFP000124'.
My question is, how can i add nNo + 1 since nNO is a varchar data type?
sample:
Declare
nNo Varchar2(10) := 'PSFP000123';
Begin
nNo := nNo + 1;
End;
Thank you.
LalaHi Lala,
Try playing with something like below. Just to give you an idea.
SELECT 'PSFP' || LPAD(SUBSTR('PSFP000123', 5) + 1, 6, '0') FROM DUALRegards,
Chan Kelwin -
Purchase Orders with outstanding invoice - How to clear these down?
Hi,
We have a large number of purchase orders with an outstanding invoice which will never be fulfilled. I would like to know what is the process for clearing these down so the purchase orders will be marked for archiving, and so they will not be visible when running me2m with selection parameter RECHNUNG. I've tried setting the final invoice flag but I can still see the order.
Thanks,
Steph.you have to clear the GR/IR account with MR11.
-
hi
i have a little problem with creating procedure
i have a table
create table t
t_id int,
t_name varchar(22)
insert into t values(1,'AA');
and then i try to create procedure for insert into this table
create or replace procedure my_proc(pt_id int,pt_name varchar(22))
as begin
insert into t values(pt_id,pt_name);
end;
but i receive an error
please help me anybodyDiman wrote:
hi
i have a little problem with creating procedure
i have a table
create table t
t_id int,
t_name varchar(22)
insert into t values(1,'AA');Thanks for posting the CRATE TABLE and INSERT statements; that's very helpful!
and then i try to create procedure for insert into this table
create or replace procedure my_proc(pt_id int,pt_name varchar(22))
as begin
insert into t values(pt_id,pt_name);
end;
but i receive an errorWhy not post the error message?
please help me anybodyWhen you give the datatype of an argument, you can't qualify it with a length (like VARCHAR *(22)* ); just give the type (VARCHAR)
create or replace procedure my_proc
( pt_id int
, pt_name varchar -- no size
as begin
insert into t (t_id, t_name)
values (pt_id, pt_name);
end;By the way, it's a good idea to explicitly name the columns in an INSERT statement. It helps prevent bugs, and it keeps you procedure working if you forget to change it when you add columns to the table. -
12c - limited space in shared pool
HI ,
I am creating a Container Database in 12C and dbca errors out with
Due to limited space in shared pool (need 6094848 bytes, have 4194112 bytes), limiting Resource Manager entities from 2048 to 32 LICENSE_MAX_SESSION = 0 LICENSE_SESSIONS_WARNING = 0 Initial number of CPU is 2 CELL communication is configured to use 0 interface(s): CELL IP affinity details: NUMA status: non-NUMA system cellaffinity.ora status: N/A CELL communication will use 1 IP group(s): Grp 0: Picked latch-free SCN scheme 3 Autotune of undo retention is turned on. IMODE=BR ILAT =51 LICENSE_MAX_USERS = 0 SYS auditing is disabled NOTE: remote asm mode is local (mode 0x1; from cluster type)
Due to limited space in shared pool (need 6094848 bytes, have 3981120 bytes), limiting Resource Manager entities from 2048 to 32
Due to limited space in shared pool (need 6094848 bytes, have 3981120 bytes), limiting Resource Manager entities from 2048 to 32
Due to limited space in shared pool (need 6094848 bytes, have 3981120 bytes), limiting Resource Manager entities from 2048 to 32
ORA-01501: CREATE DATABASE failed
ORA-01519: error while processing file '?/rdbms/admin/dcore.bsq' near line 1065
ORA-01519: error while processing file '?/rdbms/admin/dcore.bsq' near line 76
ORA-00604: error occurred at recursive SQL level 1
ORA-01119: error in creating database file '/oraceledata01/RND1/datafile/pdbseed/RND1_system_01.dbf'
ORA-27040: file create error, unable to create file
I am using RHEL 6 host
Thanks"ORA-27040: file create error, unable to create file" is pretty explicit. Either the path doesn't exist or permissions for the path don't exist.
Also, I suggest that you verify if the target path has enough disk space for the database you are creating.
What about the memory allocation you have specified ? Is it adequate ?
Hemant K Chitale -
How to clear Cache in Safari?
I found this solution to clear Cache in Safari on the community pages.
Does it work? I hope the Safari developers with confirm.
How to clear Cache in Safari
~Bee Delaware
Jan 3, 2013 7:34 PM
Quit Safari.
Click out on your desktop somewhere to get Finder menu on the top menu bar. Then look over to the right, and select the "Go" menu while holding down the "Option"button. You will then see an option for "Library" right under your home folder on that list.
That is your hidden Users Library. Open that Library, go down to Caches. Open that, and then look for apple.com.Safari. Take that file to the trash.
Restart Safari.
I tried it, I do not know what the consequences are yetIt''s a bit drastic, but that clears Safari cache. There's another way of clearing the cache:
1. Open Safari, go to Safari menu (on the menu bar) > Preferences > Advanced, and tick "Show Develop menu in menu bar".
2. Close Preferences, and go to Develop menu > Delete cache -
How to clear app cache on itouch (3.1.3 iOS)
can someone help with directions on how to clear app cache in 3.1.3? btw...i don't want to reset since it will result in lost apps that no longer offer versions for 3.1.3
All you can do is reset the iPod. Nothing is lost
Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
least ten seconds, until the Apple logo appears.
For the old-app problem. Delete any newer apps from your iTunes library. Then transfer iTunes purchases to the computer by:
iTunes Store: Transferring purchases from your iOS device or iPod to a computer
Just make sure that you do not update those apps in your iTunes library. -
dear all ,
i have case around shared pool ,
when im do
sql > sqlplus "/ as sysdba"
sql > alter system flush shared_pool ;
query will be stuck and nothing happen ,
i try to check alert.log but nothing error
anybody help mehi hussein ,
i have seen error in alert.log
ORA-00060: Deadlock detected. More info in file /oracle11/PROD/db/tech_st/11.1.0/admin/PROD_smjkt-prfn01/diag/rdbms/prod/PROD/trace/PROD_ora_10356130.trc
and 20 last line in PROD_ora_10356130.trc
kxscphp=0x1112be2f8 siz=1992 inu=920 nps=312
Symbolic dump of process state object:
KSUPRFLG = 0
KSUPRSER = 122
KSUPRIOC = 0
KSLLALAQ = 0X0000000000000000
KSLLAWAT = 0X0000000000000000
KSLLAWHY = 0
KSLLAWER = 0
KSLLALOW = 0
KSLLAPSC = 6
KSLLAPRC = 5
KSLLAPRV = 2
KSLLAPSN = 25
KSLLID1R = 129
KSLLID2R = 0
KSLLRTYP = 'EV'
KSLLRMTY = 0
KSUPRPID = <INVALID LENGTH SIZE OF 8>
KSUPRUNM = <INVALID LENGTH SIZE OF 8>
KSUPRMNM = <INVALID LENGTH SIZE OF 8>
KSUPRPNM = <INVALID LENGTH SIZE OF 8>
KSUPRTID = <INVALID LENGTH SIZE OF 8>
KSSRCOBJ = 0X0000000000000000
KSSRCFRE = 0X0000000000000000
KSSRCSRC = 0X0000000000000000
KSSRCDST = 0X0000000000000000
KSASTQNX = 0X07000018E58A0BF8
KSASTQPR = 0X07000018E58A0BF8
KSASTRPL = 0
KSUPRPUM = 9741322
KSUPRPNAM = 1034898
KSUPRPRAM = 10158080
KSUPRPFM = 720896
KSUPRPMM = 11192978
KSFD PGA DUMPS
Number of completed I/O requests=0 flags=8
END OF PROCESS STATE
*** 2012-05-02 14:10:57.498
Attempting to break deadlock by signaling ORA-00060
theres any relation between this error with my case "stuck when Flush Shared pool" ?? -
How Create procedure or function with ADO ?
Hello,
How Create procedure or function with ADO?It's my question.
Thanks.
HenriThis message if post by Taiwan-ChangHaw-Oracle-Stored-Procedure-For-Business-Rule-Club
public bool ConnectDatabase()
try
{ string strConnectionString =
"Provider=OraOLEDB.Oracle" +";"+
"Data Source=" + ConnectionParams.Datasource +";"+
"User Id =" + ConnectionParams.Username +";"+
"Password =" + ConnectionParams.Password;
m_conn=new ADODB.Connection();
m_conn.ConnectionString=strConnectionString;
m_conn.Open("","","",0); //i_"YYAOl Open the connection
catch(Exception e)
{ System.Windows.Forms.MessageBox.Show(e.Message);
return false;
return true; //YYAOl_B>3I9&connected successfully
public void InsertDescription(string p_product,string p_language,string p_tname,string p_tdescription)
{ string sql="{Call inserttranslateddescription(?,?,?,?,?)}";
try
{ ADODB._Command cmd=new ADODB.Command();//Create a command object
cmd.ActiveConnection=m_conn; //Set its active connection to open connection
ADODB.Properties properties=cmd.Properties;//Get the command properties into ADODB Properties object
IEnumerator ienum=properties.GetEnumerator();//Get an enumerator on above properties
ADODB.Property singleprop;
while(ienum.MoveNext()) //iterate through the enumerator
{singleprop=(ADODB.Property)ienum.Current;//Get the current property from enumerator
string propname= singleprop.Name; //Get the name of current property
if(propname.Equals("NDatatype")) //if the property is 'NDatatype' set its value to true
singleprop.Value=true;
cmd.CommandType=ADODB.CommandTypeEnum.adCmdText;
int pid=Int32.Parse(p_product);
ADODB._Parameter langid =cmd.CreateParameter("langid", ADODB.DataTypeEnum.adChar,ADODB.ParameterDirectionEnum.adParamInput, 100,p_language);
ADODB._Parameter productid =cmd.CreateParameter("productid", ADODB.DataTypeEnum.adNumeric,ADODB.ParameterDirectionEnum.adParamInput, 100,pid);
ADODB._Parameter tname =cmd.CreateParameter("tname", ADODB.DataTypeEnum.adBSTR,ADODB.ParameterDirectionEnum.adParamInput, 50,p_tname);
ADODB._Parameter tdescription=cmd.CreateParameter("tdescription",ADODB.DataTypeEnum.adBSTR,ADODB.ParameterDirectionEnum.adParamInput, 50,p_tdescription);
ADODB._Parameter check =cmd.CreateParameter("check", ADODB.DataTypeEnum.adNumeric,ADODB.ParameterDirectionEnum.adParamOutput,100,0);
cmd.Parameters.Append(langid);
cmd.Parameters.Append(productid);
cmd.Parameters.Append(tname);
cmd.Parameters.Append(tdescription);
cmd.Parameters.Append(check);
cmd.CommandText=sql;
//Execute the command to insert product details in database
object recs;
object param=p_language;
cmd.Execute(out recs,ref param,1);
ienum.Reset();
while(ienum.MoveNext()) //iterate through enumerator
{ singleprop=(ADODB.Property)ienum.Current;//Get the current property in to Property object
string propname= singleprop.Name; //Get the name of current property
if(propname.Equals("NDatatype")) //if it is 'NDatatype' set its value to true
singleprop.Value=false;
IEnumerator iprop=cmd.Parameters.GetEnumerator();//Get the enumerator for command parameters
while(iprop.MoveNext()) //loop through enumerator
{ //Get the current parameter in enumerator
ADODB._Parameter checkval=(ADODB._Parameter)iprop.Current;
if(checkval.Name.Equals("check")) //if the parameter is 'check'
if(checkval.Value.ToString().Equals("0")) //If check's value is zero data was inserted
System.Windows.Forms.MessageBox.Show("Product details Inserted successfully");
else
System.Windows.Forms.MessageBox.Show("Product Details Updated");//else data was updated
catch(Exception e)
System.Windows.Forms.MessageBox.Show(e.Message);//Display any error message
} -
How to create procedure having delete statement with between function?
I am very new in SQL Development, I want to create a procedure having two date variable start and end and these two variable i want to use in procedure body to delete data from a specific table between two date duration.
Please guide
Thanks,create procedure some_proc (start_date date, end_date date)
as
begin
delete from your_table
where your_date_column between start_date and end_date;
end some_proc;
/ -
About creating an AJAX page with DML procedures using dynamic actions
About creating an AJAX page with DML procedures in APEX using dynamic actions. Help with limitations.
I want to share my experience, creating AJAX procedures in APEX 4.0.
LIMITATIONS
• How Can I Hide UPDATE button while I press NEW button. ??
• How Can I Hide CREATE button while I’m UPDATING A RECORD. ??
• How can I avoid multiple Inserts or Updates. ??
Here are the steps to create an AJAX Updatable Form using the sample table DEPTS. You can see the demo here: [http://apex.oracle.com/pls/apex/f?p=15488:1]
1) Create a blank page
2) Add a Report Region for departments (It shows the columns deptno, dname and loc).
3) Add an HTML Region and create the elements to edit a Department.
a. P1_DEPTNO (Hidden to store PK)
b. P1_DNAME (Text Field)
c. P1_LOC (Text Field)
4) You also have to create a hidden element called P1_ACTION. This will help to trigger dynamic actions to perform DMLs.
5) Open Page Attributes and in the HTML Header Section include the following code.
<script>
function doSelect(pId){
$x_Value(‘P1_DEPTNO’,pId);
$x_Value(‘P1_ACTION’,’SELECT’);
</script>
6) Modify the column DEPTNO in the report, to add column link. In the link text you can use #DEPTNO# , in target you must select ‘URL ‘ and in the URL field write javascript:doSelect(#DEPTNO#);
7) Create the following Buttons in the Form Region.
CANCEL Redirects to URL: javascript:$x_Value(‘P150_ACTION’,’CANCEL’);
NEW Redirects to URL: javascript:$x_Value(‘P150_ACTION’,’NEW’);
SAVE Redirects to URL: javascript:$x_Value(‘P150_ACTION’,’UPDATE’);
CREATE Redirects to URL: javascript:$x_Value(‘P150_ACTION’,’CREATE’);
8) Create the following Dynamic Action to Select a Department
Name: Select Dept
Event: Change
Selection Type: Item(s)
Item(s): P1_ACTION
Condition: equal to
Value: SELECT
Action: Execute PL/SQL Code
PL/SQL Code:
SELECT dname, loc
INTO :P1_DNAME, :P1_LOC
FROM dept
WHERE deptno = :P1_DEPTNO;
Page Items to Submit: P1_DEPTNO, P1_DNAME, P1_LOC
Don’t include any false action and create the Dynamic Action.
The first limitation, the value of page elements don’t do refresh so I added the following true actions to the dynamic action AFTER Execute PL/SQL Code.
Action: Set Value
Unmark *‘Fire on page load’* and *‘Stop execution on error’*
Set Type: PL/SQL Expression
PL/SQL Expression: :P1_DNAME
Page Items to submit: (none) (leave it blank)
Affected Elements: Item P1_DNAME
Action: Set Value
Unmark *‘Fire on page load’* and *‘Stop execution on error’*
Set Type: PL/SQL Expression
PL/SQL Expression: :P1_LOC
Page Items to submit: (none) (leave it blank)
Affected Elements: Item P1_LOC
These actions allow refresh the items display value.
9) Create the following Dynamic Action to Update a Department
Name: Update Dept
Event: Change
Selection Type: Item(s)
Item(s): P1_ACTION
Condition: equal to
Value: CREATE
Action: Execute PL/SQL Code
PL/SQL Code:
UPDATE dept SET
dname = :P1_DNAME,
loc = :P1_LOC
WHERE deptno = :P1_DEPTNO;
Page Items to Submit: P1_DEPTNO, P1_DNAME, P1_LOC
Don’t include any false action and create the Dynamic Action.
Include the following True Actions BEFORE the Execute PL/SQL Code true Action.
Action: Set Value
Unmark ‘Fire on page load’ and ‘Stop execution on error’
Set Type: PL/SQL Expression
PL/SQL Expression: :P1_DNAME
Page Items to submit: P1_DNAME
Affected Elements: Item P1_DNAME
Action: Set Value
Unmark *‘Fire on page load’* and *‘Stop execution on error’*
Set Type: PL/SQL Expression
PL/SQL Expression: :P1_LOC
Page Items to submit: P1_LOC
Affected Elements: Item P1_LOC
These actions allow refresh the items display value.
Finally to refresh the Departments report, add the following true action at the end
Action: Refresh
Affected Elements: Region Departments
10) Create the following Dynamic Action to Create a Department
Name: Create Dept
Event: Change
Selection Type: Item(s)
Item(s): P1_ACTION
Condition: equal to
Value: CREATE
Action: Execute PL/SQL Code
PL/SQL Code:
INSERT INTO dept(deptno,dname,loc)
VALUES (:P1_DEPTNO,:P1_DNAME,:P1_LOC);
Page Items to Submit: P1_DEPTNO, P1_DNAME, P1_LOC
Don’t include any false action and create the Dynamic Action.
Include the following True Actions BEFORE the Execute PL/SQL Code true Action.
Action: Set Value
Unmark *‘Fire on page load’* and *‘Stop execution on error’*
Set Type: PL/SQL Function Body
PL/SQL Function Body:
DECLARE
v_pk NUMBER;
BEGIN
SELECT DEPT_SEQ.nextval INTO v_pk FROM DUAL;; -- or any other existing sequence
RETURN v_pk;
END;
Page Items to submit: P1_DEPTNO
Affected Elements: Item P1_DEPTNO
Action: Set Value
Unmark *‘Fire on page load’* and *‘Stop execution on error’*
Set Type: PL/SQL Expression
PL/SQL Expression: :P1_DNAME
Page Items to submit: P1_DNAME
Affected Elements: Item P1_DNAME
Action: Set Value
Unmark ‘Fire on page load’ and ‘Stop execution on error’
Set Type: PL/SQL Expression
PL/SQL Expression: :P1_LOC
Page Items to submit: P1_LOC
Affected Elements: Item P1_LOC
These actions allow refresh the items display value.
Finally to refresh the Departments report, add the following true action at the end
Action: Refresh
Affected Elements: Region Departments
11) Create the following Dynamic Action to delete a department
Name: Delete Dept
Event: Change
Selection Type: Item(s)
Item(s): P1_ACTION
Condition: equal to
Value: DELETE
Action: Execute PL/SQL Code
PL/SQL Code:
DELETE dept
WHERE deptno = :P1_DEPTNO;
Page Items to Submit: P1_DEPTNO
Don’t include any false action and create the Dynamic Action.
Include the following True Actions AFTER the Execute PL/SQL Code true Action.
Action: Refresh
Affected Elements: Region Departments
Action: Clear
Unmark ‘Fire on page load’
Affected Elements: Items P1_DEPTNO, P1_DNAME, P1_LOC
12) Finally Create the following Dynamic Action for the NEW event
Name: New Dept
Event: Change
Selection Type: Item(s)
Item(s): P1_ACTION
Condition: equal to
Value: NEW
Action: Clear
Unmark *‘Fire on page load’*
Affected Elements: Items P1_DEPTNO, P1_DNAME, P1_LOCI need some help to solve this issues
• How Can I Hide UPDATE button while I press NEW button. ??
• How Can I Hide CREATE button while I’m UPDATING A RECORD. ??
• How can I avoid multiple Inserts or Updates. ??
Maybe you are looking for
-
Need advice, sql server with asp or oracle with asp
hi ! i have been given a task to improve the design of a sql server database with more than 1 million records, front end is asp (code has to be written also, keeping user interface same). I would like to use oracle with asp, is it practical or should
-
Is there a way to add line breaks to the closed captioning within Captivate? I've been copying and pasting my text from Word and adding the line breaks there. But sometimes you just need a line break right way and don't want to use Word.
-
Parallel calls to ActiveX using Invoke Node
Dear colleagues, Please help/advice on such a problem. The program has a VI template (template.vit) having an ActiveX. Two calls to this template create different instances of the ActiveX with different reference numbers. Two asynchronous processed i
-
SAP Script - resize window / paragraph
Hello Gurus, I have two problems related to sap script. ( ver 4.6c) I have copied the original order confirmation form from 000 client in diff.languages like FR/DE/EN ( these forms are used by diff. offices in diff. location ) now we have to create a
-
SAP ECC Service notification from CRM Complaint
Hi, As there are some links and document are available to create the quality notification in SAP ECC from the CRM complaint, using action profile for this some setting also needed in SAP ECC QM, but as in ECC we already have the service notification