Author Archives: admin

CTW on Oracle Linux

mv expdat.expdp.BRV11T2.sonder.N4TOST2.B3.0_C1.13 /home/oracle/app/oracle/admin/satu/dpdump/expdat.dmp
impdp

Zegt zelf wel waar hij problemen mee heeft. Mekkert over users, table spaces en niet genoeg ruimte in de table space.

sqlplus /nolog

connect / as SYSDBA

create user N4TOST2 identified by S3marang;

create tablespace N4TOST2 DATAFILE '/home/oracle/app/oracle/oradata/satu/n4tost2.dbf' size 1G extent management local autoallocate;

alter database datafile '/home/oracle/app/oracle/oradata/satu/n4tost2.dbf' resize 10G;

select dbms_metadata.get_ddl('TABLESPACE','N4TOST2' ) from dual;

=== TNSNAMES ===
[oracle@burung ~]$ tnsping satu

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 24-JUL-2013 14:53:14

Copyright (c) 1997, 2009, Oracle. All rights reserved.

Used parameter files:

TNS-03505: Failed to resolve name

[oracle@burung ~]$ vi ./app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora

[oracle@burung ~]$ tnsping satu

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 24-JUL-2013 15:05:32

Copyright (c) 1997, 2009, Oracle. All rights reserved.

Used parameter files:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = burung.mcint.local) (PORT=1521))) (CONNECT_DATA = (SERVICE_NAME = satu)))
OK (20 msec)

perl DBD::mysql Mac OS X 10.8.5

At the moment of this writing there is no MySQL for Mac OS X 10.8, instead use the MySql for 10.7.

When trying to open a connection via Perl the system complains about dylib not being installed in the right place.

su root
find / -name "libmysqlclient.18.dylib" -print 
cp /usr/local/mysql-5.6.14-osx10.7-x86_64/lib/libmysqlclient.18.dylib /usr/lib

N4 build

Check out N4 branch from repository

http://svn.navis.com/N4SPARCS/branches/BRANCHES/n4-app

Edit $\n4-app\apex\build.properties

# uncomment the database type you want to use
#target.db=mysql
target.db=oracle
#target.db=oracle_rac
#target.db=sqlserver-jtds

Edit $\n4-app\apex\database\oracle.properties


database.driver=oracle.jdbc.OracleDriver
database.url=jdbc:oracle:thin:@DATABASE_HOST:1521:SID
database.userid=USERID
database.password=PASSWORD
database.minLimit=6
database.initialLimit=6
database.maxLimit=50
database.inactivityTimeout=1800
database.waitTimout=120
database.maxStatementsLimit=50

database.schema=apex
database.catalog=
database.source=jdbc/apexDS
database.mapping=Oracle9
database.name=oracle
database.hib-dialect=org.hibernatespatial.oracle.OracleSpatial10gDialect
requires.munge-oracle=true

database.systemsource=jdbc/apexSystemDS
database.systemuserid=SYSTEMUSERID
database.systempassword=PASSWORD 

Add $\n4-app\tools\bin\ to the PATH environment variable

Obtain ulc license

check-ulc-key:
[echo] You don’t have a properly installed ULC developer license key file.
[echo] ULC expects your license key file at ‘/Users/pdeneef/.ulc-7.0/DEVELOPER-0700.lic’


edit $/common/etc/ant-stubs/cache_address.properties
# for non-developers to use on vmware images (reserved 1500-1599)
extneefpa=1506 

Build


cd $\apex\
ant superclean all
or
ant all

Run with Tomcat


cd $\tools\tomcat-6.0\bin
dev-tomcat
javaws.exe http://localhost:8280/apex/apex.jnlp

(Point browser to http://localhost:8280/apex/apex.jnlp)

Run local ulc
ant ulc

 

MAC OS X

install JDK 1.7

build svnant.jar and put in tools/ant/lib

 

gen-code-xpscache:
[echo] Generating classes for xpscache module.
[xmlvalidate] 74 file(s) have been successfully validated.

 

 

 
TOMCAT

vi ~/.bash_profile

export CATALINA_HOME=/Library/Tomcat
export JAVA_HOME=`/usr/libexec/java_home -V 1.7`

Installatie in:
/usr/local/bin/apache-tomcat-v###

Symbolic link
ln -s /usr/local/bin/apache-tomcat-v### /Library/Tomcat

Edit
tomcat-users.xml

Startup
$CATALINA_HOME/bin/startup.sh

Apache MySQL PHP Mac OS X

Edit httpd.conf to include php module

find / -name "httpd.conf" -print
/private/etc/apache2/httpd.conf

vi /private/etc/apache2/httpd.conf

LoadModule perl_module libexec/apache2/mod_perl.so
LoadModule php5_module libexec/apache2/libphp5.so

Find MySQl socket

find / -name "mysql.sock" -print

Prepare php.ini

cp /etc/php.ini.default /etc/php.ini

Edit /etc/php.ini


vi /etc/php.ini
; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
; http://php.net/pdo_mysql.default-socket
pdo_mysql.default_socket=/private/tmp/mysql.sock

; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
; http://php.net/mysql.default-socket
mysql.default_socket = /private/tmp/mysql.sock

Restart Apache

apachectl restart

Start MySQL deamon

Try /usr/local/mysql/bin/mysqld_safe

Example:

sudo /usr/local/mysql/bin/mysqld_safe
(Enter your password, if necessary)
(Press Control-Z)
shell> bg
(Press Control-D or enter "exit" to exit the shell)

You can also add these to your bash startup scripts:

export MYSQL_HOME=/usr/local/mysql
alias start_mysql='sudo $MYSQL_HOME/bin/mysqld_safe &'
alias stop_mysql='sudo $MYSQL_HOME/bin/mysqladmin shutdown'

Springsource STS

Linux installation as root

Download STS

spring.io/tools/sts/all

Unpack springsource.tar.gz

gunzip spring-tool-suite-3.4.0.RELEASE-e4.3.1-linux-gtk-x86_64.tar.gz
tar xvf spring-tool-suite-3.4.0.RELEASE-e4.3.1-linux-gtk-x86_64.tar
mv springsource /opt

Subversion connectors

Launch STS

/STS

Go to Help -> Eclipse Market Place
Find Subversive and Install

Download the SVN connectors from polarion: http://community.polarion.com/projects/subversive/download/eclipse/3.0/builds/. Install the svnkit, javahl and connector in the plugins directory.


wget http://community.polarion.com/projects/subversive/download/eclipse/3.0/builds/Subversive-connectors-allplatforms-3.0.3.I20130920-1700.zip
unzip http://community.polarion.com/projects/subversive/download/eclipse/3.0/builds/
#cp plugins/*.jar /plugins/
cd plugins
cp org.polarion.eclipse.team.svn.connector.svnkit17_3.0.2.I20130808-1700.jar \
org.polarion.eclipse.team.svn.connector.javahl17_3.0.2.I20130808-1700.jar \
org.polarion.eclipse.team.svn.connector_3.0.2.I20130808-1700.jar \

/plugins/

EPIC Perl

EPIC is an open source Perl IDE (including editor and debugger) based on the Eclipse platform, compatible with Windows, Linux and Mac OS X.

Rinzo XML Editor

 

Eclipse PHP PDT

http://www.eclipse.org/pdt/downloads/

DPWA database import

Create BIG table space

sqlplus / as sysdba


sql> CREATE BIGFILE TABLESPACE "DPW04N4_DATA" DATAFILE '/home/beagw/dpwa/sparcsn4.dbf' SIZE 120G AUTOEXTEND ON NEXT 4G MAXSIZE UNLIMITED LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO

Set up users, roles etc

sqlplus / as sysdba

create profile DPWORLD_NOEXPIRE limit password_life_time UNLIMITED;
create role webfocus;
create role report_prod;
create user billsys identified by Humvee;
create user sparcsn4 identified by Humvee;
alter user sparcsn4 profile DPWORLD_NOEXPIRE;
alter user sparcsn4 default tablespace DPW04N4_DATA;

Create impdp parameter file to exclude some huge files

# vi n4-imp.par

exclude=TABLE:"IN ('EDI_TRANSACTION','ROAD_DOCUMENTS','FRM_JOB_LOG','EDI_TRANSACTION_KEYWORD','EDI_BATCH_PROCESS','EDI_INTERCHANGE','EDI_EVENT','EDI_SEGMENT','EDI_BATCH','EDI_ERROR')"

Import database

# impdp dumpfile=sparcsn4_30042013.dmp parfile=n4-imp.par

[oracle@marauder ~]$ impdp system/Humvee dumpfile=sparcsn4_30042013.dmp parfile=n4-imp.par

Import: Release 11.2.0.1.0 - Production on Tue Oct 8 12:40:44 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/******** dumpfile=sparcsn4_30042013.dmp parfile=n4-imp.par 
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:"SPARCSN4" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "SPARCSN4"."SRV_EVENT"                      11.21 GB 102943957 rows
. . imported "SPARCSN4"."ARGO_CHARGEABLE_UNIT_EVENTS"    6.960 GB 13282798 rows
. . imported "SPARCSN4"."SRV_EVENT_FIELD_CHANGES"        4.835 GB 123798109 rows
. . imported "SPARCSN4"."ARGO_PROPERTY_SOURCE"           3.030 GB 52470519 rows
..
..
. . imported "SPARCSN4"."CRG_PRODUCT_TYPE"                   0 KB       0 rows
. . imported "SPARCSN4"."XPS_WHEELEDMT_FILT_WEIGHTS"         0 KB       0 rows
. . imported "SPARCSN4"."XPS_WHERENETALARM"                  0 KB       0 rows
Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
ORA-39083: Object type REF_CONSTRAINT failed to create with error:
ORA-00942: table or view does not exist
Failing sql is:
ALTER TABLE "SPARCSN4"."ROAD_DOCUMENT_MESSAGES" ADD CONSTRAINT "FKE1FA50918010750D" FOREIGN KEY ("DOC_GKEY") REFERENCES "SPARCSN4"."ROAD_DOCUMENTS" ("GKEY") ENABLE
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
ORA-39083: Object type TABLE_STATISTICS failed to create with error:
ORA-06550: line 1, column 3747:
PLS-00103: Encountered the symbol "~" when expecting one of the following:
..
..
ORA-39083: Object type TABLE_STATISTICS failed to create with error:

Ignore the table statistics creation errors.

Create new database to contain the complete schema.

De tabellen die niet zijn geimporteerd in de eerste database kunnen in iedfer geval via de SQl create scripts vanuit deze tweede database worden gecreeerd.
Maak de tabelspace kleiner want er komt geen data in deze database terecht.



$ dbca 

$ export ORACLE_SID=dpwaschema

$ sqlplus / as sysdba

CREATE BIGFILE TABLESPACE "DPW04N4_DATA" DATAFILE '/home/beagw/dpwaschema/sparcsn4.dbf' SIZE 4G AUTOEXTEND ON NEXT 1G MAXSIZE UNLIMITED LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO
create profile DPWORLD_NOEXPIRE limit password_life_time UNLIMITED;
create user sparcsn4 identified by Nephew default tablespace DPW04N4_DATA profile DPWORLD_NOEXPIRE;
create role webfocus;
create role report_prod;
create user billsys identified by Humvee;


$ find . -name "sparcsn4_30042013.dmp" -print
./app/oracle/admin/dpwa/dpdump/sparcsn4_30042013.dmp
[oracle@marauder ~]$ mv ./app/oracle/admin/dpwa/dpdump/sparcsn4_30042013.dmp ./app/oracle/admin/dpwaschema/dpdump/sparcsn4_30042013.dmp

$ impdp dumpfile=sparcsn4_30042013.dmp CONTENT=METADATA_ONLY

Create missing tables
Maak de gemiste tabellen aan in de eerste database.

EDI_INTERCHANGE
EDI_BATCH
EDI_BATCH_PROCESS
EDI_INTERCHANGE
EDI_TRANSACTION
EDI_TRANSACTION_KEYWORD
EDI_ERROR
EDI_EVENT
EDI_SEGMENT

FRM_JOB_LOG

ROAD_DOCUMENTS


sql> truncate table sparcsn4.road_document_messages;

sql> ALTER TABLE "SPARCSN4"."ROAD_DOCUMENT_MESSAGES" ADD CONSTRAINT "FKE1FA50918010750D" FOREIGN KEY ("DOC_GKEY") REFERENCES "SPARCSN4"."ROAD_DOCUMENTS" ("GKEY") ENABLE

Install Oracle Enterprise Linux van USB

Op Windows maak een bootable USB stick
* 8gb USB drive
* Download OEL distributie .iso van Oracle
* Download bootable USB: http://unetbootin.sourceforge.net/
* Format usb drive, label met USB
* Open Unetbootin.exe,
* kies .iso, kies USB, start creatie
* Wacht totdat unetbootin klaar is,
* open usb drive, kopieer .iso naar usb
* Installeer USB is nu klaar.

OEL desktop installatie

* stop Usb in computer, start computer
* kies HDD, /dev/sdb, directory containg .iso : /

ISSUE op MAC OS X

Er is een Guide op ORN die zegt dat je een bootable disk vanuit een OEL machine moet maken. Als je deze volgt in een VMware Fusion OEL op Mac OS X dan werkt de bootable disk niet. De procedure met unetbootin op een Mac OS X werkt ook niet. In het eerste geval blijft zegt de PC dat de USB disk niet bootable is. In het tweede geval start de PC helemaal niet vanaf USB.

How to Install Perl Modules on Mac OS X in 4 Easy Steps

http://triopter.com/archive/how-to-install-perl-modules-on-mac-os-x-in-4-easy-steps/

You see, for the past couple of years, I’ve been a bit frustrated because OS X does not come with a whole lot of Perl modules pre-installed, and for all I googled, I couldn’t find an “idiot’s” guide for moderately-savvy-but-not-expert users like myself to install modules and dependencies on demand.

The only instructions I could find point to Fink, which basically installs modules in a path that isn’t included in the Perl @INC variable, meaning you have to manually specify the full path to the modules in every script — which is not a lot of fun if you’re developing on OS X and deploying on Red Hat, for instance.

Moreover, Fink doesn’t seem to make every module available, and it’s not very easy to determine which Fink package you need to install if you need a particular module.

So, with a script that called on several apparently unavailable modules, and a deadline looming, I finally decided to suck it up and figure out how to use CPAN to install them:
1) Make sure you have the Apple Developer Tools (XCode) installed.

These are on one of your install discs, or available as a huge but free download from the Apple Developer Connection [free registration required] or the Mac App Store. I thought I had them, but apparently when we upgraded that computer to Tiger, they went missing.

If you don’t have this stuff installed, your installation will fail with errors about unavailable commands.
1.5) Install Command Line Tools (Recent XCode versions only)

(Thank you to Tom Marchioro for informing me about this step.)

Older versions of XCode installed the command line tools (which are required to properly install CPAN modules) by default, but apparently newer ones do not. To check whether you have the command line tools already installed, run the following from the Terminal:

$ which make

This command checks the system for the “make” tool. If it spits out something like /usr/bin/make you’re golden and can skip ahead to Step 2. If you just get a new prompt and no output, you’ll need to install the tools:

Launch XCode and bring up the Preferences panel.
Click on the Downloads tab
Click to install the Command Line Tools

If you like, you can run which make again to confirm that everything’s installed correctly.
2) Configure CPAN.

$ sudo perl -MCPAN -e shell

perl> o conf init

This will prompt you for some settings. You can accept the defaults for almost everything (just hit “return”). The two things you must fill in are the path to make (which should be /usr/bin/make or the value returned when you run which make from the command line) and your choice of CPAN mirrors (which you actually choose don’t really matter, but it won’t let you finish until you select at least one). If you use a proxy or a very restrictive firewall, you may have to configure those settings as well.

If you skip Step 2, you may get errors about make being unavailable.
3) Upgrade CPAN

$ sudo perl -MCPAN -e ‘install Bundle::CPAN’

Don’t forget the sudo, or it’ll fail with permissions errors, probably when doing something relatively unimportant like installing man files.

This will spend a long time downloading, testing, and compiling various files and dependencies. Bear with it. It will prompt you a few times about dependencies. You probably want to enter “yes”. I agreed to everything it asked me, and everything turned out fine. YMMV of course. If everything installs properly, it’ll give you an “OK” at the end.
4) Install your modules. For each module….

$ sudo perl -MCPAN -e ‘install Bundle::Name’

or

$ sudo perl -MCPAN -e ‘install Module::Name’

This will install the module and its dependencies. Nice, eh? Again, don’t forget the sudo.

The first time you run this after upgrading CPAN, it may prompt you to configure again (see Step 2). If you accept its offer to try to configure itself automatically, it may just run through everything without a problem.

There are a couple of potential pitfalls with specific modules (such as the LWP::UserAgent / HEAD issue), but most have workarounds, and I haven’t run into anything that wasn’t easily recoverable.

And that’s it!

Did you find this useful? Is there anything I missed?