Python mysqldb on solaris 10
I'm currently trying to compile MySQL-python-1.2.2 on solaris 10/08, but am getting the following error:
bash-3.00# python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.solaris-2.10-i86pc-2.4/MySQLdb
running build_ext
building '_mysql' extension
/usr/lib/python2.4/pycc -DNDEBUG -Dversion_info=(1,2,2,'final',0) -D__version__=1.2.2 -I/usr/local/mysql/include -I/usr/include/python2.4 -c mysql.c -o build/temp.solaris-2.10-i86pc-2.4/mysql.o -g -mt -fsimple=1 -ftrap=%%none -nofstore -xbuiltin=%%all -xlibmil -xlibmopt -xtarget=generic -DHAVE_RWLOCK_T -DUNIV_SOLARIS
cc: illegal option -ftrap=%%none
error: command '/usr/lib/python2.4/pycc' failed with exit status 1
This is using Sun Studio 12 cc.
Has anybody else experienced this issue, or have any ideas on the cause?
Thanks
Jon
This is now working. I compiled mysql from source, and the module then installed. I was previously using the sun compiled binaries for mysql.
Thanks
Jon
Similar Messages
-
[Python on SOLARIS 8 Sparc] Libs error...
Hi;
I'm relativly new with Solaris 8 but i have much more experience with Linux and derivated operating systems.
My problem is that when i want to start python, i get the following error:
bash-2.03# python2.4
ld.so.1: python2.4: fatal : libcrypto.so.0.9.6 : �chec de l'ouverture : Ce fichier ou ce r�pertoire n'existe pas
Tu� It's in french..
It says :
ld.so.1: python2.4 : fatal : libcrypto.so.0.9.6 : couldn't open : this file or directory doesn't exists.
Someone know how to fix this please?
And also.. If someone could give me some advices to install XML::Parser i would be very graceful.
Thanks!
Philippe Desmaraisgcc is not supported. Use SUN Workshop. See the release notes for supported software.
Wayne Scott
alex wrote:
Help!!!
Environment:oracle 9i,Solaris 8(SPARC,64),Tuxedo 8.0,GCC3.2
Input:buildtms -o ORA_TMS9i -r Oracle_XA
Output:
gcc: language arch=v9 not recognized
gcc: language arch=v9 not recognized
gcc: language arch=v9 not recognized
gcc: language arch=v9 not recognized
collect2: ld returned 1 exit status
CMDTUX_CAT:1832: ERROR: can't execute gcc -xarch=v9 -w -I$TUXDIR/include -o ./TMS_ORA9i
BS-21c1.c -L${TUXDIR}/lib /home/tuxedo/bea/tuxedo8.0/lib/TMS.o -ltux -lbuft
-L${ORACLE_HOME}/lib -lxa ${ORACLE_HOME}/lib/libsql9.a -lora -lsqlnet -lcore
-lnlsrtl -lcore ${ORACLE_HOME}/lib/osntabst.o -lsqlnet -lcv6 -lora -lm -lsocket
-lfml -lfml32 -lengine -R/usr/lib/lwp -lpthread -lposix4 -lsocket -lnsl
CMDTUX_CAT:530: ERROR: Cannot execute $TUXDIR/bin/buildserver -r Oracle_XA -o
./TMS_ORA9i -S -s TMS -s..TMS:TMS -f $TUXDIR/lib/TMS.o -
Upgrade Python to 2.7 in Sparc Solaris 11.2
Hi,
Can anyone suggest a way to upgrade the Python from 2.6.8 in my Sparc Solaris 11.2 to 2.7+?Python 2.7 is available since Solaris 11. You have just to install the runtime/python-27 package.
For information, this is not an upgrade but a parallel installation. -
MySQLdb support in python 3 [SOLVED sort of ;)]
I'm working in a python app and I noticed that when I import MySQLdb it gives me the error:
Error loading MySQLdb module: No module named 'MySQLdb'
But if I run python2.7 and import the module all is well and no complaints.
In searching the forums I only found a related bug report from way back (2010) so I wonder if I'm doing something wrong... since I find
difficult to belive that I would be the ONLY one having the problem if there is in fact no support for MySQLdb in python 3.
Any help would be appreciated.
R.
p.s
I have installed mysql-python, I wonder if I should be running instead the mysql-python-embedded from aur?
Last edited by ralvez (2013-09-05 00:44:38)https://pypi.python.org/pypi/MySQL-python/1.2.4
MySQL-3.23 through 5.5 and Python-2.4 through 2.7 are currently supported. Python-3.0 will be supported in a future release.
There will not be any future releases, but see https://github.com/farcepest/moist
(this is just what I got from a quick search) -
Can't install Oracle VM Agent 3.3.1 on T3-1 w/ Solaris 11.2
Solaris and SPARC VM NOOB Alert!!!
When attempting to run the installer (./install) as root for the Oracle VM Agent 3.3.1 for SPARC (from ovs-ldoms-3.3.1-b1065.tar.gz) I receive the following dependency errors. This is a fresh install of the OS (Solaris 11.2) with a static IP. No further customizations have been made. How do I resolve the dependency errors so the installation can complete successfully?
root@wtlsovm01:/var/tmp/ovs-ldoms-3.3.1-b1065# ./install
Oracle VM Agent Release 3.3.1 Installer
- Installing Packages
Updating package cache 1/1
Creating Plan (Running solver): \
pkg install: No solution was found to satisfy constraints
maintained incorporations:
pkg://solaris/consolidation/ldoms/[email protected],5.11-0.175.2.0.0.34.0:20140303T141819Z
pkg://solaris/consolidation/gfx/[email protected],5.11-0.175.1.0.0.5.0:20111212T232623Z
pkg://solaris/consolidation/admin/[email protected],5.11-0.175.1.0.0.5.0:20111212T232623Z
pkg://solaris/consolidation/SunVTS/[email protected],5.11-0.175.2.0.0.42.4:20140623T214952Z
pkg://solaris/consolidation/solaris_re/[email protected],5.11-0.175.2.0.0.42.0:20140623T214932Z
pkg://solaris/consolidation/cacao/[email protected],5.11-0.175.2.0.0.38.0:20140428T130228Z
pkg://solaris/consolidation/jdmk/[email protected],5.11-0.175.2.0.0.22.0:20130902T173003Z
pkg://solaris/consolidation/dbtg/[email protected],5.11-0.175.2.0.0.38.0:20140428T130044Z
pkg://solaris/consolidation/ips/[email protected],5.11-0.175.2.0.0.41.0:20140609T232518Z
pkg://solaris/consolidation/cde/[email protected],5.11-0.175.2.0.0.23.0:20130916T152657Z
pkg://solaris/consolidation/smcc/[email protected],5.11-0.175.1.0.0.5.0:20111212T232623Z
pkg://solaris/consolidation/osnet/[email protected],5.11-0.175.2.0.0.42.2:20140624T183842Z
pkg://solaris/consolidation/man/[email protected],5.11-0.175.2.0.0.40.0:20140527T142047Z
pkg://solaris/consolidation/desktop/[email protected],5.11-0.175.2.0.0.42.0:20140623T125512Z
pkg://solaris/consolidation/l10n/[email protected],5.11-0.175.2.0.0.42.2:20140623T130256Z
pkg://solaris/consolidation/X/[email protected],5.11-0.175.2.0.0.42.1406:20140623T215134Z
pkg://solaris/consolidation/sic_team/[email protected],5.11-0.175.2.0.0.39.0:20140512T160329Z
pkg://solaris/consolidation/sunpro/[email protected],5.11-0.175.2.1.0.4.0:20140728T200719Z
pkg://solaris/[email protected],5.11-0.175.2.1.0.2.1:20140923T224940Z
pkg://solaris/consolidation/cns/[email protected],5.11-0.175.2.0.0.39.0:20140512T125220Z
pkg://solaris/consolidation/nspg/[email protected],5.11-0.175.1.0.0.5.0:20111212T232623Z
pkg://solaris/consolidation/userland/[email protected],5.11-0.175.2.1.0.2.0:20140723T184045Z
pkg://solaris/consolidation/desktop/[email protected],5.11-0.175.2.0.0.42.0:20140623T125514Z
pkg://solaris/consolidation/sfw/[email protected],5.11-0.175.1.0.0.5.0:20111212T232623Z
Plan Creation: dependency error(s) in proposed packages:
No suitable version of required package pkg://solaris/developer/build/[email protected],5.11-0.151.0.1:20101104T230755Z found:
Reject: pkg://solaris/developer/build/[email protected],5.11-0.151.0.1:20101104T230755Z
Reason: All acceptable versions of 'require' dependency on pkg:/runtime/python-24 are obsolete
No suitable version of required package pkg://ovm/ovm/[email protected],5.11-3.3.1.0.0.1065:20140620T001722Z found:
Reject: pkg://ovm/ovm/[email protected],5.11-3.3.1.0.0.1065:20140620T001722Z
Reason: All versions matching 'incorporate' dependency pkg:/system/[email protected],5.11-0.175.1 are rejected
Reject: pkg://solaris/system/[email protected],5.11-0.175.1.0.0.24.2:20120919T184646Z
Reason: Newer version pkg://solaris/system/[email protected],5.11-0.175.2.0.0.42.2:20140624T184927Z is already installed
This version is excluded by installed incorporation pkg://solaris/consolidation/osnet/[email protected],5.11-0.175.2.0.0.42.2:20140624T183842Z
There was an error during the installation. The Oracle VM Agent
might not be fully installed or configured.I have updated the os using "pkg update entire" and am now getting a few new issues. I was able to install the "onbld" package manually but don't know how to udpate the rest of them. It looks like a newer version exists for all packages already.
root@wtlsovm01:/var/tmp/ovs-ldoms-3.3.1-b1065# ./install
Oracle VM Agent Release 3.3.1 Installer
- Installing Packages
Updating package cache 1/1
Creating Plan (Running solver): |
pkg install: No solution was found to satisfy constraints
maintained incorporations:
pkg://solaris/consolidation/ldoms/[email protected],5.11-0.175.2.2.0.4.0:20140829T201617Z
pkg://solaris/consolidation/gfx/[email protected],5.11-0.175.1.0.0.5.0:20111212T232623Z
pkg://solaris/consolidation/admin/[email protected],5.11-0.175.1.0.0.5.0:20111212T232623Z
pkg://solaris/consolidation/SunVTS/[email protected],5.11-0.175.2.1.0.5.1:20140801T185126Z
pkg://solaris/consolidation/solaris_re/[email protected],5.11-0.175.2.0.0.42.0:20140623T214932Z
pkg://solaris/consolidation/cacao/[email protected],5.11-0.175.2.0.0.38.0:20140428T130228Z
pkg://solaris/consolidation/jdmk/[email protected],5.11-0.175.2.0.0.22.0:20130902T173003Z
pkg://solaris/consolidation/dbtg/[email protected],5.11-0.175.2.0.0.38.0:20140428T130044Z
pkg://solaris/consolidation/ips/[email protected],5.11-0.175.2.3.0.3.0:20140922T212539Z
pkg://solaris/consolidation/cde/[email protected],5.11-0.175.2.0.0.23.0:20130916T152657Z
pkg://solaris/consolidation/smcc/[email protected],5.11-0.175.1.0.0.5.0:20111212T232623Z
pkg://solaris/consolidation/osnet/[email protected],5.11-0.175.2.3.0.4.2:20141002T140703Z
pkg://solaris/consolidation/man/[email protected],5.11-0.175.2.0.0.40.0:20140527T142047Z
pkg://solaris/consolidation/desktop/[email protected],5.11-0.175.2.0.0.42.0:20140623T125512Z
pkg://solaris/consolidation/l10n/[email protected],5.11-0.175.2.1.0.4.2:20140728T200523Z
pkg://solaris/consolidation/X/[email protected],5.11-0.175.2.1.0.3.1413:20140722T155222Z
pkg://solaris/consolidation/sic_team/[email protected],5.11-0.175.2.0.0.39.0:20140512T160329Z
pkg://solaris/consolidation/sunpro/[email protected],5.11-0.175.2.1.0.4.0:20140728T200719Z
pkg://solaris/[email protected],5.11-0.175.2.3.0.5.0:20141019T181440Z
pkg://solaris/consolidation/cns/[email protected],5.11-0.175.2.0.0.39.0:20140512T125220Z
pkg://solaris/consolidation/nspg/[email protected],5.11-0.175.1.0.0.5.0:20111212T232623Z
pkg://solaris/consolidation/userland/[email protected],5.11-0.175.2.3.0.5.0:20141019T180830Z
pkg://solaris/consolidation/desktop/[email protected],5.11-0.175.2.0.0.42.0:20140623T125514Z
pkg://solaris/consolidation/sfw/[email protected],5.11-0.175.1.0.0.5.0:20111212T232623Z
Plan Creation: dependency error(s) in proposed packages:
No suitable version of required package pkg://solaris/consolidation/install/[email protected],5.11-0.175.0.13.0.3.0:20121026T213105Z found:
Reject: pkg://solaris/consolidation/install/[email protected],5.11-0.175.0.13.0.3.0:20121026T213105Z
Reason: All versions matching 'incorporate' dependency pkg:/system/library/[email protected],5.11-0.175.0.0.0.2.1482 are rejected
Reject: pkg://solaris/system/library/[email protected],5.11-0.175.0.0.0.2.1482:20111019T122729Z
Reason: Newer version pkg://solaris/system/library/[email protected],5.11-0.175.2.0.0.42.2:20140624T185703Z is already installed
This version is excluded by installed incorporation pkg://solaris/consolidation/osnet/[email protected],5.11-0.175.2.3.0.4.2:20141002T140703Z
No suitable version of required package pkg://solaris/consolidation/install/[email protected],5.11-0.175.0.10.0.4.0:20120731T141438Z found:
Reject: pkg://solaris/consolidation/install/[email protected],5.11-0.175.0.10.0.4.0:20120731T141438Z
Reason: All versions matching 'incorporate' dependency pkg:/system/library/[email protected],5.11-0.175.0.0.0.2.1482 are rejected
Reject: pkg://solaris/system/library/[email protected],5.11-0.175.0.0.0.2.1482:20111019T122729Z
Reason: Newer version pkg://solaris/system/library/[email protected],5.11-0.175.2.0.0.42.2:20140624T185703Z is already installed
This version is excluded by installed incorporation pkg://solaris/consolidation/osnet/[email protected],5.11-0.175.2.3.0.4.2:20141002T140703Z
No suitable version of required package pkg://solaris/consolidation/install/[email protected],5.11-0.175.1.7.0.1.0:20130408T213640Z found:
Reject: pkg://solaris/consolidation/install/[email protected],5.11-0.175.1.7.0.1.0:20130408T213640Z
Reason: All versions matching 'incorporate' dependency pkg:/install/[email protected],5.11-0.175.1.0.0.24.1736 are rejected
Reject: pkg://solaris/install/[email protected],5.11-0.175.1.0.0.24.1736:20120912T193256Z
Reason: Newer version pkg://solaris/install/[email protected],5.11-0.175.2.0.0.42.2:20140624T184452Z is already installed
This version is excluded by installed incorporation pkg://solaris/consolidation/osnet/[email protected],5.11-0.175.2.3.0.4.2:20141002T140703Z
No suitable version of required package pkg://solaris/consolidation/install/[email protected],5.11-0.175.1.10.0.5.1736:20130805T155448Z found:
Reject: pkg://solaris/consolidation/install/[email protected],5.11-0.175.1.10.0.5.1736:20130805T155448Z
Reason: All versions matching 'incorporate' dependency pkg:/system/install/auto-install/[email protected],5.11-0.175.1.10.0.5.1736 are rejected
Reject: pkg://solaris/system/install/auto-install/[email protected],5.11-0.175.1.10.0.5.1736:20130805T155452Z
Reason: Newer version pkg://solaris/system/install/auto-install/[email protected],5.11-0.175.2.0.0.42.2:20140624T185337Z is already installed
This version is excluded by installed incorporation pkg://solaris/consolidation/osnet/[email protected],5.11-0.175.2.3.0.4.2:20141002T140703Z
No suitable version of required package pkg://solaris/consolidation/install/[email protected],5.11-0.175.0.0.0.2.1482:20111019T122620Z found:
Reject: pkg://solaris/consolidation/install/[email protected],5.11-0.175.0.0.0.2.1482:20111019T122620Z
Reason: All versions matching 'incorporate' dependency pkg:/system/library/[email protected],5.11-0.175.0.0.0.2.1482 are rejected
Reject: pkg://solaris/system/library/[email protected],5.11-0.175.0.0.0.2.1482:20111019T122729Z
Reason: Newer version pkg://solaris/system/library/[email protected],5.11-0.175.2.0.0.42.2:20140624T185703Z is already installed
This version is excluded by installed incorporation pkg://solaris/consolidation/osnet/[email protected],5.11-0.175.2.3.0.4.2:20141002T140703Z
No suitable version of required package pkg://solaris/consolidation/install/[email protected],5.11-0.175.1.0.0.24.1736:20120912T193249Z found:
Reject: pkg://solaris/consolidation/install/[email protected],5.11-0.175.1.0.0.24.1736:20120912T193249Z
Reason: All versions matching 'incorporate' dependency pkg:/install/[email protected],5.11-0.175.1.0.0.24.1736 are rejected
Reject: pkg://solaris/install/[email protected],5.11-0.175.1.0.0.24.1736:20120912T193256Z
Reason: Newer version pkg://solaris/install/[email protected],5.11-0.175.2.0.0.42.2:20140624T184452Z is already installed
This version is excluded by installed incorporation pkg://solaris/consolidation/osnet/[email protected],5.11-0.175.2.3.0.4.2:20141002T140703Z
No suitable version of required package pkg://solaris/consolidation/install/[email protected],5.11-0.151.0.1:20101104T230640Z found:
Reject: pkg://solaris/consolidation/install/[email protected],5.11-0.151.0.1:20101104T230640Z
Reason: All versions matching 'incorporate' dependency pkg:/system/install/auto-install/[email protected],5.11-0.151.0.1 are rejected
Reject: pkg://solaris/system/install/auto-install/[email protected],5.11-0.151.0.1:20101105T002200Z
Reason: Newer version pkg://solaris/system/install/auto-install/[email protected],5.11-0.175.2.0.0.42.2:20140624T185337Z is already installed
This version is excluded by installed incorporation pkg://solaris/consolidation/osnet/[email protected],5.11-0.175.2.3.0.4.2:20141002T140703Z
No suitable version of required package pkg://solaris/consolidation/install/[email protected],5.11-0.175.1.14.0.1.1736:20131111T172122Z found:
Reject: pkg://solaris/consolidation/install/[email protected],5.11-0.175.1.14.0.1.1736:20131111T172122Z
Reason: All versions matching 'incorporate' dependency pkg:/system/library/[email protected],5.11-0.175.1.14.0.1.1736 are rejected
Reject: pkg://solaris/system/library/[email protected],5.11-0.175.1.14.0.1.1736:20131111T172124Z
Reason: Newer version pkg://solaris/system/library/[email protected],5.11-0.175.2.0.0.42.2:20140624T185703Z is already installed
This version is excluded by installed incorporation pkg://solaris/consolidation/osnet/[email protected],5.11-0.175.2.3.0.4.2:20141002T140703Z
No suitable version of required package pkg://solaris/consolidation/install/[email protected],5.11-0.175.1.13.0.1.1736:20131004T215705Z found:
Reject: pkg://solaris/consolidation/install/[email protected],5.11-0.175.1.13.0.1.1736:20131004T215705Z
Reason: All versions matching 'incorporate' dependency pkg:/system/install/[email protected],5.11-0.175.1.0.0.24.1736 are rejected
Reject: pkg://solaris/system/install/[email protected],5.11-0.175.1.0.0.24.1736:20120912T193312Z
Reason: Newer version pkg://solaris/system/install/[email protected],5.11-0.175.2.0.0.5:20130107T162448Z is already installed
This version is excluded by installed incorporation pkg://solaris/consolidation/osnet/[email protected],5.11-0.175.2.3.0.4.2:20141002T140703Z
No suitable version of required package pkg://solaris/consolidation/install/[email protected],5.11-0.175.1.6.0.2.0:20130318T230320Z found:
Reject: pkg://solaris/consolidation/install/[email protected],5.11-0.175.1.6.0.2.0:20130318T230320Z
Reason: All versions matching 'incorporate' dependency pkg:/install/[email protected],5.11-0.175.1.0.0.24.1736 are rejected
Reject: pkg://solaris/install/[email protected],5.11-0.175.1.0.0.24.1736:20120912T193256Z
Reason: Newer version pkg://solaris/install/[email protected],5.11-0.175.2.0.0.42.2:20140624T184452Z is already installed
This version is excluded by installed incorporation pkg://solaris/consolidation/osnet/[email protected],5.11-0.175.2.3.0.4.2:20141002T140703Z
No suitable version of required package pkg://solaris/consolidation/install/[email protected],5.11-0.175.1.12.0.3.1736:20130920T234059Z found:
Reject: pkg://solaris/consolidation/install/[email protected],5.11-0.175.1.12.0.3.1736:20130920T234059Z
Reason: All versions matching 'incorporate' dependency pkg:/system/[email protected],5.11-0.175.1.0.0.24.1736 are rejected
Reject: pkg://solaris/system/[email protected],5.11-0.175.1.0.0.24.1736:20120912T193315Z
Reason: Newer version pkg://solaris/system/[email protected],5.11-0.175.2.0.0.42.2:20140624T185350Z is already installed
This version is excluded by installed incorporation pkg://solaris/consolidation/osnet/[email protected],5.11-0.175.2.3.0.4.2:20141002T140703Z
No suitable version of required package pkg://solaris/consolidation/install/[email protected],5.11-0.175.1.11.0.3.0:20130823T203748Z found:
Reject: pkg://solaris/consolidation/install/[email protected],5.11-0.175.1.11.0.3.0:20130823T203748Z
Reason: All versions matching 'incorporate' dependency pkg:/system/install/auto-install/[email protected],5.11-0.175.1.11.0.3.1736 are rejected
Reject: pkg://solaris/system/install/auto-install/[email protected],5.11-0.175.1.11.0.3.1736:20130823T203749Z
Reason: Newer version pkg://solaris/system/install/auto-install/[email protected],5.11-0.175.2.0.0.42.2:20140624T185337Z is already installed
This version is excluded by installed incorporation pkg://solaris/consolidation/osnet/[email protected],5.11-0.175.2.3.0.4.2:20141002T140703Z
No suitable version of required package pkg://solaris/consolidation/install/[email protected],5.11-0.175.1.18.0.5.1736:20140411T220750Z found:
Reject: pkg://solaris/consolidation/install/[email protected],5.11-0.175.1.18.0.5.1736:20140411T220750Z
Reason: All versions matching 'incorporate' dependency pkg:/install/[email protected],5.11-0.175.1.18.0.5.1736 are rejected
Reject: pkg://solaris/install/[email protected],5.11-0.175.1.18.0.5.1736:20140411T220752Z
Reason: Newer version pkg://solaris/install/[email protected],5.11-0.175.2.0.0.42.2:20140624T184449Z is already installed
This version is excluded by installed incorporation pkg://solaris/consolidation/osnet/[email protected],5.11-0.175.2.3.0.4.2:20141002T140703Z
No suitable version of required package pkg://solaris/consolidation/install/[email protected],5.11-0.175.1.8.0.1.0:20130510T213433Z found:
Reject: pkg://solaris/consolidation/install/[email protected],5.11-0.175.1.8.0.1.0:20130510T213433Z
Reason: All versions matching 'incorporate' dependency pkg:/install/[email protected],5.11-0.175.1.0.0.24.1736 are rejected
Reject: pkg://solaris/install/[email protected],5.11-0.175.1.0.0.24.1736:20120912T193256Z
Reason: Newer version pkg://solaris/install/[email protected],5.11-0.175.2.0.0.42.2:20140624T184452Z is already installed
This version is excluded by installed incorporation pkg://solaris/consolidation/osnet/[email protected],5.11-0.175.2.3.0.4.2:20141002T140703Z
No suitable version of required package pkg://solaris/consolidation/install/[email protected],5.11-0.175.0.7.0.2.0:20120416T210633Z found:
Reject: pkg://solaris/consolidation/install/[email protected],5.11-0.175.0.7.0.2.0:20120416T210633Z
Reason: All versions matching 'incorporate' dependency pkg:/system/library/[email protected],5.11-0.175.0.0.0.2.1482 are rejected
Reject: pkg://solaris/system/library/[email protected],5.11-0.175.0.0.0.2.1482:20111019T122729Z
Reason: Newer version pkg://solaris/system/library/[email protected],5.11-0.175.2.0.0.42.2:20140624T185703Z is already installed
This version is excluded by installed incorporation pkg://solaris/consolidation/osnet/[email protected],5.11-0.175.2.3.0.4.2:20141002T140703Z
No suitable version of required package pkg://ovm/ovm/[email protected],5.11-3.3.1.0.0.1065:20140620T001722Z found:
Reject: pkg://ovm/ovm/[email protected],5.11-3.3.1.0.0.1065:20140620T001722Z
Reason: All versions matching 'incorporate' dependency pkg:/system/[email protected],5.11-0.175.1 are rejected
Reject: pkg://solaris/system/[email protected],5.11-0.175.1.0.0.24.2:20120919T184646Z
pkg://solaris/system/[email protected],5.11-0.175.1.1.0.4.2:20121105T233937Z
pkg://solaris/system/[email protected],5.11-0.175.1.2.0.4.2:20121204T173533Z
pkg://solaris/system/[email protected],5.11-0.175.1.3.0.2.2:20121213T171610Z
pkg://solaris/system/[email protected],5.11-0.175.1.4.0.2.2:20130122T173821Z
pkg://solaris/system/[email protected],5.11-0.175.1.5.0.4.2:20130228T222900Z
pkg://solaris/system/[email protected],5.11-0.175.1.6.0.3.2:20130322T212821Z
pkg://solaris/system/[email protected],5.11-0.175.1.7.0.2.2:20130413T005347Z
pkg://solaris/system/[email protected],5.11-0.175.1.8.0.2.2:20130517T182805Z
pkg://solaris/system/[email protected],5.11-0.175.1.9.0.3.2:20130624T215936Z
pkg://solaris/system/[email protected],5.11-0.175.1.10.0.2.2:20130716T195531Z
pkg://solaris/system/[email protected],5.11-0.175.1.11.0.4.2:20130905T154911Z
pkg://solaris/system/[email protected],5.11-0.175.1.12.0.1.2:20130909T210753Z
pkg://solaris/system/[email protected],5.11-0.175.1.13.0.5.2:20131031T144854Z
pkg://solaris/system/[email protected],5.11-0.175.1.14.0.3.2:20131122T214859Z
pkg://solaris/system/[email protected],5.11-0.175.1.15.0.4.2:20131227T175537Z
pkg://solaris/system/[email protected],5.11-0.175.1.16.0.4.2:20140131T234551Z
pkg://solaris/system/[email protected],5.11-0.175.1.17.0.4.2:20140228T002730Z
pkg://solaris/system/[email protected],5.11-0.175.1.18.0.4.2:20140401T163828Z
pkg://solaris/system/[email protected],5.11-0.175.1.19.0.5.2:20140505T164959Z
pkg://solaris/system/[email protected],5.11-0.175.1.20.0.4.2:20140529T200718Z
Reason: Newer version pkg://solaris/system/[email protected],5.11-0.175.2.3.0.2.2:20140912T210357Z is already installed
This version is excluded by installed incorporation pkg://solaris/consolidation/osnet/[email protected],5.11-0.175.2.3.0.4.2:20141002T140703Z
There was an error during the installation. The Oracle VM Agent
might not be fully installed or configured. -
I use this nifty utility on my RedHat servers:
http://dag.wieers.com/home-made/dstat/
Has anyone bothered with getting dstat to work on Solaris 9? This utility needs Python which will want a few other things installed, I wonder if anyone has bothered to try...
Thanks!Hey there -
CSA is not supported on Solaris 9 currently.
I have seen messages from customers who receive an error message during install.
Hope this helps,
peter -
I tried to build latest Python sources with Sun C compiler on Solaris snv_145 (sparc or x86)
There is no issue to build the binary, but then Python's
harness runs it as: 'python -E ./setup.py build' it core dumps.
Actually, Python's version and Sun compiler versions are not essential.
I tried viariety of them, and all produce the same core dump.
I ran dbx with this and pinpointed the place:
At some moment python binary calls rlinit_terminal_io() from
open source readline.so library, which in turn invokes kernel's tgetent()
function from libcurses.so.2. That tgetent() function crashes on the
following line where cur_term is nil:
if (strcmp(cur_term->_term, name) == 0)
The top of crashed stack looks like this:
========================
t@1 (l@1) signal SEGV (no mapping at the fault address) in tgetent at line 65 in file "tgetent.c"
65 if (strcmp(cur_term->_term, name) == 0)
(dbx) print name
name = 0x8047a4d "sun-cmd"
(dbx) print cur_term
cur_term = (nil)
(dbx) where
current thread: t@1
=>[1] tgetent(buffer = 0x8786dd0 "", name = 0x8047a4d "sun-cmd"), line 65 in "tgetent.c"
[2] rlinit_terminal_io(terminal_name = 0x8047a4d "sun-cmd"), line 460 in "terminal.c"
[3] readline_initialize_everything(), line 1066 in "readline.c"
[4] rl_initialize(), line 968 in "readline.c"
[5] setup_readline(), line 884 in "readline.c"
[6] PyInit_readline(), line 1133 in "readline.c"
[7] PyImportLoadDynamicModule(name = 0x8747698 "readline", pathname = 0x8656e38 "build/lib.solaris-2.11-i86pc-3.2-pydebug/readline.so", fp = (nil)), line 57 in "importdl.c"
===================
May be to prevent this crash I need to define some
environment variable which ultimately will initialize 'cur_term' global?
Please advise.Please edit your post and use code tags when posting logs and error messages to the boards:
https://wiki.archlinux.org/index.php/Fo … s_and_Code
As to your errors, this is documented in the wiki:
https://wiki.archlinux.org/index.php/Pa … stem.22.21 -
Registration issues.... Solaris 10 - 06/06
Having issues registering my V440 running Solaris 10 06/06. I have posted the error below and them some system information below that. any help is appreciated.
sysax /: /usr/sbin/sconadm register -a -r /usr/lib/breg/data/RegistrationProfile.properties
sconadm is running
Authenticating user ...
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
at $Proxy1.getInstanceName(Unknown Source)
at com.sun.scn.client.SCNClientSession.login(SCNClientSession.java:371)
at com.sun.cns.basicreg.cacao.ClientLoginCacaoAdapter.loginAccount(ClientLoginCacaoAdapter.java:209)
at com.sun.cns.basicreg.BasicRegCLI.authenticateUser(BasicRegCLI.java:1079)
at com.sun.cns.basicreg.BasicRegCLI.run(BasicRegCLI.java:669)
at com.sun.cns.basicreg.BasicRegCLI.main(BasicRegCLI.java:562)
Caused by: javax.management.InstanceNotFoundException: com.sun.scn:name=SCNBaseServiceFactory,assetSubProfile=Factory,host=sysax.consolidated.com,assetProfile=Factory,scnType=ServiceFactory,Vendor=Sun Microsystems Inc
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1010)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getClassLoaderFor(DefaultMBeanServerInterceptor.java:1349)
at com.sun.jmx.mbeanserver.JmxMBeanServer.getClassLoaderFor(JmxMBeanServer.java:1300)
at com.sun.jdmk.interceptor.DefaultMBeanServerInterceptor.getClassLoaderFor(DefaultMBeanServerInterceptor.java:285)
at com.sun.cacao.agent.DispatchInterceptor.getClassLoaderFor(DispatchInterceptor.java:474)
at com.sun.cacao.agent.auth.impl.AccessControlInterceptor.getClassLoaderFor(AccessControlInterceptor.java:427)
at com.sun.jdmk.JdmkMBeanServerImpl.getClassLoaderFor(JdmkMBeanServerImpl.java:1130)
at com.sun.cacao.common.instrum.impl.InstrumDefaultForwarder.getClassLoaderFor(InstrumDefaultForwarder.java:153)
at javax.management.remote.rmi.RMIConnectionImpl$4.run(RMIConnectionImpl.java:1306)
at java.security.AccessController.doPrivileged(Native Method)
at javax.management.remote.rmi.RMIConnectionImpl.getClassLoaderFor(RMIConnectionImpl.java:1303)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:766)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:595)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke(Unknown Source)
at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:969)
at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:201)
... 6 more
sysax /: cat /etc/release
Solaris 10 6/06 s10s_u2wos_09a SPARC
Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 09 June 2006
sysax /: cat /var/sadm/system/admin/CLUSTER
CLUSTER=SUNWCall
sysax /: java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Server VM (build 1.5.0_06-b05, mixed mode)
sysax /: smpatch get
patchpro.backout.directory - ""
patchpro.baseline.directory - /var/sadm/spool
patchpro.download.directory - /var/sadm/spool
patchpro.install.types - rebootafter:reconfigafter:standard
patchpro.patch.source - https://getupdates1.sun.com/
patchpro.patchset - current
patchpro.proxy.host - ""
patchpro.proxy.passwd **** ****
patchpro.proxy.port - 8080
patchpro.proxy.user - ""
sysax /: cat /usr/lib/breg/data/RegistrationProfile.properties
# CLI registration profile template version 1.0
# ******** WARNING ********
# This profile contains sensitive data: passwords and subscription
# keys. You should take care in how you handle it, ensuring that it
# is always adequately protected (mode 400 or 600, owned by root)
# and not stored on insecure file systems like those exported through
# standard NFS.
# Sun Online account information. A new account can be created by visiting
# http://updates.sun.com
userName=**************
password=***********
# Name (label) of this machine as you would like it to appear on the Sun Connection
# portal. If left blank hostname will be used
hostName=devdbs01
# Service Plan / contract number with Sun. For more information on this topic
# please visit http://www.sun.com/service/warrantiescontracts/ . NOTE - a
# subscription key is required to use the Sun Connection Portal.
subscriptionKey=***************
# Allow this host to be managed by the Sun Connection Portal. If set to true,
# a subscription key is required.
portalEnabled=true
# HTTPS proxy information needed to connect to Sun for registration and patch
# updates.
proxyHostName=
proxyPort=
proxyUserName=
proxyPassword=The error message I received was from the Sun Update Connection GUI. Once the patches I attempted to apply failed.
sysax /tmp: ./suc.sh.2
$USER:
$LOGNAME: root
Sat Feb 24 13:37:07 CST 2007
sysax
smpatch get:
patchpro.backout.directory - ""
patchpro.baseline.directory - /var/sadm/spool
patchpro.download.directory - /var/sadm/spool
patchpro.install.types - rebootafter:reconfigafter:standard
patchpro.patch.source - https://getupdates1.sun.com/
patchpro.patchset - current
patchpro.proxy.host - ""
patchpro.proxy.passwd **** ****
patchpro.proxy.port - 8080
patchpro.proxy.user - ""
smpatch analyze:
119252-15 SunOS 5.10: System Administration Applications Patch
119081-25 SunOS 5.10: CD-ROM Install Boot Image Patch
124630-03 SunOS 5.10: System Administration Applications, Network and Core Libraries Patch
124188-02 SunOS 5.10: Trusted Solaris Attributes Patch
119315-07 SunOS 5.10: Solaris Management Applications Patch
121308-08 SunOS 5.10: Solaris Management Console Patch
119313-10 SunOS 5.10: WBEM Patch
119534-10 SunOS 5.10: Flash Archive Patch
119254-34 SunOS 5.10: Install and Patch Utilities Patch
119963-08 SunOS 5.10: Shared library patch for C++
120753-03 SunOS 5.10: Microtasking libraries (libmtsk) patch
123494-03 X11 6.6.2: fontconfig patch
119812-02 X11 6.6.2: Freetype patch
125014-02 SunOS 5.10: IP filter patch
120780-03 SunOS 5.10: ixgb patch
119764-05 SunOS 5.10 : ipmitool patch
124258-01 SunOS 5.10: ufs and nfs driver patch
124252-01 SunOS 5.10: nfssrv patch
120812-15 OpenGL 1.5: OpenGL Patch for Solaris
123839-04 SunOS 5.10: Fault Manager Patch
124204-04 SunOS 5.10: zfs patch
122911-02 SunOS 5.10: Apache 1.3 Patch
120543-08 SunOS 5.10: Apache 2 Patch
117463-04 SunOS 5.10: passwdutil Patch
118890-03 SunOS 5.10: llib-lc patch
125024-01 SunOS 5.10: basic audit reporting tool patch
123908-01 SunOS 5.10: ar patch
120887-06 SunOS 5.10: cdrw patch
119580-05 SunOS 5.10: libcpc Patch
124244-01 SunOS 5.10: /usr/bin/rm patch
119685-10 SunOS 5.10: svc.startd patch
124997-01 SunOS 5.10: /usr/bin/tip patch
121081-06 SunOS 5.10: Connected Customer Agents 1.1.0
120845-04 SunOS 5.10: auditd patch
124235-01 SunOS 5.10: libpam.so.1 patch
120050-05 SunOS 5.10: usermod patch
122525-03 SunOS 5.10: Sun Fire V445 patch
124614-01 SunOS 5.10: sconadm proxy: UnknownHostException
120986-10 SunOS 5.10: mkfs and newfs patch
125040-01 SunOS 5.10: /usr/lib/inet/in.mpathd patch
122517-03 SunOS 5.10: Sun Fire V215/V245 platmod patch
125035-01 SunOS 5.10: libinetsvc.so.1 patch
123334-04 SunOS 5.10: e1000g_transition patch
122660-07 SunOS 5.10: zones patch
119998-02 SunOS 5.10: arp, ip, ipsecah drivers patch
125026-01 SunOS 5.10: message queue patch
118371-08 SunOS 5.10: elfsign Patch
123328-01 SunOS 5.10: expr patch
123520-01 SunOS 5.10: basename & dirname patch
123915-01 SunOS 5.10: libcfgadm.so.1 patch
125018-02 SunOS 5.10: scsi_vhci driver patch
123912-02 SunOS 5.10: ppriv patch
118367-04 SunOS 5.10: csh Patch
125016-01 SunOS 5.10: audit and init patch
119824-02 SunOS 5.10: prstat patch
123910-01 SunOS 5.10: platform_sun4v.xml patch
122255-04 SunOS 5.10: etc/flash/precreation/caplib patch
123319-01 SunOS 5.10: sysacct patch
118557-07 SunOS 5.10: platform/sun4u/kernel/drv/sparcv9/su patch
123271-01 SunOS 5.10: iwscn patch
124922-02 SunOS 5.10: ld.so.1 patch
123301-01 SunOS 5.10: i2c_svc patch
124325-01 SunOS 5.10: rcm modules patch
121561-04 SunOS 5.10: keymap patch
124918-02 SunOS 5.10: devfsadm, devlinks, drvconfig patch
122032-04 SunOS 5.10: Update timezones patch
124916-03 SunOS 5.10: sd, ssd drivers patch
121002-03 SunOS 5.10: pax patch
123252-01 SunOS 5.10: platform/SUNW,Netra-T2000 patch
122412-01 SunOS 5.10: ipseckey patch
122408-01 SunOS 5.10: libmtmalloc patch
120473-02 SunOS 5.10: nss_compat patch
124254-02 SunOS 5.10: sockfs patch
124250-03 SunOS 5.10: rpcmod patch
122752-04 SunOS 5.10: FMA snmp patch
124999-01 SunOS 5.10: mc-us3 driver patch
125319-01 SunOS 5.10: rmc_comm patch
125028-02 SunOS 5.10: pcipsy patch
118879-02 SunOS 5.10: dhcp daemon patch
118815-05 SunOS 5.10: awk nawk patch
121286-04 SunOS 5.10: libfru.so.1 and libfrureg.so.1 patch
122363-02 SunOS 5.10: fru_container.conf and libfruaccess.so.1 patch
119974-07 SunOS 5.10: fp plug-in for cfgadm
120222-15 SunOS 5.10: Emulex-Sun LightPulse Fibre Channel Adapter driver
119130-33 SunOS 5.10: Sun Fibre Channel Device Drivers
120182-05 SunOS 5.10: Sun Fibre Channel Host Bus Adapter Library
120346-06 SunOS 5.10: Common Fibre Channel HBA API Library
124943-01 SunOS 5.10: SunFreeware gzip man pages patch
122675-01 SunOS 5.10 : SunFreeware samba man pages patch
123809-01 SunOS 5.10: rpcsec_gss patch
121239-02 SunOS 5.10: libgss patch
120719-02 SunOS 5.10 : SunFreeware gzip patch
118925-05 SunOS 5.10: unistd header file patch
124208-01 SunOS 5.10: Trusted Extensions header files patch
124280-01 SunOS 5.10: libkdb.so.1 patch
120469-05 SunOS 5.10: kerberos patch
121006-02 SunOS 5.10: libkadm5 and kadmind patch
124991-01 SunOS 5.10: llc2 driver patch
124286-01 SunOS 5.10: chkey core dump
123186-02 SunOS 5.10: NIS yp utilities patch
124987-01 SunOS 5.10: ldap_cachemgr patch
119470-10 SunOS 5.10: Sun Enterprise Network Array firmware and utilities
122404-01 SunOS 5.10: xntpd patch
124990-01 SunOS 5.10: Sun-Blade-100 libprtdiag_psr.so.1 patch
121944-02 SunOS 5.10: libpsvcpolicy and libpsvcpolicy_psr patch
122537-02 SunOS 5.10: libpiclenvmon.so.1 patch
123590-02 SunOS 5.10: PostgresSQL patch
120629-05 SunOS 5.10: libpool patch
124993-01 SunOS 5.10: in.ndpd patch
125011-01 SunOS 5.10: sendmail patch
125022-01 SunOS 5.10: usr/sbin/sar patch
122376-01 SunOS 5.10: prex patch
120068-03 SunOS 5.10: in.telnetd patch
124995-01 SunOS 5.10: ehci driver patch
121010-05 SunOS 5.10: rpc.metad patch
124256-01 SunOS 5.10: md_mirror patch
125075-01 SunOS 5.10: svc-volfs patch
125073-01 SunOS 5.10: vold patch
119555-04 SunOS 5.10: Software to support QLogic Ultra3 SCSI host bus adapters
119090-22 SunOS 5.10: Sun iSCSI Device Driver and Utilities
120272-06 SunOS 5.10: SMA patch
124463-02 SunOS sparc : cacao 2.0 patch 02
119213-11 NSS_NSPR_JSS 3.11.4: NSPR 4.6.4 / NSS 3.11.4 / JSS 4.2.4
118666-11 J2SE 5.0: update 11 patch (5.0u11)
118667-11 J2SE 5.0: update 11 patch (5.0u11), 64bit
122119-05 SunOS 5.10: Patch for Arabic Fonts
119703-08 SunOS 5.10: Patch for localeadm issues
123003-02 SunOS 5.10: dependency issue with SUNWopenssl-include
123630-01 SunOS 5.10: HTTP proxy settings patch
123005-05 SunOS 5.10: Basic Registration Update
123011-01 SunOS 5.10: BR desktop icon patch
119648-03 SunOS 5.10: vlan driver patch
118777-08 SunOS 5.10: Sun GigaSwift Ethernet 1.0 driver patch
121118-11 SunOS 5.10: Sun Update Connection System Client 1.0.9
118712-13 SunOS 5.10: Sun XVR-100 Graphics Accelerator Patch
120410-17 SunOS 5.10: Internet/Intranet Input Method Framework patch
121734-05 SunOS 5.10: patch to support addition of new UTF-8 locales
119810-03 SunOS 5.10: International Components for Unicode Patch
120099-07 APOC 1.2: Sun Java(tm) Desktop System Configuration Shared Libraries
119546-07 APOC 1.2: APOC Configuration Agent Patch
124393-02 CDE 1.6: Dtlogin smf patch
123611-02 X11 6.6.2: Trusted Extensions patch
119280-10 CDE 1.6: Runtime library patch for Solaris 10
119278-12 CDE 1.6: dtlogin patch
124405-01 CDE1.6: sdtfprop patch
124403-01 CDE1.6: dtstyle patch
124401-01 CDE1.6: dtpad patch
124399-01 CDE1.6: dtfile patch
125279-01 CDE1.6: dtsession patch
121977-02 CDE 1.6: dtlogin resources patch
124397-02 CDE1.6: libDtWidget patch
124395-01 CDE1.6: dtaction patch
119117-29 Evolution 1.4.6 patch
123938-01 GNOME 2.6.0: GNU Transport Layer Security Library Patch
119418-03 GNOME 2.6.0: Gnome On-screen Keyboard Patch
119414-13 GNOME 2.6.0: Gnome Accessibility Libraries Patch
119598-08 GNOME 2.6.0: Gnome Screen Reader and Magnifier Patch
120454-02 GNOME 2.6.0: Gnome Apoc GConf Adapter Patch
120460-10 GNOME 2.6.0: Gnome libs Patch
120284-04 GNOME 2.6.0: GNOME CORBA ORB and component framework
122212-17 GNOME 2.6.0: GNOME Desktop Patch
119410-05 GNOME 2.6.0: Gnome Applets Patch
119540-05 GNOME 2.6.0: Gnome Dtlogin configuration Patch
119548-07 GNOME 2.6.0: Gnome Multi-protocol instant messaging client Patch
123162-02 GNOME 2.6.0: Gnome Java Run Time Patch
120739-03 GNOME 2.6.0: GNOME PDF Viewer based on Xpdf
119368-05 GNOME 2.6.0: Printing Technology Patch
121606-02 GNOME 2.6.0: Python patch
120288-03 GNOME 2.6.0: Gnome terminal Patch
119906-08 Gnome 2.6.0: Virtual File System Framework patch
119538-10 GNOME 2.6.0: Window Manager Patch
119115-23 Mozilla 1.7 patch
122958-02 GNOME 2.6.0: RealPlayer media application
119903-02 OpenWindows 3.7.3: Xview Patch
119059-21 X11 6.6.2: Xsun patch
125045-01 X11 6.6.2: Xft patch
124457-01 X11 6.6.2: xdm patch
showrev -p
119788-07
120335-04
121081-05
121118-06
121118-08
121118-10
121453-02
122231-01
java -version:
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Server VM (build 1.5.0_06-b05, mixed mode)
/etc/release:
Solaris 10 6/06 s10s_u2wos_09a SPARC
Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 09 June 2006
/var/sadm/system/admin/CLUSTER:
CLUSTER=SUNWCall
/usr/lib/cc-ccr/bin/ccr -g cns.assetid:
1917645754
patchsvr setup -l
Patch source URL: https://getupdates1.sun.com/
Cache location: /var/sadm/spool/patchsvr
sysax /tmp: ps -ef | grep cc
root 2006 2003 0 Feb 22 ? 0:17 /usr/lib/cc-cfw/platform/transport/bin/cctransport
root 2022 2017 0 Feb 22 ? 0:01 /usr/lib/cc-cfw/platform/fwagent/bin/ccfwagent
root 2003 1 0 Feb 22 ? 0:00 /bin/sh /usr/lib/cc-cfw/framework/lib/watchdog /usr/lib/cc-cfw/platform/transpo
root 2013 2010 0 Feb 22 ? 0:01 /usr/lib/cc-cfw/platform/ccragent/bin/ccccragent
root 2010 1 0 Feb 22 ? 0:00 /bin/sh /usr/lib/cc-cfw/framework/lib/watchdog /usr/lib/cc-cfw/platform/ccragen
root 2017 1 0 Feb 22 ? 0:00 /bin/sh /usr/lib/cc-cfw/framework/lib/watchdog /usr/lib/cc-cfw/platform/fwagent
noaccess 1898 1 0 Feb 22 ? 1:02 /usr/jdk/instances/jdk1.5.0/bin/java -server -XX:+BackgroundCompilation -Djava.
root 8884 5284 0 13:39:27 console 0:00 grep cc
sysax /tmp: -
Intalling Postgresql in solaris 10
I have downloaded the postgresql package from
www.postgresql.org/download/bittorent
i have unziped the files. i dont know how to continue with the installation.Here is some documentation to get you started......It available online.
Author : Chris Drawater
Date
: May 2005
Version : 1.2
PostgreSQL 8.0.02 for J2EE applications on Solaris 10
Abstract
Advance planning enables PostgreSQL 8 and its associated JDBC driver to be quickly deployed in a
basic but resilient and IO efficient manner.
Minimal change is required to switch JDBC applications from Oracle to PostgreSQL.
Document Status
This document is Copyright � 2005 by Chris Drawater.
This document is freely distributable under the license terms of the GNU Free Documentation License
(http://www.gnu.org/copyleft/fdl.html). It is provided for educational purposes only and is NOT
supported.
Introduction
This paper documents how to deploy PostgreSQL 8 and its associated JDBC driver in a basic but both
resilient and IO efficient manner. Guidance for switching from Oracle to PostgreSQL is also provided.
It is based upon experience with the following configurations =>
PostgreSQL 8.0.2 on Solaris 10
PostgreSQL JDBC driver on Windows 2000
using the PostgreSQL distributions =>
postgresql-base-8.0.2.tar.gz
postgresql-8.0-311.jdbc3.jar
� Chris Drawater, 2005
PostgreSQL 8.0.2 on Solaris, v1.2
p1/10
Page 2
Background for Oracle DBAs
For DBAs coming from an Oracle background, PostgreSQL has a number of familiar concepts including
Checkpoints
Tablespaces
MVCC concurrency model
Write ahead log (WAL)+ PITR
Background DB writer
Statistics based optimizer
Recovery = Backup + archived WALs + current WALs
However , whereas 1 Oracle instance (set of processes) services 1 physical database, PostgreSQL differs in
that
1 PostgreSQL �cluster� services n * physical DBs
1 cluster has tablespaces (accessible to all DBs)
1 cluster = 1 PostgreSQL instance = set of server processes etc ( for all DBs) + 1 tuning config +
1 WAL
User accts are cluster wide by default
There is no undo or BI file � so to support MVCC, the �consistent read� data is held in the tables
themselves and once obsolete needs to be cleansed out using the �vacuum� utility.
The basic PostgreSQL deployment guidelines for Oracle aware DBAs are to =>
Create only 1 DB per cluster
Have 1 superuser per cluster
Let only the superuser create the database
Have one user to create/own the DB objects + n* endusers with appropriate read/write access
Use only ANSI SQL datatypes and DDL.
Wherever possible avoid DB specific SQL extensions to ensure cross-database portability
IO distribution & disc layouts
It is far better to start out with good disc layouts rather than reto-fix for a production database.
As with any DBMS, for resilience, the recovery components ( eg. backups , WAL, archived WAL logs)
should kept on devices separate from the actual data.
So the basic rules for resilience are as follows.
For non disc array or JBOD systems =>
keep recovery components separate from data on dedicated discs etc
keep WAL and data on separate disc controllers
mirror WAL across discs ( preferably across controllers) for protection against WAL spindle loss
For SAN based disc arrays (eg HP XP12000) =>
keep recovery components separate from data on dedicated LUNs etc
use Host Adapter Multipathing drivers (such as mpxio) with 2 or more HBAs for access to SAN .
Deploy application data on mirrored/striped (ie RAID 1+0) or write-cache fronted RAID 5 storage.
The WAL log IO should be configured to be osync for resilience (see basic tuning in later section).
Ensure that every PostgreSQL component on disc is resilient (duplexed) !
Recovery can be very stressful�
Moving onto IO performance, it is worth noting that WAL IO and general data IO access have different IO
characteristics.
� Chris Drawater, 2005
PostgreSQL 8.0.2 on Solaris, v1.2
p2/10
Page 3
WAL sequential access (write mostly)
Data sequential scan, random access write/read
The basic rules for good IO performance �.
use tablespaces to distribute data and thus IO across spindles or disc array LUNs
keep WAL on dedicated spindles/LUNs (mirror/stripe in preference to RAID 5)
keep WAL and arch WAL on separate spindles to reduce IO on WAL spindles.
RAID or stripe data across discs/LUNs in 1 Mb chunks/units if unsure as what chunk size to use.
For manageability, keep the software distr and binaries separate from the database objects.
Likewise, keep the system catalogs and non-application data separate from the application specific data.
5 distinct storage requirements can be identified =>
Software tree (Binaries, Source, distr)
Shared PG sys data
WAL logs
Arch WAL logs
Application data
For the purposes of this document , the following minimal set of FS are suggested =>
/opt/postgresql/8.0.2
# default 4 Gb for software tree
/var/opt/postgresql
# default 100 Mb
/var/opt/postgresql/CLUST/sys
# default size 1Gb for shared sys data
/var/opt/postgresql/CLUST/wal
# WAL location # mirrored/striped
/var/opt/postgresql/CLUST/archwal
# archived WALs
/var/opt/postgresql/CLUST/data
# application data + DB sys catalogs # RAID 5
where CLUST is your chosen name for the Postgres DB cluster
For enhanced IO distribution , a number of �/data FS (eg data01, data02 etc) could be deployed.
Pre-requisites !
The GNU compiler and make software utilities (available on the Solaris 10 installation CDs) =>
gcc (compiler) ( $ gcc --version => 3.4.3 )
gmake (GNU make)
are required and should be found in
/usr/sfw/bin
Create the Unix acct
postgres
in group dba
with a home directory of say /export/home/postgresql
using
$ useradd utility
or hack
/etc/group then /etc/passwd then run pwconv and then passwd postgres
Assuming the following FS have been created =>
� Chris Drawater, 2005
PostgreSQL 8.0.2 on Solaris, v1.2
p3/10
Page 4
/opt/postgresql/8.0.2
# default 4 Gb for the PostgreSQL software tree
/var/opt/postgresql
# default 100 Mb
create directories
/opt/postgresql/8.0.2/source
# source code
/opt/postgresql/8.0.2/distr
# downloaded distribution
all owned by user postgres:dba with 700 permissions
To ensure, there are enough IPC resources to use PostgreSQL, edit /etc/system and add the following lines
=>
set shmsys:shminfo_shmmax=1300000000
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=200
set shmsys:shminfo_shmseg=20
set semsys:seminfo_semmns=800
set semsys:seminfo_semmni=70
set semsys:seminfo_semmsl=270 # defaults to 25
set rlim_fd_cur=1024
# per process file descriptor soft limit
set rlim_fd_max=4096
# per process file descriptor hard limit
Thenn on the console (log in as root) =>
$ init 0
{a} ok boot -r
Download Source
Download the source codes from http://www.postgresql.org (and if downloaded via Windows, remember
to ftp in binary mode) =>
Distributions often available include =>
postgresql-XXX.tar.gz => full source distribution.
postgresql-base-XXX.tar.gz => Server and the essential client interfaces
postgresql-opt-XXX.tar.gz => C++, JDBC, ODBC, Perl, Python, and Tcl interfaces, as well as multibyte
support
postgresql-docs-XXX.tar.gz => html docs
postgresql-test-XXX.tar.gz => regression test
For a working, basic PostgreSQL installation supporting JDBC applications, simply use the �base�
distribution.
Create Binaries
Unpack Source =>
$ cd /opt/postgresql/8.0.2/distr
$ gunzip postgresql-base-8.0.2.tar.gz
$ cd /opt/postgresql/8.0.2/source
$ tar -xvof /opt/postgresql/8.0.2/distr/postgresql-base-8.0.2.tar
� Chris Drawater, 2005
PostgreSQL 8.0.2 on Solaris, v1.2
p4/10
Page 5
Set Unix environment =>
TMPDIR=/tmp
PATH=/usr/bin:/usr/ucb:/etc:.:/usr/sfw/bin:usr/local/bin:n:/usr/ccs/bin:$PATH
export PATH TMPDIR
Configure the build options =>
$ cd /opt/postgresql/8.0.2/source/postgresql-8.0.2
$ ./configure prefix=/opt/postgresql/8.0.2 with-pgport=5432 --without-readline
CC=/usr/sfw/bin/gcc
Note => --enable-thread-safety option failed
And build =>
$ gmake
$ gmake install
On an Ultra 5 workstation, this gives 32 bit executables
Setup Unix environment
Add to environment =>
LD_LIBRARY_PATH=/opt/postgresql/8.0.2/lib
PATH=/opt/postgresql/8.0.2/bin:$PATH
export PATH LD_LIBRARY_PATH
Create Database(Catalog) Cluster
Add to Unix environment =>
PGDATA=/var/opt/postgresql/CLUST/sys
# PG sys data , used by all DBs
export PGDATA
Assuming the following FS has been created =>
/var/opt/postgresql/CLUST/sys
# default size 1Gb
where CLUST is your chosen name for the Postgres DB cluster,
initialize database storage area, create shared catalogs and template database template1 =>
$ initdb -E UNICODE -A password
-W
# DBs have default Unicode char set, user basic passwords, prompt for super user password
Startup, Shutdown and basic tuning of servers
Check servers start/shutdown =>
$ pg_ctl start -l /tmp/logfile
$ pg_ctl stop
Next, tune the PostgreSQL instance by editing the configuration file $PGDATA/postgresql.conf .
� Chris Drawater, 2005
PostgreSQL 8.0.2 on Solaris, v1.2
p5/10
Page 6
First take a safety copy =>
$ cd $PGDATA
$ cp postgresql.conf postgresql.conf.orig
then make the following (or similar changes) to postgresql.conf =>
# listener
listen_addresses = 'localhost'
port = 5432
# data buffer cache
shared_buffers = 10000
# each 8Kb so depends upon memory available
#checkpoints
checkpoint_segments = 3
# default
checkpoint_timeout = 300
# default
checkpoint_warning = 30
# default � logs warning if ckpt interval < 30s
# log related
fsync = true
# resilience
wal_sync_method = open_sync
# resilience
commit_delay = 10
# group commit if works
archive_command = 'cp "%p" /var/opt/postgresql/CLUST/archwal/"%f"'
# server error log
log_line_prefix = '%t :'
# timestamp
log_min_duration_statement = 1000
# log any SQL taking more than 1000ms
log_min_messages = info
#transaction/locks
default_transaction_isolation = 'read committed'
Restart the servers =>
$ pg_ctl start -l /tmp/logfile
Create the Database
This requires the FS =>
/var/opt/postgresql/CLUST/wal
# WAL location
/var/opt/postgresql/CLUST/archwal
# archived WALs
/var/opt/postgresql/CLUST/data
# application data + DB sys catalogs
plus maybe also =>
/var/opt/postgresql/CLUST/backup
# optional for data and config files etc as staging
area for tape
Create the clusterwide tablespaces (in this example, a single tablespace named �appdata�) =>
$ psql template1
� Chris Drawater, 2005
PostgreSQL 8.0.2 on Solaris, v1.2
p6/10
Page 7
template1=# CREATE TABLESPACE appdata LOCATION '/var/opt/postgresql/CLUST/data';
template1=# SELECT spcname FROM pg_tablespace;
spcname
pg_default
pg_global
appdata
(3 rows)
and add to the server config =>
default_tablespace = 'appdata'
Next, create the database itself (eg name = db9, unicode char set) =>
$ createdb -D appdata -E UNICODE -e db9
# appdata = default TABLESPACE
$ createlang -d db9 plpgsql
# install 'Oracle PL/SQL like' language
WAL logs are stored in the directory pg_xlog under the data directory. Shut the server down & move the
directory pg_xlog to /var/opt/postgresql/CLUST/wal and create a symbolic link from the original location in
the main data directory to the new path.
$ pg_ctl stop
$ cd $PGDATA
$ mv pg_xlog /var/opt/postgresql/CLUST/wal
$ ls /var/opt/postgresql/CLUST/wal
$ ln -s /var/opt/postgresql/CLUST/wal/pg_xlog $PGDATA/pg_xlog
# soft link as across FS
$ pg_ctl start -l /tmp/logfile
Assuming all is now working OK, shutdown PostgreSQL & backup up all the PostgreSQL related FS
above� just in case�!
� Chris Drawater, 2005
PostgreSQL 8.0.2 on Solaris, v1.2
p7/10
Page 8
User Accounts
Create 1 * power user to create/own/control the tables (using psql) =>
$ pgsql template1
create user cxd with password 'abc';
grant create on tablespace appdata to cxd;
Do not create any more superusers or users that can create databases!
Now create n* enduser accts to work against the data =>
$pgsql template1
CREATE GROUP endusers;
create user enduser1 with password 'xyz';
ALTER GROUP endusers ADD USER enduser1;
$ psql db9 cxd
grant select. on <table>. to group endusers;
JDBC driver
A pure Java (Type 4) JDBC driver implementation can be downloaded from
http://jdbc.postgresql.org/
Assuming the use of the SDK 1.4 or 1.5, download
postgresql-8.0-311.jdbc3.jar
and include this in your application CLASSPATH.
(If moving JAR files between different hardware types, always ftp in BIN mode).
Configure PostgreSQL to accept JDBC Connections
To allow the postmaster listener to accept TCP/IP connections from client nodes running the JDBC
applications, edit the server configuration file and change
listen_addresses = '*'
# * = any IP interface
Alternatively, this parameter can specify only selected IP interfaces ( see documentation).
In addition, the client authetication file will need to edited to allow access to our database server.
First take a backup of the file =>
$ cp pg_hba.conf pg_hba.conf.orig
Add the following line =>
host db9
cxd
0.0.0.0/0
password
where , for this example, database db9, user cxd, auth password
� Chris Drawater, 2005
PostgreSQL 8.0.2 on Solaris, v1.2
p8/10
Page 9
Switching JDBC applications from Oracle to PostgreSQL
The URL used to connect to the PostgreSQL server should be of the form
jdbc:postgresql://host:port/database
If used, replace the line (used to load the JDBC driver)
Class.forName ("oracle.jdbc.driver.OracleDriver");
with
Class.forName("org.postgresql.Driver");
Remove any Oracle JDBC extensions, such as
((OracleConnection)con2).setDefaultRowPrefetch(50);
Instead, the row pre-fetch must be specified at an individual Statement level =>
eg.
PreparedStatement pi = con1.prepareStatement(�select�.�);
pi.setFetchSize(50);
If not set, the default fetch size = 0;
Likewise, any non ANSI SQL extensions will need changing.
For example sequence numbers
Oracle => online_id.nextval
should be replaced by
PostgreSQL => nextval('online_id')
Oracle �hints� embedded within SQL statements are ignored by PostgreSQL.
Now test your application!
Concluding Remarks
At this stage, you should now have a working PostgreSQL database fronted by a JDBC based application,
and the foundations will have been laid for :
A reasonably level of resilience (recoverability)
A good starting IO distribution
The next step is to tune the system under load� and that�s another doc�
Chris Drawater has been working with RDBMSs since 1987 and the JDBC API since late 1996, and can
be contacted at [email protected] or [email protected] .
� Chris Drawater, 2005
PostgreSQL 8.0.2 on Solaris, v1.2
p9/10
Page 10
Appendix 1 � Example .profile
TMPDIR=/tmp
export TMPDIR
PATH=/usr/bin:/usr/ucb:/etc:.:/usr/sfw/bin:usr/local/bin:n:/usr/ccs/bin:$PATH
export PATH
# PostgreSQL 802 runtime
LD_LIBRARY_PATH=/opt/postgresql/8.0.2/lib
PATH=/opt/postgresql/8.0.2/bin:$PATH
export PATH LD_LIBRARY_PATH
PGDATA=/var/opt/postgresql/CLUST/sys
export PGDATA
� Chris Drawater, 2005
PostgreSQL 8.0.2 on Solaris, v1.2
p10/10 -
Solaris 10 install ZFS dependencies not satisfied in default group
I'm installing solaris 10 (No I'm not allowed to upgrade to 11) on VMware and I'm trying to keep the installation small. I'm attempting to install the "Reduced Networking Group" but I get this error:
"The default packages included in the selected metacluster do not satisfy the dependencies of the options you have selected. You must select "Custom" and resolve these dependencies. The following dependency has been created:
1. ZFS(Usr) in "Zettabyte File System" depends on "The Python interpreter, libraries and utilities" in "GNOME Runtime".
So I tried doing the Custom install and selecting that dependency, but it creates another 3 dependencies. Which in turn create 5 more dependencies etc.
I tried searching google, but couldn't find any information about it. How do I get around this?That's the MBR label on the disk. That's easy to modify with fdisk.
Inside the Solaris partition is another (VTOC) label. That one is harder to modify. It's what you see when you run 'format' -> 'print' -> 'partition' or 'prtvtoc'.
To resize it, the only method I'm aware of is to record the slices somewhere, then destroy the label or run 'format -e' and create a new label for the autodetect device. Once you have the new label in place, you can recreate the old slices. All the data on the disk should be stable.
Then you can make use of the space on the disk for new slices, for enlarging the last slice, or if you have a VM of some sort managing the disk.
Darren -
Dlpi_enabnotify missing from Solaris 10u8?
Hi,
Trying to compile Python 2.6 on Solaris 10u8 x86 encounters compiler errors which seem
to indicate that dlpi_enabnotify is missing, however man dlpi_enabnotify says it should be there?
I was wondering how I can obtain dlpi_enabnotify for Solaris 10u8?
pkgbuild: building 'dlpi' extension
pkgbuild: /opt/sunstudio12.1/bin/cc -xregs=no%frameptr -KPIC -DNDEBUG -O -I. -I/h/goanna/2/os_5.10/kt/BUILD/SUNWPython26-2.6.4/Python-2.6.4/./Include -I. -IInclude -I./Include -I/usr/lib/libffi-3.0.8/include -I/h/goanna/2/os_5.10/kt/BUILD/SUNWPython26-2.6.4/Python-2.6.4/Include -I/h/goanna/2/os_5.10/kt/BUILD/SUNWPython26-2.6.4/Python-2.6.4 -c /h/goanna/2/os_5.10/kt/BUILD/SUNWPython26-2.6.4/Python-2.6.4/Modules/dlpimodule.c -o build/temp.solaris-2.10-i86pc-2.6/h/goanna/2/os_5.10/kt/BUILD/SUNWPython26-2.6.4/Python-2.6.4/Modules/dlpimodule.o
pkgbuild: "/h/goanna/2/os_5.10/kt/BUILD/SUNWPython26-2.6.4/Python-2.6.4/Modules/dlpimodule.c", line 356: syntax error before or at: dlpi_notifyinfo_t
pkgbuild: "/h/goanna/2/os_5.10/kt/BUILD/SUNWPython26-2.6.4/Python-2.6.4/Modules/dlpimodule.c", line 356: warning: undefined or missing type for: dlpi_notifyinfo_t
pkgbuild: "/h/goanna/2/os_5.10/kt/BUILD/SUNWPython26-2.6.4/Python-2.6.4/Modules/dlpimodule.c", line 442: warning: implicit function declaration: dlpi_enabnotify
% man dlpi_enabnotify
Reformatting page. Please Wait... done
Data Link Provider Interface Library Functions
dlpi_enabnotify(3DLPI)
NAME
dlpi_enabnotify - enable DLPI notification
SYNOPSIS
cc [ flag... ] file... -ldlpi [ library... ]
#include <libdlpi.h>
int dlpi_enabnotify(dlpi_handle_t dh, uint_t notes,
dlpi_notifyfunc_t funcp, void arg, dlpi_notifyid_t *id);
typedef void dlpi_notifyfunc_t(dlpi_handle_t,
dlpi_notifyinfo_t *, void *);
% elfdump /lib/libdlpi.so.1| grep dlpi_enabnotify
Thanks, MarkDid a rebuild with current patches, did not run JASS or an in-house hardening script on the nodes and I get the same result.
I think I might have a bug issue with the bge driver or something.
On the first node before running scinstall all nic lights are lit.
After that first node reboots from scinstall the nic lights stay lit until right before the CMM messages begin appearing on the console. At that point the interconnect lights go out and stay out physically.
No errors were detected with sccheck or in the install logs for the cluster.
I tried a rebuild of the cluster nodes using a switch (ProCurve 2626) for the interconnects rather than an ethernet cable or cross-over cable.
I have a hme interface in my V210 and V240 and I am going to use that for one of the interconnects to see if it matters.
Basically at this point it is definitely not something physical (bad cable, bad switch port, etc) but something in the cluster configuration from scinstall that is not digging the interconnects and keeping the cluster nodes from conversing.
Since the cluster isn't working anyway I can do a clintr enable node:port,switch@port and see that the ports and switch ports show as enabled by clintr status does not show an interconnect active and the physical ports are not lit.
I do see references to bgeX/0 unregistered in /var/adm/messages but I haven't found information as to what this means or what to do about it exactly yet.
Closest thing so far is this:
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6453203 -
I am new to Solaris. I downloaded the 4 CD set from Sun (dated 1/06) and installed it over another Solaris install (I had a DVD dated 3/05).
Now JDS doesn't work at all, it either segfaults or crashes the whole system (I don't know where to find the crash dumps or core files). Also, a lot of the software I selected during the install didn't seem to be on the CDs. After the 4th CD it asked me for a "Software Companion CD", which I didn't have. So then it didn't seem to install emacs, etc.
I'm assuming the JDS crash has something to do with the video driver. The logs say something about a fbdev missing. How do I get back to the install to install the "OEM" portion to get more drivers?
In general, I'm having trouble getting the packages I need onto the system. I don't even have a compiler. What kind of software is available to look on the internet for packages (like python, emacs, compilers, etc) and install them (something like FreeBSD's ports system, or Debian's apt-get)? Do I need another CD to bootstrap my system into something useful?Does CDE work, fine?
I don't even have a compiler.You can download a free copy of Sun Studio compiler suite from: http://developers.sun.com/prodtech/cc/products/get.html
What kind of software is available to look on the internet for packages (like python, emacs, compilers, etc) and install them (something like FreeBSD's ports system, or Debian's apt-get)?You can either check sunfreeware.com for the required packages, or use Blastwave's pkg-get tool (http://technopark02.blogspot.com/2005/06/solaris-installing-appspackages-with.html) to install the packages and their dependencies, automatically. -
I know nothing about PYTHON, so please think that you are talking to 6 year old ...
my setup: APEX 2.2.1 on ORACLE 10.2.0.2 on SOLARIS 10
I would like to implement this PYTHON library (or better say 2 libraries). http://bitworking.org/projects/sparklines
since i really know nothing about PYTHON, I'm really not sure where to start and I would really appretiany any help.
thank you
jiriJiri,
based on the information on the web-page, you can also use there system to generate the graphic, you just have to generate an URL in the following format.
http://bitworking.org/projects/sparklines/spark.cgi?type=smooth&d=88,84,82,92,82,86,66,82,44,64,66,88,96,80,24,26,14,0,0,26,8,6,6,24,52,66,36,6,10,14,30&height=20&limits=0,100&min-m=false&max-m=false&last-m=false&min-color=red&max-color=blue&last-color=green&step=2
Then you don't have to hassle installing PYTHON on your local Apache. A detailed description of the parameters can be found of the web-page.
Patrick
Check out my APEX-blog: http://inside-apex.blogspot.com
Check out the ApexLib Framework: http://apexlib.sourceforge.net -
Python Script to Generate MySQL Stored Routines
Here is a quick Python script that reads a MySQL scheme (database) and for each table, it generates Insert, Update, Get and Delete stored routines. The script is just a "quick-n-dirty" script, but it does take into account that the Update, Get and Delete routines need to key off the primary key (and if there's not one, there could be trouble!). Each stored routine is output into a separate file.
I'm attaching the script so you professional Python people can tell me where I could improve the script with respect to simplicity, readability, cleanliness, etc.
I have NOT yet got the command line parameters added to this script, but plan to soon.
#!/usr/bin/env python
# spgen.py
# Copyright 2008 Matt Runion <[email protected]>
import sys
import MySQLdb
# The INSERT template
insertTemplate = """
DELIMITER $$
DROP PROCEDURE IF EXISTS `%s`$$
CREATE PROCEDURE `%s` (%s)
BEGIN
INSERT INTO %s (
%s
) VALUES (
%s
END$$
DELIMITER ;
# The UPDATE template
updateTemplate = """
DELIMITER $$
DROP PROCEDURE IF EXISTS `%s`$$
CREATE PROCEDURE `%s` (%s)
BEGIN
UPDATE %s SET
%s
WHERE
%s;
END$$
DELIMITER ;
# The GET template
getTemplate = """
DELIMITER $$
DROP PROCEDURE IF EXISTS `%s`$$
CREATE PROCEDURE `%s` (%s)
BEGIN
SELECT
%s
FROM %s
WHERE
%s;
END$$
DELIMITER ;
# The DELETE template
deleteTemplate = """
DELIMITER $$
DROP PROCEDURE IF EXISTS `%s`$$
CREATE PROCEDURE `%s` (%s)
BEGIN
DELETE FROM %s
WHERE
%s;
END$$
DELIMITER ;
def generateSPs(dbhost, dbname, dbuser, dbpasswd):
This method reads all the tables from the database and for each of them
generates the following stored routines:
<TableName>_Insert
<TableName>_Update
<TableName>_Get
<TableName>_Delete
# Open the database connection
print 'Connecting to database [%s] on host [%s]' % (dbname, dbhost)
dbConn = MySQLdb.connect(host=dbhost, user=dbuser, passwd=dbpasswd, db=dbname)
cur = dbConn.cursor()
# Get a list of all tables in the database
print 'Reading tables...'
cur.execute("SHOW TABLES FROM %s" % dbname)
tables = cur.fetchall()
for table in tables:
print 'Generating stored procs for table [%s]...' % table[0]
# Get a list of a columns in the current table
cur.execute("SHOW COLUMNS FROM %s" % table[0])
columns = cur.fetchall()
insertUpdateParms = ''
getDeleteParms = ''
whereClause = ''
insertList = ''
valuesList = ''
updateList = ''
for column in columns:
# Reset some variables
print ' %s -- %s [%s, %s, %s]' % (column[0], column[1], column[2], column[3], column[4])
# Append the columns to the input parms
if (len(insertUpdateParms) > 0):
insertUpdateParms += ',\n'
insertList += ',\n'
valuesList += ',\n'
if (len(updateList) > 0):
updateList += ',\n'
insertUpdateParms += '%sIN ' % column[0]
if ((column[1][0:3].lower() == 'var') or (column[1][0:3].lower() == 'cha')):
insertUpdateParms += '%s' % column[1]
elif (column[1][0:3].lower() == 'enu'):
insertUpdateParms += 'varchar(50)'
else:
insertUpdateParms += (column[1].split('('))[0]
insertList += column[0]
valuesList += '%sIN' % column[0]
# Generate the key parms that are used for the Get and Delete
# stored procs, and generate the values for the WHERE clause
# for the Update, Get and Delete stored procs
if (column[3].lower() == 'pri'):
if (len(getDeleteParms) > 0):
getDeleteParms += ',\n'
getDeleteParms += '%sIN ' % column[0]
if (column[1][0:3].lower() == 'var'):
getDeleteParms += '%s' % column[1]
else:
getDeleteParms += (column[1].split('('))[0]
if (len(whereClause) > 0):
whereClause += ' AND \n'
whereClause += '%s = %sIN' % (column[0], column[0])
else:
updateList += '%s = %sIN' % (column[0], column[0])
#print '---'
#print insertUpdateParms
#print '---'
#print getDeleteParms
#print '---'
#print whereClause
#print 'INSERT:'
#print insertTemplate % (table[0] + '_Insert', table[0] + '_Insert', insertUpdateParms, table[0], insertList, valuesList)
#print 'UPDATE:'
#print updateTemplate % (table[0] + '_Update', table[0] + '_Update', insertUpdateParms, table[0], updateList, whereClause)
#print 'GET:'
#print getTemplate % (table[0] + '_Get', table[0] + '_Get', getDeleteParms, insertList, table[0], whereClause)
#print 'DELETE:'
#print deleteTemplate % (table[0] + '_Delete', table[0] + '_Delete', getDeleteParms, table[0], whereClause)
# Write out the INSERT stored proc
file = open('./test/' + table[0] + '_Insert', 'w')
file.write(insertTemplate % (table[0] + '_Insert', table[0] + '_Insert', insertUpdateParms, table[0], insertList, valuesList))
file.close()
# Write out the UPDATE stored proc
file = open('./test/' + table[0] + '_Update', 'w')
file.write(updateTemplate % (table[0] + '_Update', table[0] + '_Update', insertUpdateParms, table[0], updateList, whereClause))
file.close()
# Write out the GET stored proc
file = open('./test/' + table[0] + '_Get', 'w')
file.write(getTemplate % (table[0] + '_Get', table[0] + '_Get', getDeleteParms, insertList, table[0], whereClause))
file.close()
# Write out the DELETE stored proc
file = open('./test/' + table[0] + '_Delete', 'w')
file.write(deleteTemplate % (table[0] + '_Delete', table[0] + '_Delete', getDeleteParms, table[0], whereClause))
file.close()
return 0
if __name__ == '__main__':
generateSPs('<SERVER>', '<DATABASE>', '<USER>', '<PASSWD>')I found and fixed a bug with some misplaced parenthesis that forced the path to be made all lower-case. This was a bad thing if the path had some upper case letters in it!
#!/usr/bin/env python
# spgen.py
# Copyright 2008 Matt Runion <[email protected]>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
import sys
import getopt
import os
import MySQLdb
# The INSERT template
insertTemplate = """
DELIMITER $$
DROP PROCEDURE IF EXISTS `%s`$$
CREATE PROCEDURE `%s` (%s)
BEGIN
INSERT INTO %s (
%s
) VALUES (
%s
END$$
DELIMITER ;
# The UPDATE template
updateTemplate = """
DELIMITER $$
DROP PROCEDURE IF EXISTS `%s`$$
CREATE PROCEDURE `%s` (%s)
BEGIN
UPDATE %s SET
%s
WHERE
%s;
END$$
DELIMITER ;
# The GET template
getTemplate = """
DELIMITER $$
DROP PROCEDURE IF EXISTS `%s`$$
CREATE PROCEDURE `%s` (%s)
BEGIN
SELECT
%s
FROM %s
WHERE
%s;
END$$
DELIMITER ;
# The DELETE template
deleteTemplate = """
DELIMITER $$
DROP PROCEDURE IF EXISTS `%s`$$
CREATE PROCEDURE `%s` (%s)
BEGIN
DELETE FROM %s
WHERE
%s;
END$$
DELIMITER ;
def generateSPs(dbhost, dbname, dbuser, dbpasswd, outPath):
This method reads all the tables from the database and for each of them
generates the following stored routines:
<TableName>_Insert
<TableName>_Update
<TableName>_Get
<TableName>_Delete
# Open the database connection
print 'Connecting to database [%s] on host [%s]' % (dbname, dbhost)
dbConn = MySQLdb.connect(host=dbhost, user=dbuser, passwd=dbpasswd, db=dbname)
cur = dbConn.cursor()
# Get a list of all tables in the database
print 'Reading tables...'
cur.execute("SHOW TABLES FROM %s" % dbname)
tables = cur.fetchall()
for table in tables:
print 'Generating stored procs for table [%s]...' % table[0]
# Get a list of a columns in the current table
cur.execute("SHOW COLUMNS FROM %s" % table[0])
columns = cur.fetchall()
insertUpdateParms = ''
getDeleteParms = ''
whereClause = ''
insertList = ''
valuesList = ''
updateList = ''
for column in columns:
# Reset some variables
print ' %s -- %s [%s, %s, %s]' % (column[0], column[1], column[2], column[3], column[4])
# Append the columns to the input parms
if (len(insertUpdateParms) > 0):
insertUpdateParms += ',\n'
insertList += ',\n'
valuesList += ',\n'
if (len(updateList) > 0):
updateList += ',\n'
insertUpdateParms += '%sIN ' % column[0]
if ((column[1][0:3].lower() == 'var') or (column[1][0:3].lower() == 'cha')):
insertUpdateParms += '%s' % column[1]
elif (column[1][0:3].lower() == 'enu'):
insertUpdateParms += 'varchar(50)'
else:
insertUpdateParms += (column[1].split('('))[0]
insertList += column[0]
valuesList += '%sIN' % column[0]
# Generate the key parms that are used for the Get and Delete
# stored procs, and generate the values for the WHERE clause
# for the Update, Get and Delete stored procs
if (column[3].lower() == 'pri'):
if (len(getDeleteParms) > 0):
getDeleteParms += ',\n'
getDeleteParms += '%sIN ' % column[0]
if (column[1][0:3].lower() == 'var'):
getDeleteParms += '%s' % column[1]
else:
getDeleteParms += (column[1].split('('))[0]
if (len(whereClause) > 0):
whereClause += ' AND \n'
whereClause += '%s = %sIN' % (column[0], column[0])
else:
updateList += '%s = %sIN' % (column[0], column[0])
# Write out the INSERT stored proc
file = open(os.path.join(outPath,(table[0] + '_Insert.sql').lower()), 'w')
file.write(insertTemplate % (table[0] + '_Insert', table[0] + '_Insert', insertUpdateParms, table[0], insertList, valuesList))
file.close()
# Write out the UPDATE stored proc
file = open(os.path.join(outPath,(table[0] + '_Update.sql').lower()), 'w')
file.write(updateTemplate % (table[0] + '_Update', table[0] + '_Update', insertUpdateParms, table[0], updateList, whereClause))
file.close()
# Write out the GET stored proc
file = open(os.path.join(outPath,(table[0] + '_Get.sql').lower()), 'w')
file.write(getTemplate % (table[0] + '_Get', table[0] + '_Get', getDeleteParms, insertList, table[0], whereClause))
file.close()
# Write out the DELETE stored proc
file = open(os.path.join(outPath,(table[0] + '_Delete.sql').lower()), 'w')
file.write(deleteTemplate % (table[0] + '_Delete', table[0] + '_Delete', getDeleteParms, table[0], whereClause))
file.close()
return 0
def main(argv):
SPGen reads all the tables from the given database and for each of
those tables generates the following stored routines:
<TableName>_Insert
<TableName>_Update
<TableName>_Get
<TableName>_Delete
Command line arguments are:
-?, --help: Help
-o, --outputpath: File output path
-h, --host: Database host/server
-d, --database: Database name
-u, --user: Database user
-p, --password Database password
# Set defaults...
outputPath = os.getcwd()
host = 'localhost'
database = ''
user = ''
password = ''
# See what command line options we have
try:
opts, args = getopt.getopt(argv[1:], '?o:h:d:u:p:', ['help', 'outputpath=', 'host=', 'database=', 'user=', 'password='])
except getopt.GetoptError:
print main.__doc__
sys.exit(2)
for opt, arg in opts:
if opt in ['-?', '--help']:
print main.__doc__
sys.exit()
elif opt in ['-o', '--outputpath']:
outputPath = arg
elif opt in ['-h', '--host']:
host = arg
elif opt in ['-d', '--database']:
database = arg
elif opt in ['-u', '--user']:
user = arg
elif opt in ['-p', '--password']:
password = arg
generateSPs(dbhost=host, dbname=database, dbuser=user, dbpasswd=password, outPath=outputPath)
if __name__ == '__main__':
main(sys.argv)
Last edited by mrunion (2008-11-20 19:33:37) -
Assertion failure from ccfe in Solaris Studio 12.4 beta July refresh
I have found a way to get an assertion failure from the ccfe program that comes with the Solaris Studio 12.4 beta July refresh. The error that gets printed is:
>> Assertion: (../lnk/funcsym.cc, line 1679)
while processing text_woarchive.pre.cpp at line 0.
The problem occurs whilst compiling Boost 1.54. The original file in the distribution that causes it is libs/serialization/src/text_woarchive.cpp.
This problem can be reproduced by getting the pre-processed code I've put on http://pastebin.com/E9vxi2z7 and pasting it into a file called text_woarchive.pre.cpp. Then run:
CC -std=c++11 -mt -m64 -c -o text_woarchive.o text_woarchive.pre.cpp
and you get the assertion failure.
Running:
CC '-#' -std=c++11 -mt -m64 -c -o text_woarchive.o text_woarchive.pre.cpp
shows that the assertion is coming from ccfe.
In case you go back to the original Boost source code I should tell you that prior to generating the pre-processed source I changed:
#ifdef __SUNPRO_CC
to:
#if 0
in boost/archive/detail/register_archive.hpp. I did this because there was an error in the __SUNPRO_CC section and I wondered if that workaround code was no longer required with the more modern C++ compiler. Therefore, I cannot guarantee that the pre-processed source is 100% valid C++ code. However, even if it's not it would be nice to get a clear error message out of ccfe rather than an assertion failure.
In case it's relevant, I'm working on Oracle Solaris 10 1/13 s10x_u11wos_24a X86.You mentioned in the other answer that you are testing with Boost 1.55. Are you testing this in C++11 mode?
Today I downloaded Boost 1.55 and did the following:
In both tools/build/v2/engine/build.sh and tools/build/v2/tools/sun.jam globally replace SUNWspro with SolarisStudio12.4-beta_jul14-solaris-x86
In tools/build/v2/tools/sun.jam replace:
feature.extend stdlib : sun-stlport ;
feature.compose <stdlib>sun-stlport
: <cxxflags>-library=stlport4 <linkflags>-library=stlport4
with:
feature.extend stdlib : sun-stlport ;
feature.compose <stdlib>sun-stlport
: <cxxflags>-std=c++11 <linkflags>-std=c++11
Note: This is just the quick way I found to con the Boost build system into using C++11 instead of STLport. The feature in the jam file still has stlport in its name, but that's only a name and the code is being built in C++11 mode.
In boost/math/special_functions/detail/lanczos_sse2.hpp change line 15 from:
#if defined(__GNUC__) || defined(__PGI)
to:
#if defined(__GNUC__) || defined(__PGI) || defined(__SUNPRO_CC)
Run:
./bootstrap.sh --without-libraries=context --without-libraries=coroutine --without-libraries=graph_parallel --without-libraries=log --without-libraries=mpi --without-libraries=python --without-libraries=test --without-icu
Run:
./b2 -j4 --layout=versioned --disable-icu address-model=64 threading=multi optimization=speed inlining=full
At this point the vast majority of the code builds, but does not link.
There are 3 problems:
The compilation problem with tuple that you've already fixed
A linker problem with finding std::string related symbols - maybe also related to the gcc header upgrade and now fixed?
Numerous compilation problems caused by boost/archive/detail/register_archive.hpp
For this last one the code in the #ifdef __SUNPRO_CC section of boost/archive/detail/register_archive.hpp does appear to be invalid, and leads to the errors:
"./boost/archive/detail/register_archive.hpp", line 45: Error: The function "adjust_counter" must have a prototype.
"./boost/archive/detail/register_archive.hpp", line 46: Error: Expression must have a constant value.
"./boost/archive/detail/register_archive.hpp", line 47: Error: Expression must have a constant value.
"./boost/archive/detail/register_archive.hpp", line 48: Error: An integer constant expression is required within the array subscript operator.
Even with Boost 1.55, attempts to fix this lead to the same ccfe assertion. Trying to use the #else part of the code as I described in the original post does, as does moving the line:
char adjust_counter(counter<0>);
so that it comes before the place where adjust_counter is used also then leads to the same assertion:
>> Assertion: (../lnk/funcsym.cc, line 1679)
It's as though any change to boost/archive/detail/register_archive.hpp that fixes the basic code ordering issue lets ccfe get far enough to cause the assertion.
If there is somebody in your team looking at whether Boost 1.55 compiles with Solaris Studio 12.4 in C++11 mode then hopefully they can relate to what I'm seeing here. One key point is that they'll have had to edit the jam files to use C++11 mode.
The other thing is that any insights the person who has been trying to build Boost 1.55 has would be very useful. I know you don't want to get into officially supporting it, but maybe a blog post with any unofficial hints and tips on getting Boost to build in C++11 mode could be a way to share knowledge.
Maybe you are looking for
-
IPod no longer works with Older iMac (works with new iMac)
Hi all: First off sorry about the cross post but I got no response to this question in the other forum. Hoping for help from this group. Thanks!!!! I have an iMac Duo (20" 2.0Ghz) running 10.4.8 and iTunes 7.0.1 which recognizes my 5g (and my wife's
-
Cisco 877 router - Cisco IP phone won't register with SIP provider
Hi all, I'm having a problem with a Cisco SPA504G phone not registering with the SIP carrier over the Internet. We've recently rolled out a Cisco 877 router onto a new NBN business connection and can't get the pre-configured IP phone to register. Whe
-
Retained Earnings- Translation
Hi guys, I'm not quite sure how to solve this, so maybe you can help me. For Retained Earnings, there's a rule in the HFM app to calculate it. The problem is that when I tried to translate RE to the Historical Rate, it gets overrided by the Calculati
-
Could you please let me know how to use READ_TEXT func module for material text . We have long text in Material Basic data section , i want to read this text . I am not abaper ...could you please let me know which parameter should be passed at the ti
-
Modify JDBC task in integration template OWB
I'm trying to modify the flag_useless_lines task and create a different condition for one single column in my table based on the column name (the column is called TS). Something like (<?if (T.[COL_NAME]=T.TS) I'm not sure this line is good. Can you s