Thursday, December 23, 2021

perl_socket test port

 

#########################################################

# perl_socket.pl                                        #

# run at your own risk ;-) Dik Pater 12-feb-2016        #

#########################################################

print "############################################################################\n";

print "perl_socket:INFO: DONOT RUN IN BACKGROUND ALWAYS TERMINATE AFTER TESTING !! \n";

print "perl_socket:INFO: DONOT RUN IN BACKGROUND ALWAYS TERMINATE AFTER TESTING !! \n";

print "perl_socket:INFO: DONOT RUN IN BACKGROUND ALWAYS TERMINATE AFTER TESTING !! \n";

print "############################################################################\n";

print ;

use IO::Socket;

my ($hostname, $portnumber) = @ARGV;

if (not defined $hostname) {

  die "Need hostname\n";

}

if (defined $portnumber) {

print "############################################################################\n";

print "perl_socket:INFO testing '$hostname' and '$portnumber'\n";

print "perl_socket:INFO goto other system and perform \n";

print "perl_socket:INFO telnet $hostname $portnumber\n";

print "############################################################################\n";

}

 

 my $sock = new IO::Socket::INET (

                                  LocalHost => $hostname,

                                  LocalPort => $portnumber,

                                  Proto => 'tcp',

                                  Listen => 1,

                                  Reuse => 1,

                                 );

 die "Could not create socket: $!\n" unless $sock;

my $new_sock = $sock->accept();

while(<$new_sock>) {

print $_;

}

close($sock);

Friday, October 22, 2021

SAS VIYA unsupported protocol scheme

 


/opt/sas/viya/home/bin/sas-admin compute credentials list

Failed to list the shared service account credentials. Reason: 1 error occurred:

  * Get /credentials/domains?filter=eq(type,'compute-password')&sortBy=label&limit=10: unsupported protocol scheme ""


/opt/sas/viya/home/bin/sas-admin --sas-endpoint="https://<VIYASITE>.nl" compute credentials list


Or set your endpoint

or set your endpoint with a environment variable $SAS_SERVICES_ENDPOINT

SAS SAML samesite cookie sas.commons.web.security.cookies InResponseToField of the Response doesn't correspond to sent message

We configured saml login in sas viya.

We got the message : "InResponseToField of the Response doesn't correspond to sent message <messageid>

Generating new saml metadata file .... still receiving error.

Rebooted the server, You Never Know ;-) ... still receiving error.

We als saw this in the saslogon logging : 

Cannot determine identity zone, UAA is catch-all domain for host: <OURVIYAHOST>

The Solution for the problem with "InResponseToField of the Response doesn't correspond to sent message" was to configure sameSite to None


 



Wednesday, January 20, 2021

Model Studio displays "The data advisor failed to run on the selected data source

 

Problem Note 62923: Model Studio displays "The data advisor failed to run on the selected data source


I could create a new project with data.
I could test perfect.
Until I got the above error.
Did we change something ???
No....
hmmmm
ok I removed my os-account on the viya server...yesterday.
Just a useradd  and it works again.

We will use service accounts also for data-mining.

See how to do that : 


Regards,

Dik Pater.


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

 added 

-memsize 0 

this resulted in a maximum in my case :

 MEMSIZE=47322067200

  No restart was necessary, just a new cas session.

Wednesday, December 11, 2019

filesize powershel script

$logfile="d:\batch\filesize.csv"
$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



OBIEE 12c: How to Clear the BI Presentation Service Cache with Command Line  (Doc ID 2468367.1) DID NOT WORK for me, it cleared the presentation cache , but we were looking for a clear of the BIPUBLISHER CACHE.

The problem was that when we restarted the bi_server1 the webservice to schedule a request gave a java nullpointer exception, WE DO THIS FROM APEX STORED PROCEDURE IN A DATABASE.
When we pushed the button naar http://servernaam:8080/analytics , kies beheer, bi publisher beheren, cache beheren, objectcache wissen ( translated goto management, manage bi publisher, manage cache, clear object cache) it was all working again..
But this was not the real solution...or should I say cause...
It was enough to just go to the admin page.
We automated this with the following curl statements : 

curl -v -X "POST" "http://SERVERNAME:8080/bi-security-login/login" --data "j_username=weblogic&j_password=TOPSECRET" --cookie-jar "cookies.txt"
curl -v http://SERVERNAME:8080/xmlpserver/servlet/admin --cookie "cookies.txt" --cookie-jar "cookies.txt"

After the start.sh we called these statements in a script ...
Now we don't have a problem with calling the webservice from apex to print our pdf's.

wwv_flow_webservices_api.make_request(
    p_url => l_url,
    p_envelope => l_env );

Regards ,
Dik Pater

Friday, March 30, 2018

impdp hang

If your impdp hangs....
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 echo off
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

while true
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

From sqldeveloper you can export the workspace in a runtime environment in apex 3.2.
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

We solved this by View -> disable Show Entries of Subgroups , 2 seconds opening now , instead of minutes !

Monday, January 30, 2017

Regexp replace until space sed regular expression

I asked my collegues how to replace until next space with sed.
They solved it for me.
sed -i 's/password=[^[:space:]]*/password=geenpassword/g' test.txt

I had to blog this excellent answer.
Thanks to Danny and Frank for solving this.

Btw.
I used awk for this.
But that was not the sed solution.


{for (i=1; i <= NF; i++) { if ($i !~ /password/) {printf($i" ") ;}
                           else {printf("GEHEIM ")}if(i==NF){printf("\n")}}}

Monday, October 10, 2016

oem 13c firefox flash performance tab not working

In the default downloaded image oem 13c from otn Firefox performance page was 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

We created a database on our new platform, installed apex in it with apexins.sql

Then we made a full export, we imported everything except apex_040100 user
 
Next we created workspaces and applications in the new environment.
We exported these workspace and applications with scripting from the internet.
the apexexport utility in apex41 gave empty files as a result.

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;
/


We exported the source data with datapump to file dp_EVERYTHING_%U.dmp

expdp full=y DIRECTORY=EXP_DB DUMPFILE=dp_EVERYTHING%u LOGFILE=EXP_DB:dp_EVERYTHING.log FILESIZE=20G PARALLEL=4 FLASHBACK_TIME=SYSTIMESTAMP
We created a database directory called IMP_DB in the target database.

$ cat images_impdp.par

DUMPFILE=dp_EVERYTHING%U.dmp
parallel=4
directory=IMP_DB
table_exists_action=append
tables=FLOWS_FILES.WWV_FLOW_FILE_OBJECTS$


$ cat images_impdp_WWV_FLOW_REPOSITORIES_TO_DIKPATER.par







DUMPFILE=dp_EVERYTHING%U.dmp
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 all_objects where lower(object_name)like '%wwv_flow_%repository%'
and owner = 'APEX_040100' and object_type = 'TABLE'

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



I made a Metric Extension called dblink.
Al it does is :
SELECT  d.name ||':'
  ||':'  || dbl.owner
  ||':'  || dbl.db_link
  ||':'  || dbl.username
  ||':'  || dbl.host
  ||':'  || dbl.created RIJ
, 'DBLINKINFO:' text
FROM dba_db_links dbl,
  v$database d

Next I added rij as the key column and tekst as the value column.

Next Next Finish
Deploy to targets

And now you can see ALL your database links from a single point of view in your EM12C repository database.

select entity_name,metric_key_value, count(*)
from GC_METRIC_STR_VALUES a
where metric_group_label='dblink'
group by entity_name,metric_key_value

Regards

Dik Pater
The Netherlands

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

The FMW Configuration Wizard Is Very Slow On Linux Virtual Environments. The Startup Of WLS Servers Is Also Very Slow. (Doc ID 1344974.1)

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)
After executing Solution 1from the note
 
1) Download and install the following rpm: rng-utils-2.0-1.14.1.fc6.x86_64.rpm . Contact your vendor for download details.

2) Startup the random generator as follows:
 
rngd -r /dev/urandom -o /dev/random -t 1

All our problems are history ;-)
So Quick startup of weblogic, no jdbc datasource hangs, good soa performance ( less cpu !)

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