lunes, 1 de agosto de 2016
The free feature for Oracle to create materialized views in all release, how to update a materialized view from a trigger
It's called a package
First we have the select, of one or more tables; and the table to store it
Second we create a procedure that insert the query in a table
Third we update it
1) if we want a transactional update, we create a procedure that inserts the values for the new records in the trigger of the tables
2) if we want a log fast refresh, we create a log that stores id of records we want to be updated
3) if we want a full update, we create job
Fourth
For the update process depending the option we have to create a procedure, add to the trigger/job and that all.
Fifth
Aditionally we have a validation procedure that periodically if he found differences can generate a full or partial refresh.
First
Create a package
XXX.PCK_MV_OWNER_TABLE
Procedure:FullRefresh
insert into table
select from tableA,tableB
-- note in this refresh you can put
Procedure:PartialRefreshperTrigger
This must be in a trigger update and or delete
insert into table
select from tableA,tableB
where column=:new.value and column2=:new.value2
Procedure:PartialRefreshperFunction
insert into table
select from tableA,tableB
where not exists in table
Procedure:PartialRefreshperFunction using log
This requires a table that stores ids of modified rows, and a trigger that inserts the rowid when the needed columns of the table are modified, and generates a refresh only of those records in the database.
insert into table
select from tableA,tableB
where not exists in table
Procedure:fast refresh fast
delete from;
FullRefresh;
Procedure:fast refresh online
truncate table;
FullRefresh;
Procedure:validation
with
a select from tableA,tableB
b select fro mtable
select count(*) from
(select from a
minus
select from b
union all
select from b
minus
select from a)
if count>0 then
fullrefresh; -fast or online it dependes on you
end if;
/
Jobs
create job executes validation periodically, depending the tables, etc.
create job if using log to update the materialized view periodically
optionally, create jobs makes partial insert, to reinforce validation.
optionally, makes a full refresh
:)
viernes, 6 de mayo de 2016
can't see dialogs when installing 11.2. on oracle linux 7
The reason is the support is from 11.2.0.4
martes, 3 de mayo de 2016
Where can I download 12.1.0.1 database release for linux 64x
in edelivery
http://www.dbajunior.com/download-oracle-12c-software/
http://www.dbajunior.com/download-oracle-12c-software/
viernes, 29 de abril de 2016
oracle linux database installer can't find elfutils-libelf-devel-0.97 pdksh-5.2.14
If you run the validation it's ok
The problem is in the database/stage/cvu/cv/admin/cvu_config
configuration file
You can ignore or set CV_ASSUME_DISTID=
to OEL6 or higher.
make a backup and test before :)
The problem is in the database/stage/cvu/cv/admin/cvu_config
configuration file
You can ignore or set CV_ASSUME_DISTID=
to OEL6 or higher.
make a backup and test before :)
miércoles, 20 de abril de 2016
Can ping from Oracle linux to an address but not to a name
In Oracle linux, we assigned 8.8.8.8 as dns, and we could ping 8.8.8.8, but can't ping to www.google.com in example.
We solved assigning the dns we used to assign to our microsoft windows computer.
We solved assigning the dns we used to assign to our microsoft windows computer.
viernes, 5 de febrero de 2016
ORACLE EXP ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors SOLVED
PROBLEM:
Connected to: Oracle Database 12c Release 12.1.0.1.0 - 64bit Production
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
About to export specified users ...
. exporting pre-schema procedural objects and actions
EXP-00008: ORACLE error 4063 encountered
ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
ORA-06512: at line 1
EXP-00083: The previous problem occurred when calling SYS.DBMS_CUBE_EXP.schema_info_exp
SOLUTION:
The problem apparently are components incorrectly installed.
I solved in my developer database, if you are going to do it in production Isuggest to investigate a little more.
--BACKUP
create table sys.exppkgact$_backup as select * from sys.exppkgact$;
-- DELETE
delete from sys.exppkgact$ where package = 'DBMS_CUBE_EXP' and schema= 'SYS';
Connected to: Oracle Database 12c Release 12.1.0.1.0 - 64bit Production
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
About to export specified users ...
. exporting pre-schema procedural objects and actions
EXP-00008: ORACLE error 4063 encountered
ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
ORA-06512: at line 1
EXP-00083: The previous problem occurred when calling SYS.DBMS_CUBE_EXP.schema_info_exp
SOLUTION:
The problem apparently are components incorrectly installed.
I solved in my developer database, if you are going to do it in production Isuggest to investigate a little more.
--BACKUP
create table sys.exppkgact$_backup as select * from sys.exppkgact$;
-- DELETE
delete from sys.exppkgact$ where package = 'DBMS_CUBE_EXP' and schema= 'SYS';
jueves, 28 de enero de 2016
problems IMPDP in Oracle xe 11g FIXED
After exporting from 12c with expd version=11
I imported in 11g xe 64x successfully only after updating files, I think this is not legal, but I did only to try.
UDI-31626: operation generated ORACLE error 31626
ORA-31626: job does not exist
ORA-39086: cannot retrieve job information
ORA-06512: at "SYS.DBMS_DATAPUMP", line 3326
ORA-06512: at "SYS.DBMS_DATAPUMP", line 4551
ORA-06512: at line 11) I had to update i
n the folder C:\oraclexe\app\oracle\product\11.2.0\server\oracore\zoneinfo
all teh files from the same folder from 12c
2) I had to update all the contents from the folder C:\oraclexe\app\oracle\product\11.2.0\server\rdbms\xml from an 11g version too.
the command exec dbms_metadata_util.load_stylesheets; must be successful
Import: Release 11.2.0.2.0 - Production on Thu Jan 28 17:21:11 2016
Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
ORA-39006: internal error
ORA-39213: Metadata processing is not available
and the import was successfully
Suscribirse a:
Entradas (Atom)