Ik ben Dik Pater, werkzaam als Oracle Dba. Ervaring met Oracle6,7,8,9,10,11&12(op exadata) Sinds december 2008 OCM-10G sinds december 2014 OCP 12c.
Wednesday, January 20, 2021
Model Studio displays "The data advisor failed to run on the selected data source
Tuesday, December 8, 2020
SAS VIYA : sas.identities.providers.ldap.connection pool.whenexhausted type must be integer in GUI
Error is :
Het type "string" is ongeldig voor de eigenschap "pool.whenExhaustedAction". Het type moet "integer" zijn
Solve with :
/appl/sas/viya/home/bin/sas-admin configuration
configurations download --target /tmp/ldapconnection.json
--definition-name sas.identities.providers.ldap.connection --service
identities
Write is complete to "/tmp/ldapconnection.json".
$ vi /tmp/ldapconnection.json
ADJUST the value from 1 in 2.
$ /appl/sas/viya/home/bin/sas-admin configuration
configurations update --file /tmp/ldapconnection.json
"PATCH" "/configuration/configurations"
complete from "/tmp/ldapconnection.json".
Monday, September 21, 2020
memsize in sas viya
For testing purposes I edited :
/appl/sas/viya/config/etc/compsrv/default/sasv9_usermods.cfg
-memsize 0
this resulted in a maximum in my case :
No restart was necessary, just a new cas session.
Wednesday, December 11, 2019
filesize powershel script
$dirs='c:\temp', 'd:\batch'
$size = 0
$datum=Get-Date -Format "yyyyMMdd"
foreach ($file in (get-childitem -path $dirs -file)) {
$file.FullName + "," + $file.Length + "," + $datum | out-file -filepath $logfile -append }
commandline oracle bipublisher login and clear cache , java nullpointer calling xmlpserver java.lang.NullPointerException wwv_flow_webservices_api.make_request
p_url => l_url,
p_envelope => l_env );
Friday, March 30, 2018
impdp hang
I use ctrl-c.
status ....
somestate returns
status ....
somestate returns again unchanged.
don't do kill_job !
don't do stop_job !
But look in the view dba_resumable......
There it is : unable to extend tablespace x or tablespace temp...
Alter database datafile 'x' autoextend on maxsize 64G ;
in impdp prompt you can now enter CONTINUE_CLIENT.
The output will continue again.
And in the best case your import will continue.
Happy Easter !
Dik
Friday, November 3, 2017
reset password of apex user.
set verify off
undefine workspace
undefine newwachtwoord
undefine USERNAAM
prompt geef TRUE of FALSE op bij de CHANGE_PASSWORD_ON_FIRST_USE
begin
wwv_flow_api.set_security_group_id (p_security_group_id => apex_util.find_security_group_id(upper('&&workspace')));
for user_rec in (
select user_id, user_name
from WWV_FLOW_USERS
where security_group_id = ( select apex_util.find_security_group_id('&&workspace') from dual )
and upper(user_name) = upper('&&USERNAAM')
)
loop
APEX_UTIL.RESET_PASSWORD(
p_user_name => upper('&&USERNAAM'),
P_NEW_PASSWORD => '&&newwachtwoord',
P_CHANGE_PASSWORD_ON_FIRST_USE=> &CHANGE_PASSWORD_ON_FIRST_USE);
end loop;
exception when others then raise ;
end ;
/
prompt &&USERNAAM wachtwoord is geworden &&newwachtwoord
prompt geef commit of rollback
throughput of expdp
do
prev=`ls -l *.dmp | awk '{a+=$5}END{printf("%.0f\n",a/1024/1024)}'`
sleep 60
next=`ls -l *.dmp | awk '{a+=$5}END{printf("%.0f\n",a/1024/1024)}'`
doorloop=`expr $next - $prev`
echo $next $prev $doorloop
done
Tuesday, October 17, 2017
EM12c and EM13c datasources report.
SELECT
*
FROM
(
SELECT
'CONNECTIONPOOLS',
s4.cm_target_name,
s4.URL
FROM
CM$MGMT_OC4J_CONNECTIONPOOLS s4
UNION ALL
SELECT
'MANAGED DATASOURCE',
s3.cm_target_name ,
s3.URL
FROM
CM$MGMT_OC4J_DATASOURCES s3
UNION ALL
SELECT
'NATIVE' ,
s5.cm_target_name,
s5.URL
FROM
CM$MGMT_OC4J_NATIVEDATASOURCES s5
)
sel
Monday, September 25, 2017
workspace export in sqldeveloper with apex 3.2.1 runtime
Just did a trace in our DVL environment, this was executed.
In sqldeveloper just put in the code , activate OWA output from view -> owa output :
NOTE replace :WORKSPACE with your workspace.
declare
l_orig_sgid number := wwv_flow_security.g_security_group_id;
begin
for c1 in (select provisioning_company_id
from wwv_flow_companies
where short_name = upper(':WORKSPACE')) loop
wwv_flow_security.g_security_group_id := c1.provisioning_company_id;
end loop;
--
-- htp.init;
wwv_flow.g_page_text_generated := true;
wwv_flow_fnd_user_api.g_mime_shown := true;
owa_util.mime_header('application/x-sql',false);
htp.p('Content-Disposition: attachment; filename='|| wwv_flow_utilities.escape_url(p_url => ':WORKSPACE', p_url_charset => 'utf-8') ||'.sql');
owa_util.http_header_close;
--
wwv_flow_fnd_user_api.export_fnd_users(p_export_format=>'UNIX');
--
wwv_flow.g_page_text_generated := true;
wwv_flow.g_unrecoverable_error := true;
wwv_flow_security.g_security_group_id := l_orig_sgid;
--
exception when others then
wwv_flow_security.g_security_group_id := l_orig_sgid;
raise;
end;
/
Select 'greetings from dik pater ' from dual ;
Monday, April 24, 2017
keepass keeppass slow on opening files
Monday, January 30, 2017
Regexp replace until space sed regular expression
else {printf("GEHEIM ")}if(i==NF){printf("\n")}}}
Monday, October 10, 2016
oem 13c firefox flash performance tab not working
I downloaded the latest version of flash libflashplayer.so from adobe http://labs.adobe.com/downloads
I choosed:
https://fpdownload.macromedia.com/pub/labs/flashruntimes/flashplayer/linux64/libflashplayer.so
I copied this file to /usr/lib/mozilla/plugins
after that I installed flash-plugin-11.2.202.635-release.x86-64.rpm.
rpm -ivh flash-plugin-11.2.202.635-release.x86-64.rpm
I restarted Firefox and OEM 13C Performance tab was working !
Thursday, December 24, 2015
brief technical note on images export import to new apex 41 database from hpux 11gr2 to linux 11gr2
Then we made a full export, we imported everything except apex_040100 user
| INFO APEXEXport $ cd ..apex41/apex/utilities $ export CLASSPATH=.:${ORACLE_HOME}/oui/jlib/classes12.jar $ read wachtwoord # exporteer eerst de WORKSPACES middels test_export $ java oracle.apex.APEXExport -db HOSTNAME:1521:DATABASE_SERVICE -user system -password $wachtwoord -instance |
Gave me the export of the applications
But the workspace files were empty, THIS is a bug.
https://apexplained.wordpress.com/2012/03/20/workspace-application-and-page-export-in-plsql/
I used to export the workspaces.
I installed the procedures and then used :
REM desc PRO_EXPORT_WORKSPACE
REM PROCEDURE PRO_EXPORT_WORKSPACE
REM Argument Name Type In/Out Default?
REM ------------------------------ ----------------------- ------ --------
REM P_WORKSPACE_ID NUMBER IN
REM P_INCLUDE_TEAM_DEV BOOLEAN IN
REM P_ORA_DIR VARCHAR2 IN
REM
REM MY_ORA_DIR
REM
col workspace_id format 999999999999999999
declare
cursor c_ws is
select workspace_id from apex_workspaces where workspace_id > 11 ;
r_ws c_ws%rowtype ;
begin
for r_ws in c_ws
loop
PRO_EXPORT_WORKSPACE( r_ws.workspace_id , TRUE,'MY_ORA_DIR') ;
end loop ;
end;
/
| expdp full=y DIRECTORY=EXP_DB DUMPFILE=dp_EVERYTHING%u LOGFILE=EXP_DB:dp_EVERYTHING.log FILESIZE=20G PARALLEL=4 FLASHBACK_TIME=SYSTIMESTAMP |
DUMPFILE=dp_EVERYTHING%U.dmp
$ cat images_impdp_WWV_FLOW_REPOSITORIES_TO_DIKPATER.par |
parallel=4
directory=IMP_DB
tables=APEX_040100.WWV_FLOW_CSS_REPOSITORY,APEX_040100.WWV_FLOW_IMAGE_REPOSITORY,APEX_040100.WWV_FLOW_HTML_REPOSITORY
remap_schema=(APEX_040100:DIKPATER)
remap_tablespace=(SYSAUX:USERS)
SQL> alter table flows_files."WWV_FLOW_FILE_OBJECTS$" disable all triggers ;
$ impdp parfile=images_impdp.par
SQL> alter table flows_files."WWV_FLOW_FILE_OBJECTS$" enable all triggers ;
Now we handle :
apex_040100.WWV_FLOW_IMAGE_REPOSITORY
apex_040100.WWV_FLOW_CSS_REPOSITORY
apex_040100.WWV_FLOW_HTML_REPOSITORY
!!! create a user DIKPATER ( in my case) to hold the 3 REPOSITORY tables temporary.
!!! with tablespace quota ...and create table
$ impdp parfile=images_impdp_WWV_FLOW_REPOSITORIES_TO_DIKPATER.par
SQL> select * from apex_040100.WWV_FLOW_CSS_REPOSITORY ;
SQL> alter table apex_040100.WWV_FLOW_CSS_REPOSITORY disable all triggers ;
SQL> insert into apex_040100.WWV_FLOW_CSS_REPOSITORY
select * from dikpater.WWV_FLOW_CSS_REPOSITORY ;
SQL> alter table apex_040100.WWV_FLOW_CSS_REPOSITORY
enable all triggers ;
SQL> select * from APEX_040100.WWV_FLOW_IMAGE_REPOSITORY ;
SQL> alter table apex_040100.WWV_FLOW_IMAGE_REPOSITORY disable all triggers ;
SQL> insert into apex_040100.WWV_FLOW_IMAGE_REPOSITORY
select * from dikpater.WWV_FLOW_IMAGE_REPOSITORY
where (flow_id, image_name, security_group_id) not in ( select flow_id, image_name, security_group_id from apex_040100.WWV_FLOW_IMAGE_REPOSITORY) ;
SQL> alter table apex_040100.WWV_FLOW_IMAGE_REPOSITORY
enable all triggers ;
SQL> alter table apex_040100.WWV_FLOW_HTML_REPOSITORY disable all triggers ;
SQL> insert into apex_040100.WWV_FLOW_HTML_REPOSITORY
select * from dikpater.WWV_FLOW_HTML_REPOSITORY ;
SQL> alter table apex_040100.WWV_FLOW_HTML_REPOSITORY
enable all triggers
Now the images are imported and ready to use.
I found many hits on the internet about missing images after import, they suggest just to import WWV_FLOW_FILE_OBJECTS$ alone, but in my opinion it is not enough.
I cannot find if this is a supported method, but maybe this can be helpfull.
Regards.
Dik Pater
EM12c Metric Extension output
||':' || dbl.host
Wednesday, June 3, 2015
upgrade apex 41 to apex 425 issue ora-01400 ARP DML automatic row processing
automatic row processing dml not working after upgrade apex 41 to apex 425 After upgrade from apex41 to apex425 we experience that ARP dml is not working properly. We loose variable information, so the insert fails. Error Codes : ORA-01400 This was to a bug : In our case the page item property was Display Only. We set save session state to YES. It solved the problem. |
Friday, August 30, 2013
SLOW WEBLOGIC STARTUP SLOW SOA PROCESSING JDBC DATASOURCE HANGS WEBLOGIC ORACLE on VIRTUAL LINUX
We had these kinds of problems.
1. Weblogic starts slow. ( OBIEE, Cloudcontrol and other wls ) approximely 10-15 minuts
2. JDBC Datasources hang in weblogic.
3. Degradation performance soa environments ( high cpu usage)
2) Startup the random generator as follows:
See also
http://www.usn-it.de/index.php/2009/02/20/oracle-11g-jdbc-driver-hangs-blocked-by-devrandom-entropy-pool-empty/ :
Per your recommendation, I installed an older fan right above the server next to a microphone. This is opposed to new Dyson Air Multipliers. We all know that only the wind buffeting caused by the blades will truly engage a random pattern that will allow the entropy daemon to capture the wave patterns properly. By having a bad bearing the noise pattern although repeatable was just random enough to get the entropy daemon garbage cleanup done properly – but occasionally I still lost connections; especially to system 10G. So I then installed a parrot on top of the fan and had it fed my a datacenter troll (DCT – we call him Ed) at random times throughout the day. In effect when the parrot took a poop the random noise of the **** hitting the fan resolved all my connection issues. Including 10G!! You can imagine how happy my manager was to have the end of entrophy issues!! However, every now and then I walk into the data centre and he has the parrot on his shoulder pretending to be Captain Morgan. He’s always striking that silly pose with his foot on the barrel. To resolve this I put a honey badger in a parrot suit on top the fan – sure enough the random feedings stopped the random lost connections again. However, one day my manager came in with cuts all over his face. I asked him what the heck happened? He said he was making sure the **** hit the fan, but when it (the ****) looked different he was concerned for Polly (a fore mentioned parrot). When I told him it was really a honey badger we all had a good laugh, and to date we wonder at how when the **** hits the fan things work properly. Frankly when things hang we still ask “Is the **** hitting the fan?” Around here – most of the time it is. Thanks again for the help. Damn it Ed – what the hell are you doing go feed Polly. Geeze. I need to outsource him – slacker.
Met vriendelijke groeten,
Dik Pater
Saturday, May 4, 2013
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
--
-- NAAM: show_hwm_simple_and_index.sql
-- DOEL: HighWaterMark info.
-- TYPERING: select
-- PARAMETERS: -
-- BENODIGDE PRIVILEGES select_catalog_role
-- ANDERE BEPERKINGEN: -
-- OPMERKINGEN: -
--
-- WIJZIGINGSHISTORIE:
--
-- Versie Datum Auteur Omschrijving
-- --------- ---------- --------------- ------------------------------------
-- 1.0 25-03-2002 Dik eerste oplevering
-- 2.0 2013 Dik added index information
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
col table_name format a30
col owner format a12
col percentage_waisted format 999.99
col hwm_MB format 9999999.99
col rows_length_MB format 9999999.99
set verify off
undefine percentage_waisted_allowed
undefine min_number_blocks_to_check_on
set lines 150
prompt '***********************************************************************************'
prompt this is a simple script for looking at suspicious hwm
prompt on ixora there is a sparse_tables_8.sql which takes also initrans etc. into account
prompt BASED ON LAST STATISTICS !!
prompt Dik Pater
prompt '***********************************************************************************'
select d.owner
, d.table_name
-- , d.blocks
-- , d.empty_blocks
, d.blocks*p.value/1024/1024 hwm_MB
, d.num_rows*avg_row_len/1024/1024 rows_length_MB
, decode(
100-100/(
(d.blocks*p.value)/
decode((d.num_rows*avg_row_len)
,0
,d.blocks*p.value
,(d.num_rows*avg_row_len)
)
),0,100,
100-100/(
(d.blocks*p.value)/
decode((d.num_rows*avg_row_len)
,0
,d.blocks*p.value
,(d.num_rows*avg_row_len)
)
)
) percentage_waisted
, decode(to_char(num_rows),'0','!! '||num_rows||' !!!',to_char(num_rows)) records
, sel_index.*
from dba_tables d
, v$parameter p
, ( SELECT i.owner, i.index_name, table_owner, table_name, s1.bytes index_omvang, s2.bytes table_omvang , s2.bytes - s1.bytes table_minus_index
FROM dba_indexes i
, dba_segments s1
, dba_segments s2
WHERE i.table_owner= '&OWNER'
AND i.index_type= 'NORMAL'
and s1.owner = i.owner
and s1.segment_name = i.index_name
and s2.owner = i.table_owner
AND s2.segment_name = i.table_name
AND s1.segment_type <> 'TABLE PARTITION'
AND s2.segment_type <> 'TABLE PARTITION' ) sel_index
where p.name = 'db_block_size'
and decode(
100-100/(
(d.blocks*p.value)/
decode((d.num_rows*avg_row_len)
,0
,d.blocks*p.value
,(d.num_rows*avg_row_len)
)
),0,100,
100-100/(
(d.blocks*p.value)/
decode((d.num_rows*avg_row_len)
,0
,d.blocks*p.value
,(d.num_rows*avg_row_len)
)
)
) > &percentage_waisted_allowed
and d.blocks > &min_number_blocks_to_check_on
AND d.BLOCKS > 1 -- no sense in checking empty tables with no blocks allocated
AND sel_index.table_owner = d.owner
and sel_index.table_name = d.table_name
order by d.blocks*p.value/1024/1024 desc
/
Tuesday, April 30, 2013
King of the Netherlands and Oracle software and holidays.
Today Queens day has become King's day in Holland.But the traditional date of 30 April is left next year, when King's day is on 27 April, the birthday of our king Willem Alexander.
One thing the king of the Netherlands did not know is that this has impact on our holiday programming in Oracle software land ;-)
Some one asked me to fill a calendar with holidays, I decided to do this with an analytical query.
After 2013 the Queens day ( koninginnedag ) has become King's day, I used a case statement for it.
But when is EasterSunday ? Googled around I found oracle plsql code :
With eastersunday I can calculate Whitsun, Ascension Day.
With this code I made this holiday query, simply it does this :
- Is it a workday then eerste_werkdag = datum.
- Is not a workday then eerste_werkdag = the next datum where werkdag = Y.
SELECT DATUM,
Werkdag,
CASE
WHEN TO_CHAR(Datum,'DD-MM') = '31-12'
AND Werkdag = 'N'
Then Datum+2
WHEN TO_CHAR(Datum,'DD-MM') = '30-12'
And Werkdag = 'N'
Then Datum+3
ELSE
CASE
WHEN WERKDAG = 'J'
THEN DATUM
ELSE Lead(Hulp Ignore Nulls) Over (Order By Datum)
END
END Eerste_Werkdag ,
OPMERKING
FROM
(SELECT DATUM,
WERKDAG,
CASE
WHEN werkdag = 'J'
THEN datum
ELSE NULL
END HULP,
opmerking
FROM
(SELECT MAIN.DATUM,
TO_CHAR(MAIN.DATUM,'day'),
CASE
WHEN trim(TO_CHAR(MAIN.DATUM,'day')) IN ('saturday', 'sunday' )
OR feestdag.datum IS NOT NULL
THEN 'N'
ELSE 'J'
END WERKDAG ,
OPMERKING
FROM
(SELECT TRUNC( to_date('01-01-'
||'&&JAAR', 'DD-MM-YYYY') + LEVEL -1) DATUM
FROM DUAL
CONNECT BY LEVEL <=
(SELECT DAYS_IN_YEAR
FROM
(SELECT TO_CHAR(TRUNC(input_date, 'YYYY'), 'YYYY') AS "YEAR",
ADD_MONTHS(TRUNC(INPUT_DATE, 'YYYY'), 12) - TRUNC(input_date, 'YYYY') AS days_in_year
FROM
(SELECT ADD_MONTHS(TRUNC(TO_DATE('&&JAAR','YYYY')) -365, +12 * level) INPUT_DATE
FROM dual
CONNECT BY level <= 20
)
) SEL
WHERE SEL.YEAR = TO_CHAR(to_date('&&JAAR','YYYY'),'YYYY')
)
) Main ,
(SELECT *
FROM
(SELECT Datum,
CASE
WHEN Opmerking ='Hemelvaartsdag'
AND TO_CHAR(Datum,'DD-MM') = '05-05'
THEN 'Hemelvaartsdag/Bevrijdingsdag'
ELSE Opmerking
END opmerking,
row_number() Over (Partition BY Datum Order By Datum ) DUBBELFEEST
FROM
( SELECT XXX_EASTERSUNDAY('&&JAAR') DATUM, '1e Paasdag' OPMERKING FROM DUAL
UNION ALL
SELECT XXX_EASTERSUNDAY('&&JAAR')+1, '2e Paasdag' FROM DUAL
UNION ALL
SELECT XXX_EASTERSUNDAY('&&JAAR')+39, 'Hemelvaartsdag' FROM DUAL
UNION ALL
SELECT XXX_EASTERSUNDAY('&&JAAR')+49, '1e Pinksterdag' FROM DUAL
UNION ALL
SELECT XXX_EASTERSUNDAY('&&JAAR')+50, '2e Pinksterdag' FROM DUAL
UNION ALL
SELECT TO_DATE('05-MAY-&&JAAR','DD-MON-YYYY'), 'Bevrijdingsdag' FROM DUAL
UNION ALL
SELECT TO_DATE('25-DEC-&&JAAR','DD-MON-YYYY'), '1e Kerstdag' FROM DUAL
UNION ALL
SELECT TO_DATE('26-DEC-&&JAAR','DD-MON-YYYY'), '2e Kerstdag' FROM dual
UNION ALL
SELECT TO_DATE('01-JAN-&&JAAR','DD-MON-YYYY'), 'Nieuwjaarsdag' FROM dual
UNION ALL
SELECT
CASE
WHEN
&&JAAR > 2013
THEN TO_DATE('27-APR-&&JAAR','DD-MON-YYYY')
ELSE TO_DATE('30-APR-&&JAAR','DD-MON-YYYY')
END ,
'Koning..dag'
FROM Dual
)
)
WHERE Dubbelfeest=1
) FEESTDAG
WHERE main.DATUM = FEESTDAG.DATUM (+)
ORDER BY main.DATUM
)
ORDER BY Datum
)
Monday, January 21, 2013
Cloud Control 12 udm to metric extension
Today I got a question to move udm from gridcontrol 11 to 12c metric extensions.
I used this inventarisation query as as startpoint, when I finished the query I thought that this could be usefull for other oracle dba' as well:
SELECT target_name,
collection_name,
aantal,
SUM(aantal) OVER ( PARTITION BY collection_name ) running_total_by_coll_name,
CASE
WHEN SUM(aantal) OVER ( PARTITION BY collection_name ) > 1
THEN 'POSSIBLE GENERIC METRIC EXTENSION'
ELSE 'UNIQUE METRIC EXTENSION'
END ME_OUTPUT
FROM
(SELECT target_name,
collection_name,
COUNT(*) aantal
FROM mgmt$target_metric_settings
WHERE METRIC_NAME ='SQLUDM'
AND collection_name NOT IN ('UDM_GENERIC_SECURITY_1','UDM_GENERIC_SECURITY_2', 'UDM_GENERIC_BACKUP_CHECK' , 'UDM_GENERIC_UNUSABLE_INDEXES')
GROUP BY target_name,
collection_name
)