lunedì 18 luglio 2016

Oracle Tip: Exception getObjectName("R", "OBI_EXEC_SESS_<$=Y$>", "D")

When running OBIA Load Plan, today I got into the following error when running SIL_DomainGeneral_CM_Source_Load scenario:


com.sunopsis.tools.core.exception.SnpsSimpleMessageException: ODI-17517: Error during task interpretation.
 Task: 6
java.lang.Exception: The application script threw an exception: com.sunopsis.tools.core.exception.SnpsSimpleMessageException: Exception getObjectName("R", "OBI_EXEC_SESS_<$=Y$>", "D") :  BSF info: Run Alter Session Commands-SRC (DB Link) at line: 0 column: columnNo


The solution to this error is given in Doc ID 1948605.1 from Oracle Support.
You should connect to ODI Physical Architecture in ODI Topology and check that BIAPPS_BIACOMP has got a Default Schema defined (and that connectivity is in place). If there is no Physical Schema defined, then check the option. 
 


 

If this does not solve the problem, check BIAPPS DWH Physical Connection. Make sure that at least one of the physical schemas is marked as Default Schema.



Somehow during migration activities, we lost the selection on one of them.



lunedì 29 febbraio 2016

Configuring PGP Keys in GNU Private Guard

Imagine you are receiving a PGP encrypted file from a third-party. 
The file has been encrypted using the customer's Public Key and now you have to decrypt it in a separate server where Gnu PG is installed. 
The first thing you need to do is to import the keys so they can be used to decrypt the message.
The following command is used to import the Public Key: 

gpg --import newkey.txt
 
If a valid Public Key is given, this is how the command output should look like: 

bash-4.1$ gpg2 --import newkey.txt
gpg: key xxxxxx: "Public Key Description <email@xxx.com>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
 

To import the Private Key, use the following command: 

gpg --allow-secret-key-import --import newpriv_key.txt
 
To check if keys have been imported correctly, you can use the following command:

bash-4.1$ gpg --list-keys
/xxxx/xxxxx/.gnupg/pubring.gpg
-----------------------------------
pub   2048R/xxxxxxx 2016-02-17 [expires: 2019-02-16]
uid                 Public Key Description <email@xxx.com>

sub   2048R/xxxxxxx 2016-02-17 [expires: 2019-02-16]

The Private Key provided has got a passphrase. So if you want to decrypt a sample file that has been encrypted using the associated Public Key, you should use the following command.

bash-4.1$ echo <passphrase>|gpg --output test.txt --batch --passphrase-fd 0 --decrypt test.gpg
gpg: encrypted with 2048-bit RSA key, ID
XXX450C8 , created 2016-02-17
      "
Public Key Description <email@xxx.com>"
bash-4.1$ more test.txt
Hello World!!!

 

If you are getting an error when passing the passphrase, try setting up the following variables: 

 
export GPG_TTY=`tty` 
export PINENTRY_USER_DATA="USE_CURSES=1"

By doing this, I was able to decrypt the message successfully.

martedì 26 gennaio 2016

Automate DOS commands - Ping example

Imagine you have been given the lovely task of finding out the IP address of more than 40 servers. Do you really want to do it manually? Definitely I do not.
I have created a script and, even if I have to admit that it took me almost more time to write it than doing the task manually, I hope this can save someone's else time.
The script I have written looks like this:

@ECHO OFF
ping -n 1 <ServerName1> | for /F "tokens=*" %%a in ('findstr Reply') do @echo
<ServerName1>:%%a
ping -n 1
<ServerName2> | for /f "tokens=*" %%a in ('findstr Reply') do @echo <ServerName2>:%%a
exit


The option "-n 1" is used to define how many times the server is pinged. One time is enough to get the following output:

Pinging <ServerName1> [192.143.52.103] with 32 bytes of data:
Reply from 192.143.52.103: bytes=32 time=45ms TTL=59
Ping statistics for 192.143.52.103:
    Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 45ms, Maximum = 45ms, Average = 45ms


The second part of the command parses the output of the ping command looking for a string starting with 'Reply' and prints the results.
@ECHO OFF is used to prevent the script to print the DOS command in the output.
Here is an example of output file:

<ServerName1>:Reply from 192.143.52.103: bytes=32 time=18ms TTL=59 <ServerName2>:Reply from 191.143.52.103: bytes=32 time=19ms TTL=59


I have decided to separate the server name from the 'Reply' string using a semicolon, but it is mainly because this way I can treat the output as a simple semicolon-delimited file.

martedì 10 novembre 2015

Changing caption of Embedded Object in MS Word

Recently I have spent a lot of time writing functional documents, which translates into producing tons of MS Word pages and Excel Spreadsheets. And since everybody knows how boring it is, the best thing you can do is re-use docs you have already written. Although it can save you a considerable amount of time, it could be very annoying having an attached spreadsheet with a caption that reminds everybody that you are being lazy.
To change it,  right-click on the Object and select Convert option:


Then select "Change Icon" and change the Caption to the one you want. Be aware that even if it looks greyed-out, you can still edit the Caption. God bless MS!


venerdì 30 ottobre 2015

Another week in the life of a cystinuric

It's a matter of not surrending. It's a matter of not admitting that this horrible disease is sucking my whole life out of me. 
I cannot work, I cannot enjoy being out because of the fear of the unpredictable pain, I am soaked in fear. 
I hate the person I am now. I do not resemble to the person I used to be. After three surgeries, uncountable infections, stents, pain killers and every possible kind of medicine, doctors, urologists, nephrologists, it is getting harder and harder to go on.
If I could put on a scale all the pain I have been through since I was a kid, it would explode. And the worst thing is that there is no reward. You won't get any prize for being strong. And asking "Why me?" is totally pointless. It won't go away.
The only thing you can think about is the pain to stop. Nothing else. There is no energy or space for anything else. Nobody deserves something like this. Nobody. 
 

mercoledì 7 ottobre 2015

Oracle Tip: Listing the content of a

If we have a .dmp file that has been produced using the expdp utility, it is possible to retrieve the DDL for all objects in the .dmp file by using the following options: 


impdp ... SQLFILE=myddl.sql DUMPFILE=<dumpfile>

 
If the dump file has been produced using imp utility instead, the following command will give you the list of tables:

imp ...
show=Y file=<dumpfile>



This should tell you the list of objects you have in your dump file before importing it.

giovedì 27 agosto 2015

Etapa 4 - De Ribadiso da Baixo a Pedrouzo

Hacer memoria de esta etapa todavía duele. Ha sido la etapa mas dura de todo el camino. Me levanto demasiado temprano. Todo el mundo ha puesto su alarma a las 5 de la mañana y ya que estoy despierta me levanto yo también y empiezo a andar alrededor de las 7 menos cuarto. Los primeros kms son una cuesta insoportable hasta Arzua. Me arrepiento mil veces de no haber hecho un pequeño esfuerzo mas el día anterior. Noto en seguida que algo va mal. La mochila molesta y animicamente me encuentro fatal. Llego al momento del desayuno y me derrumbo completamente. No tanto por la escasez de higiene del lugar y por la tostada con jamón y tomate que sabe a rancio, sino porque hoy me ha invadido una tristeza infinita. Ni siquiera el café con leche con la carita de payaso diseñada por el dueño del bar me levanta la moral.
Al poco de abandonar el bar, echo a llorar. Es un llanto silencioso y sin consuelo. Me pregunto que es lo que estoy buscando. Donde esta' el perdón que no he encontrado en todos estos años? De todo el mal que me han causado, porque sigo pensando que la única culpable soy yo? Y en parte lo soy. No supe ver que el amor, del que siempre voy hambrienta, en realidad no existía. O existió pero yo también hice mi parte para destrozarlo. Levante demasiado la voz, pidiendo a gritos y a insultos una ayuda que unos oídos sordos jamas me darían. Busque paz y calma, en un mar seco y lleno de rocas. Me lance de cabeza al fracaso, sin intentar evitarlo. Yo tampoco fui perfecta, quizás todo este dolor que nunca me abandona es porque el amor que tanto necesito, yo tampoco lo supe dar. Echo de menos a mi vida de entonces, a esos paisajes, a la familia que nunca fue mía, pero ya no a ti. Para ti tampoco hay perdón. Ni lo hay para los que solo se disfrazaron de amigos, dando el golpe de gracia a un alma que no conseguía que las heridas dejaran de sangrar. 
Un paso tras otro me pregunto si habrá un día en el que ya no salten las lagrimas al recordar. Incluso ahora que escribo se me cierra el aliento y se me hace un nudo en el estomago y no lo puedo evitar. Kilómetro tras kilómetro de lagrimas y sudor (literales), voy llegando a O Pedrouzo. No me siento con fuerza para nada y menos de compartir litera con unos chavales adolescentes y fiesteros. Me gasto 40 euros para una bonita habitación en una pensión. Sola con mis pensamientos y mi dolor que nunca calla, a intentar descansar porque al dia siguiente ya me espera Santiago.

"Las cosas que no pueden ser
Son todas las que he sido yo"