ORA-01720 when in procedure, OK when GRANT directly invoked
I created quite a number of views. The views use some tables in another schema. Now I have to "GRANT SELECT" this views to some other user. Firstly I did this directly from sqldeveloper (and/or squirrel) without any problems.
But because this is a lot of manual work, I decided to 'GRANT SELECT' all views of which I am owner in a procedure. This procedure is defined in my own schema. When I run this procedure, I get an error ORA-01720, although I invoke the it with the same account. It seems the procedure has less privileges than me doing SQL from the commandline?
Edited by: 858028 on 11.05.2011 04:27
Dude wrote:
According to the forum etiquette, consulting documentation is recommended but not required. Regarding the rest, there are plenty of vent and rant forums available on the internet.Dude - for what it's worth I use the Abuse button now to report those kind of venting posts, not sure if it'll have any effect but eventually the admins may decide to crack down on people breaking the forum etiquette rules:
When answering a question, please be courteous and respectful; It really is a blot on what is otherwise a friendly community.
Similar Messages
-
Security problem? (ORA-00942 error when creating procedure)
First, in SQL*Plus connect as system user:
SQL>connect system/oracle
Then, create table proctest for user scott and insert records:
SQL>create table scott.proctest ( name varchar2(10)) ;
SQL>insert into scott.proctest values ( 'bigboy' ) ;
SQL>select * from scott.proctest ;
NAME
bigboy
Then, create procedure testproc for user system using table scott.proctest:
SQL>CREATE OR REPLACE PROCEDURE testproc AS
2 v_name VARCHAR2(10) ;
3 BEGIN
4 SELECT Name INTO v_name FROM scott.proctest WHERE rownum < 2 ;
5 DBMS_OUTPUT.PUT_LINE( 'Name: ' || v_name ) ;
6 END ;
7 /
Then, errs report:
SQL>show err;
LINE/COL ERROR
4/2 PL/SQL: SQL
4/2 PL/SQL: SQL Statement ignored
4/37 PL/SQL: ORA-00942: Table or view does not exist
Then, explicitly grant select privilege on proctest to system:
SQL>grant select on scott.proctest to system ;
And at this time compile the above precedure again, there's no errors.
I have got some instruction that if a procedure wants to use some table,
the owner of this procedure has to have corresponding privileges to use this table and
these privileges have to be granted directly to the user. It doesn't work if
the privileges are granted i.e. through roles.
And in the example above the user has select on scott.proctest privilege but
this privilege is granted through DBA role. So it doesn't work if
I do not explicitly grant select privilege to system.
My question is:
Why does Oracle define this rule? Is it a kind of security consideration?Since stored procedures rely on privileges that are granted directly to the user, Oracle only needs to re-validate stored procedures when direct grants to the schema owner change. In general, the rate at which the privileges assigned to roles are changed is much higher than the rate at which privileges assigned to a particular user are changed, so this cuts down on on the cost of revalidating procedures.
More importantly, Oracle roles can be assigned to users, but a user can also have non-default roles and password-protected roles. If Oracle allowed privileges through roles to affect the privileges of a stored procedure, handling these sorts of cases would be quite difficult and would result in far more confusion than in today's implementation.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
ORA-04030: out of process memory when using Java Stored Procedures
Hello,
I have a problem using Java Stored Procedures in Oracle 10g.
My Java application performs http posts to a webservice and the response is parsed in order to populate some DB tables.
There is a scheduled job which calls the Java Stored Procedure every x minutes.
No matter of the 'x minutes' values - after about 160 - 200 calls I get this error:
ORA-04030: out of process memory when trying to allocate 1048620 bytes (joxp heap,f:OldSpace)
ORA-04030: out of process memory when trying to allocate 2097196 bytes (joxp heap,f:OldSpace)
The job stops just while is posting the http request. The weird thing is that almost each time the first http post request I get this error:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:426)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(DashoA6275)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140)
at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:130)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
and the second try works fine.
So, The out of process memory occured each time just before getting such an error, and I suspect to be a connection between these errors.
Tech details:
1. OS: WinXP
2. Oracle 10.1.0.2.0
3. To perform http post I use HttpClient 3.1 from Apache.
4. I checked the http connection to be closed each time, and this is done.
5. I checked the oracle statement and connection to be closed each time and this is done
6. The JVM error (logged in .trc files of Oracle) is:
java.lang.OutOfMemoryError
at java.lang.Thread.start(Native Method)
at sun.security.provider.SeedGenerator$ThreadedSeedGenerator.run(SeedGenerator.java:297)
DB Settings details:
Starting up ORACLE RDBMS Version: 10.1.0.2.0.
System parameters with non-default values:
processes = 200
sessions = 225
shared_pool_size = 159383552
large_pool_size = 8388608
java_pool_size = 104857600
nls_language = AMERICAN
control_files = C:\ORACLE\PRODUCT\10.1.0\ORADATA\XXXXXX\CONTROL01.CTL, C:\ORACLE\PRODUCT\10.1.0\ORADATA\XXXXXX\CONTROL02.CTL, C:\ORACLE\PRODUCT\10.1.0\ORADATA\XXXXXX\CONTROL03.CTL
db_block_size = 8192
db_cache_size = 29360128
compatible = 10.1.0
fal_client = XXXXXX
fal_server = XXXXXXs
log_buffer = 524288
log_checkpoint_interval = 100000
db_files = 70
db_file_multiblock_read_count= 32
db_recovery_file_dest = C:\oracle\product\10.1.0\flash_recovery_area
db_recovery_file_dest_size= 2147483648
standby_file_management = AUTO
undo_management = AUTO
undo_tablespace = undotbs_01
undo_retention = 14400
remote_login_passwordfile= EXCLUSIVE
db_domain =
dispatchers = (PROTOCOL=TCP) (SERVICE=XXXXXXXDB)
remote_dependencies_mode = SIGNATURE
job_queue_processes = 4
parallel_max_servers = 5
background_dump_dest = C:\ORACLE\PRODUCT\10.1.0\ADMIN\XXXXXX\BDUMP
user_dump_dest = C:\ORACLE\PRODUCT\10.1.0\ADMIN\XXXXXX\UDUMP
max_dump_file_size = 10240
core_dump_dest = C:\ORACLE\PRODUCT\10.1.0\ADMIN\XXXXXX\CDUMP
sort_area_size = 1048576
sort_area_retained_size = 1048576
db_name = XXXXXX
open_cursors = 500
optimizer_mode = FIRST_ROWS
pga_aggregate_target = 25165824
Any help would be appreciated. Thanks.
Can be a problem with JVM threading under Oracle ?The server prcess failed to allocate more memory for large objects ( in Oldspace).
If you Google ORA-04030, you will see several recommendations to work around this.
The Java VM in the database already has HttpClient, i don't know why you are loading the Apache HttpClient but this might not be the surce of the problem.
Kuassi http://db360.blogspot.com -
Error ORA-03113 when execute procedure via OEM
Hi All,
I got error messages
ORA-03113: end-of-file on communication channel
ERROR at line 1:
ORA-03114: not connected to ORACLE
when execute procedure via Oracle Enterprise Manager
Who do you know what 's the problem and how can I resolves ?
Thanks,
MckaSolution Description:
=====================
The ORA-3113 error is a general error reported by Oracle client tools,
which signifies that they cannot communicate with the oracle shadow
process. As it is such a general error more information must be collected
to help determine what has happened.
This short article describes what information to collect for an
ORA-3113 error when the Oracle server is on a Unix platform.
General Issues:
===============
1) Is it only one tool that encounters the error or
do you get an ORA-3113 from any tool doing a similar operation?
If the problem reproduces in SQL*Plus, use this in all tests
below.
2) Check if the problem is just restricted to:
[ ] One particular UNIX user,
[ ] Any UNIX user
or [ ] Any UNIX user EXCEPT as the Oracle user.
3) Check if the problem is just restricted to:
[ ] One particular ORACLE logon
or [ ] Any ORACLE logon that has access to the
relevant tables.
4) If you have a client-server configuration does this occur from:
[ ] Any client
[ ] Just one particular client
or [ ] Just one group of clients ?
If so what do these clients have in common ?
Eg: Software release .
5) Do you have a second server or database version where the
same operation works correctly? -
ERROR : ORA-04030 -out of process memory when trying to allocate 16396 byte
hi,
i have written a procedure that insert as well as update few table.
But when i am trying to execute the procedure then it throws error:
ORA-04030: out of process memory when trying to allocate 16396 bytes something like that.
I don't know why it is?
I am using cursor with bulk collect and forall block to insert and update.The error message says that you ran out of PGA memory. You are bulk collecting into a variable that resides in PGA memory. So likely you fetched everything from the query into the collection variable at once. You would need at least (number of rows of result set * average number of bytes per row) bytes. And you don't have that amount of bytes apparently.
A solution is to use the limit clause while bulk collecting and set it to a reasonable amount of rows, say 100 or 1000 at most. And use an extra loop while exiting when <collection variable>.count = 0.
Regards,
Rob.
Message was edited by:
Rob van Wijk
Way too slow ... -
ORA-04030: out of process memory when trying to allocate 1024 bytes
hi
when i m executing a procedure i m getting this error(during bulk insert)
ORA-04030: out of process memory when trying to allocate 1024 bytes (callheap,RPI allocations)
pls help me out.Hi
It seams that you have the problem described in "How to handle ORA-04030". As I wrote in the other thread it is an OS configuration problem.
Chris -
Hello All,
I've got this message error during procedure's execution into QA environment.
*ORA-04030: OUT OF PROCESS MEMORY WHEN TRYING TO ALLOCATE 254476 BYTES (CALLHEAP,KLLCQAS:KLLSLTBA)
ORA-04030: out of process memory when trying to allocate 16396 bytes (koh-kghu call ,pmuccst: adt/record)*
The same procedure executed into PRD environment is running fine.
How can I know a how much memory is needed to solve this issue?
Thanks,
Martin
P.S.: Do you have any other recommendation that isn't "just add RAM memory"?Sorry folks, but I couldn't solved it yet.
The error is the same as was yesterday, ORA-04030: out of process memory when trying to allocate 123404 bytes (QERHJ hash-joi,kllcqas:kllsltba) - -4030.
I had identified how to reproduce this code, while running a stored procedure what does some inserts (at least 10M-rows) with BULK Collect senteces... I got this ORA error.
I did an alter session set SQL_TRACE = TRUE; to trace the process execution but I couldn't find any useful inside this tracefile.
Could you help me? How should I procede with this kind of issue?
Thanks,
Martin
P.S:
user@server:~ $ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 65536
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) 16384
virtual memory (kbytes, -v) unlimited
SELECT SUM(value) / 1024 / 1024 Mb
FROM v$sesstat s,
v$statname n
WHERE n.STATISTIC# = s.STATISTIC#
AND name = 'session pga memory';
MB
116.75286102294921875
SELECT sid,
name ,
value / 1024 Kb
FROM v$statname n,
v$sesstat s
where n.STATISTIC# = s.STATISTIC#
AND name LIKE 'session%memory%'
ORDER BY 3 DESC;
SID NAME KB
842 session pga memory max 3874.9921875
842 session uga memory max 1986.19140625
842 session pga memory 1698.9921875
842 session uga memory 1368.69140625
Edited by: martinmorono on Sep 30, 2008 6:07 PM
Some parameters are:
sga_max_size 1694498816
pre_page_sga FALSE
sga_target 1694498816
processes 800
shared_pool_reserved_size 18454937
If you need some other data about my problem, please let me know.
Thanks
Martin
Edited by: martinmorono on Sep 30, 2008 6:08 PM -
How to resolve this Error ORA-04030: out of process memory when trying to a
Hi
I am connecting as a sysdba and trying to execute a query on the V$Logmnr_contents but getting the following Error
ORA-04030: out of process memory when trying to allocate 408 bytes (T-LCR
structs,krvuinl_InitNewLcr)
Can anyone guide me how to resolve this issue.
ThanksHi,
As root user, edit the /etc/sysconfigtab file, and try to set the udp_recvspace parameter to 262144 and reboot the machine :
inet:
udp_recvspace = 262144
Metalink note 297030.1 Ora-04030 During Execution Of LogMiner Query
Nicolas. -
ORA-01720 while trying to grant select on a view
Hi Friends,
Iam getting the following error while trying to grant select privilege for the view to SchemaB, i have the view in schemaA.
I have used the tables from both the schema for creating the view and iam getting the error on showing a particular table
ORA-01720: grant option does not exist for 'schemaB.Product'.
I have looked into so many forums but i couldn't find the answer for my question.
I must have to create the view in the Schema A only(strictly), as i seen in some forums stated that while creating the view in the other schema and granting the select privilege will solve the problem.But it was an exception to me ...
Tell me something how can i proceed in this .....grant select on t1 to seconduser with admin optionNo. WITH ADMIN OPTION applies to system privileges only. Object privileges need the WITH GRANT OPTION ...
SQL> grant select on joe_soap.some_table to apc with admin option
2 /
grant select on joe_soap.some_table to apc with admin option
ERROR at line 1:
ORA-00993: missing GRANT keyword
SQL> grant select any table to apc with admin option
2 /
Grant succeeded.
SQL> grant select on joe_soap.some_table to apc with grant option
2 /
Grant succeeded.
SQL> Cheers, APC -
ORA-04030: out of process memory when trying to allocate
Hello Expert,
I have this error in my production database.
Database is working fine except busy Hours when running couple of ETL's and Crystal report on it.
Error : ORA-04030: out of process memory when trying to allocate
This error comes once in a month with above error
Instance terminated by CKPT
Platfrom : Microsoft window server 2003
Enterprise Edition.
service pack 1
Intel (R) Xenon (TM) CPU
3.00GHz
2.99 GHz, 15.4 GB of RAM
Oracle : Oracle Database 10g Enterprise Edition Release 10.2.0.2.0
TNS for 32-bit Windows: Version 10.2.0.2.0
SGA and PGA :
sga_max_size big integer 7008M
sga_target big integer 0
pga_aggregate_target big integer 950M
buffer_pool_keep string
buffer_pool_recycle string
global_context_pool_size string
java_pool_size big integer 152M
large_pool_size big integer 152M
olap_page_pool_size big integer 0
shared_pool_reserved_size big integer 26424115
shared_pool_size big integer 504M
streams_pool_size big integer 48M
sort_area_size integer 524288
processes integer 500
Active user : 228
sort_area_size integer 524288
Thanks in advance !!
DharmeshU can go through the link:--
https://metalink.oracle.com/metalink/plsql/f?p=130:14:5384645520011813599::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,233869.1,1,1,1,helvetica
Regards,
Anand -
APEX bug:9879227 (ORA-01403: no data found error when using validations)
Hi,
We are getting the
ORA-01403: no data found error
when the APEX page has validations AND a tabular form is also present on the page.
I did see a couple of other forum links discussing the issue (bug id: 9879227 ?? ).
But what i want to get a confirmation on is, in which release was this bug really fixed ?
i see the release notes of 4.0.1.00.03 claiming that it is fixed
in the release.
we are on 4.0.1.00.03. is this bug really solved in release 4.0.1.00.03?
are there any known work-arounds ? i tried re-creating the report multiple times, but that did not help.
Any suggestions or work-arounds will greatly help us.
Regards,
RamakrishnanRamakrishnan,
If you are talking about getting no data found when trying to save the report then take a look at the last message in this thread:
{message:id=9971445}
Cheers,
Tyson Jouglet -
ORA-01403: no data found Problem when using AUTOMATIC ROW FETCH to populate
ORA-01403: no data found Problem when using AUTOMATIC ROW FETCH to populate a form.
1) Created a FORM on EMP using the wizards. This creates an AUTOMATIC ROW FETCH
TABLE NAME - EMP
Item Containing PRIMARY KEY - P2099_EMPNO
Primary key column - EMPNO
By default the automatic fetch has a ‘Process Error Message’ of ‘Unable to fetch row.’
2) Created a HTML region. Within this region add
text item P2099_FIND_EMPNO
Button GET_EMP to submit
Branch Modified the conditional branch created during button creation to set P2099_EMPNO with &P2099_FIND_EMPNO.
If I then run the page, enter an existing employee number into P2099_EMPNO and press the GET_EMP button the form is populated correctly. But if I enter an employee that does not exist then I get the oracle error ORA-01403: no data found and no form displayed but a message at the top of the page ‘Action Processed’.I was expecting a blank form to be displayed with the message ‘Unable to fetch row.’
I can work around this by making the automated fetch conditional so that it checks the row exists first. Modify the Fetch row from EMP automated fetch so that it is conditional
EXIST (SQL query returns at least one row)
select 'x'
from EMP
where EMPNO = :P2099_EMPNO
But this means that when the employee exists I must be fetching from the DB twice, once for the condition and then again for the actual row fetch.
Rather than the above work around is there something I can change so I don’t get the Oracle error? I’m now wondering if the automatic row fetch is only supposed to be used when linking a report to a form and that I should be writing the fetch process manually. The reason I haven’t at the moment is I’m trying to stick with the automatic wizard generation as much as I can.
Any ideas?
Thanks PeteHi Mike,
I've tried doing that but it doesn't seem to make any difference. If I turn debug on it shows below.
0.05: Computation point: AFTER_HEADER
0.05: Processing point: AFTER_HEADER
0.05: ...Process "Fetch Row from EMP": DML_FETCH_ROW (AFTER_HEADER) F|#OWNER#:EMP:P2099_EMPNO:EMPNO
0.05: Show ERROR page...
0.05: Performing rollback...
0.05: Processing point: AFTER_ERROR_HEADER
I don't really wan't the error page, either nothing with the form not being populated or a message at the top of the page.
Thanks Pete -
Flashback : Error:ORA-04030: out of process memory when trying to allocate
Hi All,
I have executed this query on my db for using flash back features:
select * from flashback_transaction_query where table_owner='USERNAME'
However, it throws the error after being executed for 5 min:
ORA-04030: out of process memory when trying to allocate 268 bytes (Logminer LCR c,krvxbpdl)
Please help me in understading the error and provide some links/docs to resolve this.
Thanks,
KishoreThat's the error description:
What does an ORA-4030 mean?
This error indicates that the oracle server process is unable to allocate more memory from the operating system.This memory consists of the PGA (Program Global Area) and its contents depend upon the server configuration.For dedicated server processes it contains the stack and the UGA (User Global Area) which holds user session data, cursor information and the sort area. In a multithreaded configuration (shared server), the UGA is allocated in the SGA (System Global Area) and will not be responsible for ORA-4030 errors.
The ORA-4030 thus indicates the process needs more memory (stack UGA or PGA) to perform its job.
On metalink:
Diagnosing and Resolving ORA-4030 errors
Doc ID: Note:233869.1
Werner -
Error ORA-04030: out of process memory when trying to allocate 8512 bytes
Good Afternoon estimated
I want to see if anyone has the following problem occurred while there are about 70 concurrent connections to the Oracle instance. if anyone has any solution.
is grateful for the help in advance:
Dump file d:\oracle\data\admin\ppmdb\bdump\ppmdb_mmon_5032.trc
Thu Aug 11 09:23:40 2011
ORACLE V10.2.0.4.0 - Production vsnsta=0
vsnsql=14 vsnxtr=3
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the OLAP, Data Mining and Real Application Testing options
Windows NT Version V5.2 Service Pack 2
CPU : 8 - type 586, 1 Physical Cores
Process Affinity : 0x00000000
Memory (Avail/Total): Ph:5642M/8181M, Ph+PgF:17775M/20246M, VA:9M/2047M
Instance name: DBMM
Redo thread mounted by this instance: 1
Oracle process number: 11
Windows thread id: 5032, image: ORACLE.EXE (MMON)
*** 2011-08-11 09:23:40.429
*** SERVICE NAME:(SYS$BACKGROUND) 2011-08-11 09:23:40.413
*** SESSION ID:(161.1) 2011-08-11 09:23:40.413
*** KEWROCISTMTEXEC - encountered error: (ORA-04030: out of process memory when trying to allocate 8512 bytes (pga heap,kgh stack)
*** SQLSTR: total-len=267, dump-len=240,
STR={insert into wrh$_sysmetric_history (snap_id, dbid, instance_number, begin_time, end_time, intsize, group_id, metric_id, value) select :snap_id, :dbid, :instance_number, begtime, endtime, intsize_csec, groupid, metri}
===============
Note: This allows us to continue to connect more users and the only way to make new connections is restarting the instance
I Have Configurate: pga_aggregate_target integer 379584512
Total System Global Area 1577058304 bytes
Fixed Size 1299216 bytes
Variable Size 729812208 bytes
Database Buffers 838860800 bytes
Redo Buffers 7086080 bytes
Thank you for your possible help
Claudio T.804135 wrote:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
Windows NT Version V5.2 Service Pack 2
Memory (Avail/Total): Ph:5642M/8181M, Ph+PgF:17775M/20246M, VA:9M/2047M
I Have Configurate: pga_aggregate_target integer 379584512
Total System Global Area 1577058304 bytesHave a search on this forum (or google) for the error code, there should be lots of previous discussion on this one.
From no sign of 64-bit in the product banner plus VA (address space) 2 GB (close enough), it looks like the server is running as 32-bit process.
With SGA + PGA (target) adding up to nearly 1900 MB, my guess is you are hitting the 2 GB per process limit.
Lower SGA, it should help in the very short term. For longer term: lower resource demands or start planning for migration to 64-bit. -
Error: ORA-04030: out of process memory when trying to allocate 20060 bytes
I have tow portioned of query and uniond all it it gives error like ORA-04030: out of process memory when trying to allocate 20060 bytes
NOTE : PARTY ONE AND PART 2 INDUALY WORKS WELL BUTT IT GIVESS ERROR AT THE TIME OF UNION ALL
Please i m waiting for sharp response
-------------------------------------PART ONE START --------------------------------------------------------------------------
SELECT * FROM
SELECT
TO_CHAR(SOURCE) AS SOURCE,
ORG_ID,
-- 'HUSSNAIN' AS VENDOR_TYPE,
INV_PAY_VOUCHER,
INV_PAY_TYPE,
INV_PAY_NUM,
INV_PAY_VEN_ID,
INV_PAY_VEN_NAME,
INV_PAY_SITE,
INV_PAY_DATE,
INV_PAY_GROSS,
INV_PAY_AMT,
INV_PAY_DESC,
INV_PAY_HTAX,
INV_AMT,
INV_GST,
INV_PAY_AMT INVOICE_AMOUNT,
INV_GST_T INV_TOTAL_TAX,
NVL(DEBIT,0) AS DEBIT1,
NVL(CREDIT,0) AS CREDIT1,
VENDOR_SITE_NAME AS SITE_CODE,
INVOICE_DATE,
CHECK_NUMBER,
PAYMENT_DATE,
GL_CODE,
GL_CODE_DESC,
SUPPLIER_ID,
STATUS ,
COUNT(INV_PAY_DATE) AS TRANSACTION,
LINE,
SELECT
SUM(NVL(VX.DEBIT,0)) - SUM(NVL(VX.CREDIT,0)) OPN_BAL
FROM XX_AP_INVPAY_COMBINE_V1 VX
WHERE
SUBSTR(VX.INV_PAY_DATE,1,10) < TO_DATE(SUBSTR(:P_DATE1,1,10),'YYYY-MM-DD')
-- AND
-- SUBSTR(VX.INVOICE_DATE,1,10) < TO_DATE(SUBSTR(:P_DATE_INVOICE1,1,10),'YYYY-MM-DD')
AND VX.INV_PAY_SITE = nvl(:P_SITE_ID, VX.INV_PAY_SITE)
AND VX.Vendor_Site_name = nvl(:P_VENDOR_SITE_NAME , VX.Vendor_Site_name)
AND VX.INV_PAY_VEN_ID = nvl(:P_VEN_ID,INV_PAY_VEN_ID)
AND VX.ORG_ID = nvl(:P_ORG_ID,ORG_ID)
AND VX.SOURCE = NVL (:P_TRANSACTION_TYPE,VX.SOURCE)
AND vx.status = 'Approved'
AND VX.INV_PAY_SITE =V.INV_PAY_SITE
AND VX.Vendor_Site_name=V.VENDOR_SITE_NAME
AND VX.INV_PAY_VEN_ID=V.INV_PAY_VEN_ID
and vx.status = v.status
-- AND VX.SOURCE=V.SOURCE
-- &pwhereclause
) AS O_BALANCE_APPROVED,
SELECT
SUM(NVL(VX.DEBIT,0)) - SUM(NVL(VX.CREDIT,0)) OPN_BAL
FROM XX_AP_INVPAY_COMBINE_V1 VX
WHERE
SUBSTR(VX.INV_PAY_DATE,1,10) < TO_DATE(SUBSTR(:P_DATE1,1,10),'YYYY-MM-DD')
-- AND
-- SUBSTR(VX.INVOICE_DATE,1,10) < TO_DATE(SUBSTR(:P_DATE_INVOICE1,1,10),'YYYY-MM-DD')
AND VX.INV_PAY_SITE = nvl(:P_SITE_ID, VX.INV_PAY_SITE)
AND VX.Vendor_Site_name = nvl(:P_VENDOR_SITE_NAME , VX.Vendor_Site_name)
AND VX.INV_PAY_VEN_ID = nvl(:P_VEN_ID,INV_PAY_VEN_ID)
AND VX.ORG_ID = nvl(:P_ORG_ID,ORG_ID)
AND VX.SOURCE = NVL (:P_TRANSACTION_TYPE,VX.SOURCE)
and vx.status = 'Unapproved'
AND VX.INV_PAY_SITE =V.INV_PAY_SITE
AND VX.Vendor_Site_name=V.VENDOR_SITE_NAME
AND VX.INV_PAY_VEN_ID=V.INV_PAY_VEN_ID
and vx.status = v.status
-- AND VX.SOURCE=V.SOURCE
-- &pwhereclause
) AS O_BALANCE_UPAPPROVED,
SELECT
SUM(NVL(VX.DEBIT,0)) - SUM(NVL(VX.CREDIT,0)) OPN_BAL
FROM XX_AP_INVPAY_COMBINE_V1 VX
WHERE
SUBSTR(VX.INV_PAY_DATE,1,10) < TO_DATE(SUBSTR(:P_DATE1,1,10),'YYYY-MM-DD')
-- AND SUBSTR(VX.INVOICE_DATE,1,10) < TO_DATE(SUBSTR(:P_DATE_INVOICE1,1,10),'YYYY-MM-DD')
AND VX.INV_PAY_SITE = nvl(:P_SITE_ID, VX.INV_PAY_SITE)
AND VX.Vendor_Site_name = nvl(:P_VENDOR_SITE_NAME , VX.Vendor_Site_name)
AND VX.INV_PAY_VEN_ID=nvl(:P_VEN_ID,INV_PAY_VEN_ID)
AND VX.ORG_ID = NVL(:P_ORG_ID,ORG_ID)
AND VX.SOURCE = NVL (:P_TRANSACTION_TYPE,VX.SOURCE)
AND vx.status = v.status
AND VX.INV_PAY_SITE =V.INV_PAY_SITE
AND VX.Vendor_Site_name=V.VENDOR_SITE_NAME
AND VX.INV_PAY_VEN_ID=V.INV_PAY_VEN_ID
-- AND VX.SOURCE=V.SOURCE
-- &pwhereclause
) AS O_BALANCE
FROM XX_AP_INVPAY_COMBINE_V1 V
WHERE
SUBSTR (V.INV_PAY_DATE,1,10) BETWEEN NVL( TO_DATE(SUBSTR(:P_DATE1,1,10),'YYYY-MM-DD'),SUBSTR(V.INV_PAY_DATE,1,10)) AND nvl(TO_DATE(SUBSTR(:P_DATE2,1,10),'YYYY-MM-DD') ,SUBSTR(V.INV_PAY_DATE,1,10))
-- AND
-- SUBSTR(V.INVOICE_DATE,1,10) BETWEEN nvl( TO_DATE(SUBSTR(:P_DATE_INVOICE1,1,10),'YYYY-MM-DD'),SUBSTR(V.INVOICE_DATE,1,10)) AND nvl(TO_DATE(SUBSTR(:P_DATE_INVOICE2,1,10),'YYYY-MM-DD') ,SUBSTR(V.INVOICE_DATE,1,10))
AND V.INV_PAY_SITE=nvl(:P_SITE_ID,INV_PAY_SITE)
AND V.VENDOR_SITE_NAME = NVL(:P_VENDOR_SITE_NAME , V.VENDOR_SITE_NAME)
AND V.INV_PAY_VEN_ID=nvl(:P_VEN_ID,V.INV_PAY_VEN_ID)
AND V.ORG_ID=nvl(:P_ORG_ID,V.ORG_ID)
AND V.SOURCE = NVL (:P_TRANSACTION_TYPE,V.SOURCE)
-- ORDER BY INV_PAY_DATE,CHECK_NUMBER,INV_PAY_VOUCHER asc ,Debit1 desc ,credit1 DESC
GROUP BY
SOURCE,
ORG_ID,
-- 'HUSSNAIN' AS VENDOR_TYPE,
INV_PAY_VOUCHER,
INV_PAY_TYPE,
INV_PAY_NUM,
INV_PAY_VEN_ID,
INV_PAY_VEN_NAME,
INV_PAY_SITE,
INV_PAY_DATE,
INV_PAY_GROSS,
INV_PAY_AMT,
INV_PAY_DESC,
INV_PAY_HTAX,
INV_AMT,
INV_GST,
INV_PAY_AMT,
INV_GST_T,
DEBIT,
CREDIT,
VENDOR_SITE_NAME,
INVOICE_DATE,
CHECK_NUMBER,
PAYMENT_DATE,
GL_CODE,
GL_CODE_DESC,
SUPPLIER_ID,
STATUS,
LINE
ORDER BY
INV_PAY_DATE,
CHECK_NUMBER,
--V.SOURCE asc,
INV_PAY_NUM,
LINE,
--INV_PAY_DESC,
INV_PAY_VOUCHER
) A
-------------------------------------PART ONE END --------------------------------------------------------------------------
-------------------------------------PART TWO START --------------------------------------------------------------------------
UNION ALL
SELECT * FROM
SELECT * FROM
SELECT
DISTINCT
NULL AS SOURCE,
ORG_ID,
NULL AS INV_PAY_VOUCHER,
NULL AS INV_PAY_TYPE,
NULL AS INV_PAY_NUM,
INV_PAY_VEN_ID,
INV_PAY_VEN_NAME,
INV_PAY_SITE,
NULL AS INV_PAY_DATE,
NULL AS INV_PAY_GROSS,
NULL AS INV_PAY_AMT,
NULL AS INV_PAY_DESC,
NULL AS INV_PAY_HTAX,
NULL AS INV_AMT,
NULL AS INV_GST,
NULL AS INVOICE_AMOUNT,
NULL AS INV_TOTAL_TAX,
NULL AS DEBIT1,
NULL AS CREDIT1,
NULL AS SITE_CODE,
NULL AS INVOICE_DATE,
NULL AS CHECK_NUMBER,
NULL AS PAYMENT_DATE,
NULL AS GL_CODE,
NULL AS GL_CODE_DESC,
SUPPLIER_ID,
NULL AS STATUS ,
NULL AS TRANSACTION,
NULL AS LINE,
SELECT
SUM(NVL(VX.DEBIT,0)) - SUM(NVL(VX.CREDIT,0)) OPN_BAL
FROM XX_AP_INVPAY_COMBINE_V1_OP VX
WHERE
SUBSTR(VX.INV_PAY_DATE,1,10) < TO_DATE(SUBSTR(:P_DATE1,1,10),'YYYY-MM-DD')
-- AND
-- SUBSTR(VX.INVOICE_DATE,1,10) < TO_DATE(SUBSTR(:P_DATE_INVOICE1,1,10),'YYYY-MM-DD')
AND VX.INV_PAY_SITE = nvl(:P_SITE_ID, VX.INV_PAY_SITE)
AND VX.Vendor_Site_name = nvl(:P_VENDOR_SITE_NAME , VX.Vendor_Site_name)
AND VX.INV_PAY_VEN_ID = nvl(:P_VEN_ID,INV_PAY_VEN_ID)
AND VX.ORG_ID = nvl(:P_ORG_ID,ORG_ID)
AND VX.SOURCE = NVL (:P_TRANSACTION_TYPE,VX.SOURCE)
AND vx.status = 'Approved'
AND VX.INV_PAY_SITE =V.INV_PAY_SITE
AND VX.Vendor_Site_name=V.VENDOR_SITE_NAME
AND VX.INV_PAY_VEN_ID=V.INV_PAY_VEN_ID
and vx.status = v.status
-- AND VX.SOURCE=V.SOURCE
-- &pwhereclause
) AS O_BALANCE_APPROVED,
SELECT
SUM(NVL(VX.DEBIT,0)) - SUM(NVL(VX.CREDIT,0)) OPN_BAL
FROM XX_AP_INVPAY_COMBINE_V1_OP VX
WHERE
SUBSTR(VX.INV_PAY_DATE,1,10) < TO_DATE(SUBSTR(:P_DATE1,1,10),'YYYY-MM-DD')
-- AND
-- SUBSTR(VX.INVOICE_DATE,1,10) < TO_DATE(SUBSTR(:P_DATE_INVOICE1,1,10),'YYYY-MM-DD')
AND VX.INV_PAY_SITE = nvl(:P_SITE_ID, VX.INV_PAY_SITE)
AND VX.Vendor_Site_name = nvl(:P_VENDOR_SITE_NAME , VX.Vendor_Site_name)
AND VX.INV_PAY_VEN_ID = nvl(:P_VEN_ID,INV_PAY_VEN_ID)
AND VX.ORG_ID = nvl(:P_ORG_ID,ORG_ID)
AND VX.SOURCE = NVL (:P_TRANSACTION_TYPE,VX.SOURCE)
and vx.status = 'Unapproved'
AND VX.INV_PAY_SITE =V.INV_PAY_SITE
AND VX.Vendor_Site_name=V.VENDOR_SITE_NAME
AND VX.INV_PAY_VEN_ID=V.INV_PAY_VEN_ID
and vx.status = v.status
-- AND VX.SOURCE=V.SOURCE
-- &pwhereclause
) AS O_BALANCE_UPAPPROVED,
(SUM(NVL(V.DEBIT,0)) - SUM(NVL(V.CREDIT,0))) AS O_BALANCE
FROM XX_AP_INVPAY_COMBINE_V1_OP V
WHERE
SUBSTR(V.INV_PAY_DATE,1,10) < TO_DATE(SUBSTR(:P_DATE1,1,10),'YYYY-MM-DD')
AND V.INV_PAY_SITE=nvl(:P_SITE_ID,INV_PAY_SITE)
AND V.VENDOR_SITE_NAME = NVL(:P_VENDOR_SITE_NAME , V.VENDOR_SITE_NAME)
AND V.INV_PAY_VEN_ID=nvl(:P_VEN_ID,V.INV_PAY_VEN_ID)
AND V.ORG_ID=nvl(:P_ORG_ID,V.ORG_ID)
AND
( (SELECT (SUM(NVL(V.DEBIT,0)) - SUM(NVL(V.CREDIT,0))) FROM XX_AP_INVPAY_COMBINE_V1_OP V
WHERE
SUBSTR (V.INV_PAY_DATE,1,10) BETWEEN NVL( TO_DATE(SUBSTR(:P_DATE1,1,10),'YYYY-MM-DD'),SUBSTR(V.INV_PAY_DATE,1,10)) AND nvl(TO_DATE(SUBSTR(:P_DATE2,1,10),'YYYY-MM-DD') ,SUBSTR(V.INV_PAY_DATE,1,10))
-- AND
-- SUBSTR(V.INVOICE_DATE,1,10) BETWEEN nvl( TO_DATE(SUBSTR(:P_DATE_INVOICE1,1,10),'YYYY-MM-DD'),SUBSTR(V.INVOICE_DATE,1,10)) AND nvl(TO_DATE(SUBSTR(:P_DATE_INVOICE2,1,10),'YYYY-MM-DD') ,SUBSTR(V.INVOICE_DATE,1,10))
AND V.INV_PAY_SITE=nvl(:P_SITE_ID,INV_PAY_SITE)
AND V.VENDOR_SITE_NAME = NVL(:P_VENDOR_SITE_NAME , V.VENDOR_SITE_NAME)
AND V.INV_PAY_VEN_ID=nvl(:P_VEN_ID,V.INV_PAY_VEN_ID)
AND V.ORG_ID=nvl(:P_ORG_ID,V.ORG_ID)
AND V.SOURCE = NVL (:P_TRANSACTION_TYPE,V.SOURCE)) IS NULL
GROUP BY
ORG_ID,
INV_PAY_VEN_ID,
INV_PAY_VEN_NAME,
INV_PAY_SITE,
SUPPLIER_ID,
V.VENDOR_SITE_NAME,
V.STATUS
--UNION ALL
) B
-------------------------------------PART TWO END --------------------------------------------------------------------------Hi,
This error is typically associated with the OS being unable to allocate any more memory to a process. It typically manifests itself in 32 bit operating systems, especially Windows, where processes are limited to a maximum 2Gb, but with the way memory is allocated, 1.5Gb tends to be a more realistic limit. With an Oracle instance this means that the total memory requirements, SGA and PGA, should not exceed about 1.5Gb. In Windows, because connection processes also run as threads of the server process, these are also part of the calculation.
The way then to avoid, or at least reduce this error, is to reduce the memory requirements of the database instance. Also, because some operating systems do not release unused process memory very easily, regular bounces of the database may also help avoid the error, provided you have the luxury to do this.
The long term fix to this error would be to upgrade to a 64 bit operating system, where this limit is greatly increased. There is also a feature of 32 bit windows that can be added (forget what its called) that increases the 2Gb limit to 3Gb.
Regards
Andre
Maybe you are looking for
-
NullPointerException - Cannot get the value from variable f_cashGiven
In SubCheckout.java (a POS), what I want is when Payment button (f_cashPayment) is pressed, the action "Cash" is performed, get the value from Cash Given (f_cashGiven), do the subtraction and post the value as Cash Return (f_cashReturn). The code is
-
How can I download my TV episodes to my Macbook Pro. I bought them from my iPad2, and I looked for them with the same AppleID on iTunes Store and they wont download to my iTunes.
-
after the newest update ( iso 7) , i can no longer type in traditional chinese ( pin yin), does anyone else have the same problem?
-
This problem is rustling my jimmies hardcore Everytime I restart Firefox or Internet Explorer "Adobe Flash Player 11.3" always resets back to 100% in the Window's volume mixer while everything else stays put. My Skype volume never resets after a rest
-
Thunderbolt port problems with Hard drive
Hello guys, since I updated to Yosemite 10.10.2 I have a problem with port thunderbolt, to which I have connected a hard disk. When I turn off the hard disk with its button after pressing "eject", the hard disk turns off but also restarts the MAC. I