Oracle 6i Refresh Function
May 18, 2009
when i press the save button in my application the record will be saved but the value in my "display item" wont be refreshed. when i minimize the form designer and maximize it again, the "display item" is refreshed.
so i am searching for a "refresh" function
SYNCHRONIZE;
redisplay;
these functions doesn't work.
View 3 Replies
ADVERTISEMENT
Aug 17, 2010
Is there any function to refresh all views and functions in oracle.
View 4 Replies
View Related
Aug 14, 2010
I am getting ORA -32320 when I tried to fast fresh MVs that were truncated.I am able to complete refresh all MVs. However, some MVs are still giving me ORA-32320 when I try to do fast refresh even after complete refresh.
DBMS_MVIEW.EXPLAIN_PLAN says the MVIEW can be fast refreshed.
ERROR at line 1:
ORA-32320: REFRESH FAST of "dev"."Claim_line" unsupported after cointainer table
PMOPs
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 803
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 860
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 841
ORA-06512: at line 1
Quote:ORA-32320:
REFRESH FAST of "string"."string" unsupported after container table PMOPs Cause: A Partition Maintenance Operation (PMOP) has been performed on the materialized view, and no materialized view supports fast refersh after container table PMOPs. Action: Use REFRESH COMPLETE. Note: you can determine why your materialized view does not support fast refresh after PMOPs using the DBMS_MVIEW.EXPLAIN_MVIEW() API.
how to again make the MVs fast refreshable?
View 4 Replies
View Related
Sep 10, 2013
My materialized view has to get refreshed as part of a scheduled package. When I refresh the materialized view manually using the following statement,
DBMS_MVIEW.REFRESH('info.sales_fact_load_mv', 'C');
it is working fine. However, when I use the same statement in the package which is scheduled to run every morning, it is not working. What could be the reason?
View 6 Replies
View Related
Dec 10, 2012
I'd like to set up a new Oracle Materialzed View to automatically default to refresh FAST every hour. I have no trouble setting this up in the CREATE MATERIALIZED VIEW statement. However, we will occasionally be performing table maintenance on the table referenced by the MV. At that time I would like to use dbms_mview.REFRESH to execute a refresh ON COMMAND (either F or C depending on the operation weperformed on the table). I have read that this will override the automatic refresh every hour that was set up for the MV when it was created. However - wil the override be permanent? Or will the MV continue to automaticaly FAST refresh every hour after the ON COMMAND refresh is completed?
View 1 Replies
View Related
Nov 15, 2012
I want to ask will be a beta refresh for managed provider soon. I reported a few bugs, one of them is a stopper and I wander are they fixed ?
Bug: Oracle Managed Provider and BindByName
and
Bug: Oracle Managed Provider and comments in SQL
View 0 Replies
View Related
May 3, 2013
we want to truncate a oracle Table in the Oracle DB. After the truncate the fact table will be loaded again. After the new load in the fact table we want to tell the times ten db to refresh the cache table. The cache Table is a user owned read-only cache group with no autorefresh. We want to tell times ten in a PL/SQL Block from Oracle DB that starts the refresh from the cache group in times ten. The refresh should not be a autorefresh because the refresh should only start if the fact table will new loaded after the truncate.
View 1 Replies
View Related
Oct 13, 2012
I will have to proceed with Oracle 9 database refresh from production server to integration server. 5 biggest schemas must be exported and imported. They constitute 97% space used in a database. This is very big database so I would like to be sure that everything will go smoothly. That is why i want to ask you some questions.
Have you got any clues for me before I start with exp/imp? From my side i will tell you that I will have to exp/imp schema by schema because there is small space both on production and integration disk for a dump. First thing I thought are dependencies between schemas that are exported and that which are not, and also between schemas that are exported/imported one by one.
This is procedure that I plan:
For every schema that is to be refreshed
{
1. Export schema with ROWS=N CONSTRAINTS=Y
2. EXPORT schema with ROWS=y CONSTRAINTS=N
3. Import schema from step one
4. Disable all the foreign key constraints using ALTER TABLE DISABLE CONSTRAINT.
5. Import schema with rows
}
ALTER TABLE ENABLE CONSTRAINT
With above procedure i think that I will avoid problems with dependencies between schemas exported/imported one by one. But my concern is if there are any dependencies between those schemas and schemas that are not exported. Is there an way to check it before refresh ?
View 4 Replies
View Related
Jul 15, 2012
I am using lag function to display values like below:
order details date starttime
----------------- -------- --------------
main order 1 07/10/12 06:00am
line 1 07/10/12 06:21am
line 2 07/10/12 06:31am
main order 2 07/11/12 07:00am
line 1 07/11/12 07:01am
line 2 07/11/12 07:02am
the data displays correctly when i use lag function except that the line 1 details are never getting displayed ie first line under every order does not get displayed? is using lag function in this case correct?
View 13 Replies
View Related
Sep 11, 2012
I have written a query which basically retrieves id and created date. IF i put MAX function it is returning id which have max created date. But if i use min function this query is not providing id with min created date,its not returning any rows.
SELECT To_char(OSH.osh_id),
OSH.osh_created
FROM tn_order_status_history osh,
tn_order_status_type ost,
tn_orderline_product op
[code]..........
View 4 Replies
View Related
Feb 11, 2009
Well the company i work for has just recently upgraded from Oracle 9i to 10g. We are having various problems with the migration, and with certain code breaking. My question regards this piece of code;
[code]
to_number(to_char('a_date','YYYY'))
[code]
There are various statements like the one above scattered throughout a query i am trying to fix. When run, the query returns an "invalid number ora-01722" error, which i know is caused by the above code.
if this method of converting from date, to character was discontinued from 9i to 10g?it just seems strange as there are a lot of statements like the one above and they must have worked at some point, but now i cant even get one to work on its own.
View 3 Replies
View Related
Jul 5, 2012
I have the following function:
CREATE OR REPLACE FUNCTION get_project_id(
schema_p IN VARCHAR2,
table_p IN VARCHAR2)
RETURN VARCHAR2
IS
projects_pred VARCHAR2 (400);
[code].......
I am trying to get the projects a user has from the works_on table (user_id, project_id). The user_id is retrieved from the context projects_ctx. I am getting the error Function created with compilations errors.
View 6 Replies
View Related
May 14, 2010
can we use htp package in function?
something like
if event_id = p_event_id THEN
htp.tableRowOpen;
htp.tableData(htf.bold('Evnt'), 'RIGHT', cattributes=>'CLASS=bptext');
htp.tableRowClose;
end if;
View 4 Replies
View Related
Jul 11, 2011
Here is the test-table creation script:
CREATE TABLE TEST1 (AGG_DATE DATE, COL1 NUMBER(9), COL2 NUMBER(9), COL3 NUMBER(9));
Here is the test-data population script:
insert into TEST1 (AGG_DATE, COL1, COL2, COL3)
values (to_date('01-01-2012', 'dd-mm-yyyy'), 1, 1, 1);
[code]....
The problem is when I wrote an analytical query, it is giving the BEGIN_DATE and END_DATE by taking all the partition values together and so instead of the values above, it is creating an answer as follows:
Wrong Dataset
BEGIN_DATEEND_DATECOL1COL2COL3
1/1/20121/8/2012111
1/1/20121/8/2012111
1/1/20121/8/2012111
1/1/20121/8/2012111
1/4/20121/11/2012222
1/4/20121/11/2012222
[code]....
Only the last row is correct. What can I do to get the right answer as I know am falling short? Here is my current query:
SELECT MIN(AGG_DATE) OVER(PARTITION BY COL1, COL2, COL3) BEGIN_DATE,
MAX(AGG_DATE) OVER(PARTITION BY COL1, COL2, COL3) END_DATE,
COL1,
COL2,
COL3
FROM TEST1;
View 6 Replies
View Related
Apr 16, 2013
I'm using the following code for a function which is working fine in Oracle 9i, but throwing error like ORA-06512 (Numeric value error) in Oracle 11g.
CREATE OR REPLACE FUNCTION Decrypt(toconvert VARCHAR2) RETURN VARCHAR2 IS
str_original VARCHAR2(30);
str_new VARCHAR2(30);
sub_str VARCHAR2(1);
j NUMBER;
[code]......
View 17 Replies
View Related
Jun 16, 2010
I have an oracle package that i am using to search for a string in a blob entry. I compiled the package and the package body in one environment, it had no errors, when i execute, i get my results.I went ahead and created the same package and function in another environment and it fails by giving me the below error
ORA-06503: PL/SQL: Function returned without value ORA-06512: at "SYSTEM.IMPACTUS_PCODE", line 158 for sysadm
I have used this on other environments often and have never had an issue.
View 7 Replies
View Related
Jun 16, 2013
I have a table with date column (16/06/1996 15:03:59) as value in the displayed format. As I have tried with the below query format I could not able to retrieve the
records. select * from <table> where DATE_INSERT=SYSDATE;
Retrieve the rows for the tables ?
View 2 Replies
View Related
May 24, 2011
Is it possible to use WITH statement in an Oracle procedure or function?
I've had problems compiling a procedure with "WITH" statement.
View 1 Replies
View Related
Oct 11, 2012
We have a function that is called in various other PL/SQL packages, and performance has always been very good. On 29th Sept we upgraded our db to 10.2.0.5.0 and since then, a package that calls the function has gone from ~4mins, to ~2.5hrs to run.
In PL/SQL Developer, a simple select that calls the function has gone from ~0.5secs to retrieve the first 100 rows, to ~12secs. I ran a profile of the main package, which highlighted the where the bottleneck was (a fetch from an explicit cursor). Running an explain plan on the cursor SQL doesn't really show up anything untoward.
However, I found that if I subtly changed the cursor SQL, (so that it did the same thing, but was written differently), it fixed the performance problems.
where ade_start_date between cpDate-cpDays and cpDate-1
/*and ade_start_date < cpDate
and ade_start_date >= (cpDate-cpDays)*/
From this, we thought that there may have been a bad cached execution plan which the change of code forced a recalculation of. However, about 2 hours later, the changed code ran slowly again. So a further subtle change was made, which fixed the issue again. Until this morning, when it was running slowly again.
This feels like it is CBO/stats related potentially, but is out of my area of knowledge unfortunately. We have our DBA investigating this, but there may be things I can test to narrow down the possibilities in the meantime.
View 5 Replies
View Related
Jan 6, 2009
I am using REGEXP_LIKE function, but it is giving me error like this.
SQL>select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
5 rows selected.
SQL>select regexp_like(testcol,'^ab[cd]ef$') from test;
select regexp_like(testcol,'^ab[cd]ef$') from test
*
ERROR at line 1:
ORA-00904: "REGEXP_LIKE": invalid identifier
But in Oracle documentation it is given under heading of 10g. Does Oracle 10g supports this function?
View 11 Replies
View Related
Nov 26, 2012
Is it possible to find the dependency of a Function whether it is used somewhere in the package or procedure or some other functions?
Suppose I have function named get_valid_loc , Now my question is how to find out in which place this function has been used.
View 13 Replies
View Related
Dec 22, 2006
Is there is an equivalent to the 'LEFT' Function of SQLServer in Oracle9i?
View 10 Replies
View Related
Apr 15, 2010
i have a project that needs to have a identity number in the table.this is the table:
create global temporary table BOOK_INFO
( row_id number(5),
BOOK_TITLE char(20),
BOOK_AUTHOR char(15)
) on commit preserve rows;
i dont know how can i generate row_id, in sybase i can only set the datatype of row_id in IDENTITY and it will automatically generates number and as the transaction ended the row_id will automatically back to 1.
in oracle i tried to create sequence but it didnt back to 1 when the transaction/procedure ended.. Like for example if the procedure ended and the last row_id inserted in the table is 300 the next run of the procedure will start in 301. but i need to start in 1 in every run of the procedure.
Also, i tried to set the variable v_row_id to 0 and it increment by 1 as it insert in the table, but the problem is there are times that in 1 book_title there is more than 1 author. so the v_row_id of the book_title with more than 1 author is all the same.Here is my query:
insert into BOOK_INFO
(select v_row_id, BOOK_TITLE, BOOK_AUTHOR from LIBRARY);
The result is:
ROW_ID BOOK_TITLE BOOK_AUTHOR
1 BOOK_1 AUTHOR_1
1 BOOK_1 AUTHOR_2
1 BOOK_1 AUTHOR_3
1 BOOK_1 AUTHOR_4
2 BOOK_2 AUTHOR_5
View 8 Replies
View Related
Oct 18, 2010
what the following output of the oracle function "dump" means?
query: select dump(:new.messaging_state) from dual
output:
Typ=2 Len=1: 193
I need this debug output because I want to know which value the program wants to write in the columns messaging_state.
The update fails because of a parent Key violation.
View 2 Replies
View Related
May 30, 2012
saw in one procedure using host function in below manner.
v_status:= host(v_cmd);
But i searched for the host function it is not available.
My question is --Is there any pre defined built-in function "host" in oracle 10g.
View 1 Replies
View Related
Jun 19, 2013
I need function to pick the record from DB random manner.
For example
, say we have 500 records and input value to the function is 5 means, it should display the records randomly between 1 to 5
If user inputted value is 10 means, it should display one record between 1 to 10.
View 1 Replies
View Related
Apr 7, 2011
I tried to use external C procedure from the database and i did all required steps as below.
1. create a C program
2. compile and link the C program
3. copy it to the Oracle_home/bin directory
4. configure listener.ora and tnsnames.ora files
listener.ora
=======
callout_listener =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP) (HOST = ip_address)(PORT = 1521)
[code]...
View 4 Replies
View Related
Feb 6, 2006
I have created a Package Body and Package Spec for a function to select a username and a password from a table and return the username.
The code i have created is this:-
CREATE OR REPLACE PACKAGE BODY USER_LOGIN
AS
FUNCTION user_select (USERNAME_IN VARCHAR2,
PASSWORD_IN VARCHAR2)
RETURN VARCHAR2 IS
USERNAME_OUT VARCHAR2(12);
BEGIN
[code]........
The package body and spec compiles successfully but i am having trouble when i execute this function. I am trying to do this :-
VARIABLE RETVAL VARCHAR2(12)
EXEC User_login.user_select('HELLO','HELLO',:RETVAL );
but i am getting the following error
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'USER_SELECT'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
View 5 Replies
View Related
Jul 18, 2011
I am trying to search a way to get the SQL statement that caused an exception withing an oracle function.
I tried:
SELECT sql_text
from v$session ses, v$sql sql
where sql.sql_id = ses.prev_sql_id
and ses.sid = sys_context('userenv','SID') AND ROWNUM = 1;
but this doesn't always return the last statement that the function has executed. if needed i can send the complete script for the function and its tables and stored procedures for testing.
View 3 Replies
View Related
Mar 13, 2009
how do i can make oracle function for the following vb6 function.
This function is used for calculating working days between two date.
****************************************
Public Function Work_Days(BegDate As Variant, EndDate As Variant) As Integer
' Note that this function does not account for holidays.
Dim WholeWeeks As Variant
Dim DateCnt As Variant
Dim EndDays As Integer
On Error GoTo Err_Work_Days
BegDate = DateValue(BegDate)
EndDate = DateValue(EndDate)
WholeWeeks = DateDiff("w", BegDate, EndDate)
DateCnt = DateAdd("ww", WholeWeeks, BegDate)
[code]......
View 3 Replies
View Related