Showing posts with label macbook. Show all posts
Showing posts with label macbook. Show all posts

Wednesday, February 13, 2019

resolved - cx_Oracle.DatabaseError: ORA-24454: client host name is not set

When developing Python code in combiantion with cx_Oracle on a Mac you might run into some issues, especially when configuring your mac for the first time. One of the strange things I encountered was the ORA-24454 error when trying to connect to an Oracle database from my MacBook. ORA-24454 states that the client host name is not set.

When looking into the issue it turns out that the combination of the Oracle instant client and cx_Oracle will look into /etc/hosts on a Mac to find the client hostname to use it when initiating the connection from a mac to the database.

resolve the issue
A small disclaimer, this worked for me, I do expect it will work for other Mac users as well. First you have to find the actual hostname of your system, you can do so by executing one of the following commands;

Johans-MacBook-Pro:~ root# hostname 
Johans-MacBook-Pro.local

or you can run;

Johans-MacBook-Pro:~ root# python -c 'import socket; print(socket.gethostname());'
Johans-MacBook-Pro.local

Knowing the actual hostname of your machine you can now set it in /ect/hosts. This should make it look like something like the one below;

127.0.0.1 localhost
127.0.0.1 Johans-MacBook-Pro.local

When set this should ensure you do not longer encounter the cx_Oracle.DatabaseError: ORA-24454: client host name is not set error when running your Python code.

Friday, December 12, 2008

Fix your macbook

Ok, you bought a macbook, iphone or any other product from the Apple corporation. All looks good until suddenly something breaks. You have a couple of options, go to a mac shop and claim that this is part of your waranty contract and that you would like to have it repaired.

Now comes the tricky part, it might be that you no longer have a a warranty or that you have to turn in your machine and you are not willing to. In those cases you still have a second option. You can look at which parts are broken and go to the iFixit website and order the parts. iFixit have a lot of mac spareparts on stock. Also they provide you with step by step instructions on how to change the parts that are broken.



Sunday, December 07, 2008

Macbook and wifi

I recently purchased a new macbook pro, this resulted in an 'old' macbook hanging around my desk without being used for some time. As my girlfriend is still working on a old laptop I purchased a couple of years back she was interested in using my old macbook. One of the things however she did not like was the default operating system on my macbook. She wanted to run Linux on it.

Installation of ubuntu on a macbook is very very simple, just take the normal steps of installing ubuntu. however the wifi drivers is a story on its self. If you are installing Ubuntu on a macbook.... don't do what i did, just follow the guide of installing ath9k driver and you will be ready to go. It is part of a ubuntu howto on installing on a macbook.

You can install the ath9k drivers, you can also make wifi on a macbook with ubuntu working with madwifi or a ndiswrapper. it is all in the guide so just follow the guide and you will be able to run ubuntu on a macbook.

Sunday, April 27, 2008

New downloads from Oracle

Oracle has some new downloads available on their website. Newly available are:
- Oracle Business Process Analysis Suite 10g (10.1.3.4)
- Oracle Database Vault 10g Release 2 (10.2.0.4.0) for Linux x86-64
- Oracle Instant Client for Mac OS X (v10.2.0.4 Intel x86)

Oracle Business Process Analysis Suite 10g (10.1.3.4)
As the marketing text from Oracle tells you: “Oracle Business Process Analysis (BPA) Suite speeds process innovation by rapidly modeling business processes and converting them into IT executables. Oracle BPA Suite, based on the market leading IDS Scheer ARIS Design Platform, delivers a comprehensive set of integrated products that allows business users to design, model, simulate, and optimize business processes to achieve maximum operational efficiency. Now you can narrow your company's "strategy to execution" gap with Oracle BPA Suite.”

So meaning, it is a tool do your business process analysis and development based upon the ARIS design. ARIS is to complex and to vast to start explaining it in this post, however a good starting point is for example this PDF file from SAP or you can for example take a look here for another high level overview.

Oracle Database Vault 10g Release 2
Already for some time the release 2 version of Oracle Database Vault 10g was available for download however not fro Linux x86-64. Oracle Database Vault helps you protect your data within the database for people who have all the access to your systems. For example take a DBA who in principle will have access to all data within the database as part of his daily job. Now business compliancy programs like SOX will require that you protect some data even from those users like a DBA. The Database Vault will help you comply with for example SOX.

However, this can also be used for other purposes, let’s say you have to store very sensitive data in your oracle database like military grade information or medical patient records. You want this information available only to users who have access rights to it by their business role and not give access to it to people by their technical role they play in your IT department. Also in those cases you can use the Database Vault to make sure nobody can read data they are not supposed to be.

Oracle Instant Client for Mac OS X
Running Oracle software on your Mac. For times it was a big wish of myself to be able to run all Oracle products on a Mac, now we see that more and more software comes to the market which is capable of running on the Mac. We already had the developer tools on a mac and even the database and numerous other things from Oracle and now we have the Oracle Instant Client for Mac OS X (v10.2.0.4 Intel x86) available to download from the oracle website.

“Instant Client allows you to run your applications without installing the standard Oracle client or having an ORACLE_HOME. OCI, OCCI, Pro*C, ODBC, and JDBC applications work without modification, while using significantly less disk space than before. Even SQL*Plus can be used with Instant Client. No recompile, no hassle.”

Friday, March 09, 2007

Mercury Messenger V1.8 MSN client

I have tried, not to use MSN for a long time, however now I have failed. At my new job most of the communication between people working at an other location (think a customer location) is done by MSN. At my previous job we used a IBM corporate tool but due to the fact that my new company is not big enough to run there own chat server only for those cases that someone is at a remote location we use MSN. Meaning, I have to use MSN. My big problem was that it is a Microsoft service and I did not like to use it. Why not use IRC relay chat instead of something like MSN? Now more and more people are using it and because of this I have started to use it.

Because I wanted to run it on my Mac I needed a Mac client for MSN. I have tried several MSN clients for the Mac and finally found the Mercury Messenger V1.8 the best suitable for my needs. Mercury Messenger was formally known as dMSN. Mercury is a java based MSN client and it works like a charm, in my opinion. I just installed aMSN on my girlfriends Linux laptop so, including the others I tested and discarded, I have tested several non Microsoft MSN clients and I have to say they all work better than the client presented by Microsoft.

So if you need to use MSN, download a non windows client and start having fun.

Monday, March 05, 2007

Make a screenshot using a Mac.

Just recently, last week, I purchased a new laptop. I was in need of a smaller and lighter laptop and the side effect was that i could give my old laptop running Ubuntu Linux to my girlfriend to use during here new study. After some searching I found myself i favor of a MacBook, a very nice designed laptop, a great looking operating system and a Linux/UNIX like operating system under the nice graphics layer.

Even do I already have a MacMini for some time I still do not know in detail how the Mac operating system is working. I used my MacMini mostly for surfing the web and do some graphics design however for the rest is mostly been a toy to play with and it never became a serious computer. However, now I have a MacBook I will have to find out all the secrets of mac because this computer will be my traveling mate for the upcoming time and most of the stuff I will be working on will be done from this laptop. I will have my work laptop but this will be running Windows so for all the good stuff I will need to know how to operate a Mac.

Looking under the hood there is running Darwin, an open-source UNIX like operating system which I can manage and understand. The problem is more in the graphical mode. All the new buttons and toys to play with... and it all looks real great. Now I have to start mastering it.

One of the questions that came to mind was how do I make a simple screenshot. Looking at the keyboard I could not find a "printscreen" button and looking in the menu and the application folder I was unable to locate a screenshot application. However David Battino from O'Reilly came to the rescue.

  • Command+Shift+3 : Capture entire screen and save as a file
  • Command+Control+Shift+3 : Capture entire screen and copy to the clipboard
  • Command+Shift+4 : Capture dragged area and save as a file
  • Command+Control+Shift+4 : Capture dragged area and copy to the clipboard
  • Command+Shift+4 then Space bar : Capture a window, menu, desktop icon, or the menu bar and save as a file
  • Command+Control+Shift+4 then Space bar : Capture a window, menu, desktop icon, or the menu bar and copy to the clipboard
For his complete guide for making a good screenshot using a mac you can look at this article named Mac OS-X Screenshot Secrets.