Archive for May, 2008

Commuting

Thursday, May 29th, 2008

The daylight fires this clear bright morning.
The calm sits uncomfortably for a moment.
Daily business continues,
oblivious and aware of of our intent.

Fields pass in the warm glow,
Bricks crumble, clocks tick.
Newspapers preach of the sick,
not knowing themselves, going with the flow.

Under the coffee, under the sneeze
minute life froths forth,
pretending to all,
we can do what we please.

What is done is gone,
it all lies ahead.
My life is of course now
tucked up, back in my bed.

Downgrading an OEM repository from 10.2.0.3 to 10.1.0.5

Wednesday, May 21st, 2008

If you ever have the misfortune of downgrading an Oracle server, you can run into some silly problems. One such issue raised its head when I needed to downgrade a server for a different project. I downgraded a 10.2.0.3 server to 10.1.0.5 and had a 10.2.0.3 OEM repository already installed. I exported all the schemas and reimported once I had downgraded.

I started the DB console and everything seemed fine, but when browsing to the OEM, I logged on and got a screen showing that it had not connected to the instance. A quick look at the logs followed. You can see the following errors in the emagent.trc file:

2008-05-21 00:57:47 Thread-4120902576 ERROR upload: Failed to upload file A0000001.xml, ret = -2
2008-05-21 00:57:47 Thread-4120902576 WARN upload: FxferSend: received http error in header from repository: http://oracle.oakdene.net:5500/em/upload/
ERROR-400|ORA-06550: line 1, column 18:
PLS-00302: component ‘OBTAIN_LOCK_FOR_EMD_URL’ must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

I decided that I would accept not having the old repository data for now, I could always import into another schema and do a post fix data import. I needed to drop the repository and recreate the 10.1.0.5 version (theemca commands are different between 10.2 and 10.1).

[oracle@oracle ~]$ emca -x OAKDENE_SID

STARTED EMCA at Wed May 21 01:54:52 PDT 2008
May 21, 2008 1:54:52 AM oracle.sysman.emcp.EMConfig stopOMS
INFO: Stopping the DBConsole …
Enterprise Manager configuration is completed successfully
FINISHED EMCA at Wed May 21 01:54:57 PDT 2008

I then tried installing the db console. I used a response file called emca.txt. This didn’t work properly as can be seen below:

[oracle@oracle ~]$ emca -f emca.txt

STARTED EMCA at Wed May 21 01:55:24 PDT 2008
Password for dbsnmp:
Password for sysman:
Password for sys:
May 21, 2008 1:55:32 AM oracle.sysman.emcp.EMConfig checkConfiguration SEVERE: Repository already exists. Fix the error(s) and run EM Configuration Assistant again in standalone mode. Could not complete the configuration. Refer to the log file for details

I decided to drop the repository manually by dropping the SYSMAN user:

[oracle@oracle ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.1.0.5.0 - Production on Wed May 21 01:55:42 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> drop user sysman cascade;

User dropped.

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
[oracle@oracle ~]$ emca -f emca.txt

STARTED EMCA at Wed May 21 02:01:35 PDT 2008
Password for dbsnmp: Password for sysman: Password for sys:
May 21, 2008 2:01:43 AM oracle.sysman.emcp.EMConfig updateReposVars
INFO: Updating file /home/oracle/oracle10db/sysman/emdrep/config/repository.variables …
May 21, 2008 2:01:48 AM oracle.sysman.emcp.EMConfig perform
SEVERE: Error creating the repository. Repository creation could not be completed successfully
May 21, 2008 2:01:48 AM oracle.sysman.emcp.EMConfig perform
INFO: Please refer to the log file at /home/oracle/oracle10db/cfgtoollogs/emca_repos_create<DATE>.log for more details.
Could not complete the configuration. Refer to the log file for details
[oracle@oracle ~]$ vi /home/oracle/oracle10db/cfgtoollogs/emca_repos_create2008-05-21_02-01-43-AM.log

But it still failed. In the log mentioned here is is quite obvious what has happened:

CREATE ROLE MGMT_USER
*
ERROR at line 1:
ORA-01921: role name ‘MGMT_USER’ conflicts with another user or role name

After fixing this issue (and others) by repeating, there are a series of other objects which need dropping as well:

[oracle@oracle ~]$ cat drop_sysman.sql

drop public synonym SETEMVIEWUSERCONTEXT;
drop role mgmt_user;
drop public synonym mgmt_target_blackouts;
drop user sysman cascade;
drop user mgmt_view cascade;
exit

[oracle@oracle ~]$ sqlplus ‘/ as sysdba’ @drop_sysman

SQL*Plus: Release 10.1.0.5.0 - Production on Wed May 21 02:02:16 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

Synonym dropped.

Role dropped.

Synonym dropped.

User dropped.

User dropped.

Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

And this works now, the repository gets create properly:

[oracle@oracle ~]$ emca -f emca.txt

STARTED EMCA at Wed May 21 02:24:32 PDT 2008
Password for dbsnmp: Password for sysman: Password for sys:
May 21, 2008 2:24:42 AM oracle.sysman.emcp.EMConfig updateReposVars
INFO: Updating file /home/oracle/oracle10db/sysman/emdrep/config/repository.variables …
May 21, 2008 2:26:18 AM oracle.sysman.emcp.EMConfig createRepository
INFO: Creating repository …
May 21, 2008 2:26:18 AM oracle.sysman.emcp.EMConfig perform
INFO: Repository was created successfully
May 21, 2008 2:26:19 AM oracle.sysman.emcp.EMConfig addPortEntries
INFO: Updating file /home/oracle/oracle10db/install/portlist.ini …
May 21, 2008 2:26:19 AM oracle.sysman.emcp.EMConfig updateEmdProps
INFO: Updating file /home/oracle/oracle10db/sysman/config/emd.properties …
May 21, 2008 2:26:19 AM oracle.sysman.emcp.EMConfig updateConfigFiles
INFO: targets.xml file is updated successfully
May 21, 2008 2:26:19 AM oracle.sysman.emcp.EMConfig updateEmomsProps
INFO: Updating file /home/oracle/oracle10db/sysman/config/emoms.properties …
May 21, 2008 2:26:19 AM oracle.sysman.emcp.EMConfig updateConfigFiles
INFO: emoms.properties file is updated successfully
May 21, 2008 2:26:20 AM oracle.sysman.emcp.EMConfig startOMS
INFO: Starting the DBConsole …
May 21, 2008 2:27:54 AM oracle.sysman.emcp.EMConfig perform
INFO: DBConsole is started successfully
May 21, 2008 2:27:54 AM oracle.sysman.emcp.EMConfig perform
INFO: >>>>>>>>>>> The Enterprise Manager URL is http://oracle.oakdene.net:5500/em <<<<<<<<<<<
Enterprise Manager configuration is completed successfully
FINISHED EMCA at Wed May 21 02:27:54 PDT 2008

Perseverance is the key :).

PokerTracker on Mac - conclusion

Friday, May 16th, 2008

Right then, finally got round to finishing this.

Need to set up PokerTracker running in Parallels so that it can see the Postgresql DB running on the host machine.

To allow the VM image running in Parallels access to the Mac, I initially went for the host-based networking, thinking that PokerTracker was the only thing and didn’t need an internet connection, but it checks for updates on startup, and I also use Parallels for using Sopcast, which obviously needs internet access, so I had to revert my decision and go back to Shared.

To change the network configuration, just use the Parallels Devices menu and choose the one you want for networking. I disabled the network adapter in Windows and re-enabled to ensure that the new ip address gets set properly.

I opened PokerTracker in Parallels and set up the Postgresql settings in the setting tab - Still didn’t work! I could ping the Mac from the within Parallels, so was a bit confused for a while, but then the penny dropped:

I had to change Postgresql to accept network connections as by default it doesn’t allow non-local connections!

edit postgresql.conf

make sure this line looks like this:

listen_addresses = ‘*’

so it listens on all ip addresses!

edit pg_hba.conf

host all all 10.211.55.0/24 trust

to allow all hosts on this private network to connect! Obviously make this network the one the Parallels DHCP server assigns. This was the default for mine for Shared, it was different for the Host-Based, so check by doing a ipconfig in Windows and an ifconfig on the Mac.

Restart Postgresql once you have changed these files.

I then went into the Postgresql setting in PokerTracker using the new 10.211.55.2 address, which i got from doing a simple ifconfig on my Mac. It works!

I converted a DB, and renamed and set to be the default in PokerTracker. I restarted FullTilt on mac, to see where my hand histories are being saved (~/Documents/HandHistory) and changed this in PokerTracker before taking another Parallels snapshot, so I wouldn’t have to do all this again.

It now works a treat. It was a shame Crossover didn’t work (or I just couldn’t get it working before trying Parallels), but Parallels is pretty cool, and I know now I don’t need any other computer other than this one for my personal use.

Distractions

Wednesday, May 7th, 2008

Even though the bastard doesn’t use full stops, he has a point.

Right Said Fred

Wednesday, May 7th, 2008

lets have a cup of tea