JoomlaWatch Stats 1.2.9 by Matej Koval

Popular

Latest

Story about Timbuktu, Tombouctou, Mali

AddThis Social Bookmark Button

A story I really like;
Story about Timbuktu (Tombouctou, Mali)

There were an Australian and a priest competing against each other.
Their scores were equal, so they had to create a verse about "Timbuktu".

The priest began:

I was a father, all my life,
had no children, had no wife.
I read the Bible, through and through.
On my way to Timbuktu.


Then the Australian told his version:

When Tim and I to Brisbane went,
we met three ladies cheap to rent.
They were three and we were two,
so I booked one and Tim booked two!


  • Here's is the URL of Timbuktu, (Tombouctou, Mali)

Cheers!!
Add a comment
 

Creating an online Phone Book with Oracle Database and SQLDeveloper

AddThis Social Bookmark Button

This tutorial shows how to create an Online Phone Book with search feature using
Oracle Database and SQLDeveloper.


What’s needed?
  1. Oracle Database
  2. Oracle SQLDeveloper
  3. A data set – names and phone numbers.
Let’s roll...

1.    First let’s prepare our data set in excel sheet.
  • Create a dump of your phone book into an excel sheet; something like this:

(click to enlarge)
  • The following formula will create a set of SQL inserts that we can use to load data into a database table:
= "INSERT INTO MYPHONEBOOK (FIRST_NAME, LAST_NAME, PHONE_NUMBER) VALUES ( '"&A2&"', '"&B2&"', '"&C2&"');"
  • Apply above formula to all rows in excel sheet:

2.    Next, let’s create a table "MYPHONEBOOK" in a database:

The following SQL DDL does the job (a table with three columns):

CREATE TABLE MYPHONEBOOK
(
"FIRST_NAME" VARCHAR2(20 CHAR),
"LAST_NAME" VARCHAR2(20 CHAR),
"PHONE_NUMBER" VARCHAR2(20 CHAR)
)
;

3.    Our Table is ready for data load; copy and paste all insert statements into SQLDeveloper's worksheet and run it;

INSERT INTO MYPHONEBOOK (FIRST_NAME, LAST_NAME, PHONE_NUMBER) VALUES ( 'Donald', 'OConnell', '650.507.9833');
INSERT INTO MYPHONEBOOK (FIRST_NAME, LAST_NAME, PHONE_NUMBER) VALUES ( 'Douglas', 'Grant', '650.507.9844');
INSERT INTO MYPHONEBOOK (FIRST_NAME, LAST_NAME, PHONE_NUMBER) VALUES ( 'Jennifer', 'Whalen', '515.123.4444');
...
...
...

4.    Now let’s create an Online Phone Book using SQLDeveloper's export feature:
  • Open MYPHONEBOOK’s table “Data” tab > and right click > Export Data > html...

  • Save exported data as MYPHONEBOOK.htm file:


5.    We are done! Now embed htm file at any webhosting plan, web server or use it locally. Enjoy your online phone book with search feature ?

Click here to see a working example of the Online Phone Book.

Cheers!! Add a comment
 

GRUB 2 Restore after Windows installation

AddThis Social Bookmark Button

GRUB 2 Restore after Windows (re)installation – fast and simple solution

Scenario: Multiple OS in one machine - Linux Grub2 Boot Loader doesn't start after Windows (re) installation. A selfish Windows OS starts automatically by default. It happens when installing Linux and Windows. This can be easily avoided by installing multiple operating systems in the following order; first Windows then Linux.

Example of existing disk partitions:

/sda1 ntfs  Windows 7 (here, Windows installer set up the Boot flag to active)
/sda2 ext3 Ubuntu ( bootloader’s home partition and the Boot flag has been unset)
/sda3 ext3 home
/sda4 ext3 ....
/sda5 ntfs data/whatever

Requirements:
-    A patient – Computer with multiple OS's and the bootloader broken by the Windows installer.
-    Ubuntu LiveCD (installation CD) or
-    A light GParted Live CD/USB/HD/PXE - gparted-live-xxx.iso ~121.4 MB (recommended)

Solution: GRUB-2 Boot Loader has been restored by applying the following remedy:

  1. Boot the machine using GParted LiveCD – it allows users to start partitioning tool - Gparted.. It 's also possible to run Ubuntu Live CD, if this one has been used for Linux Installation since it does have Partitioning tool included - Gnome Partition Editor (see picture below).
  2. Find out Linux boot partition - In this example: sda2
  3. Set up BOOT flag on sda2 partition as it was before and save changes
  4. Restart computer, GRUB menu should be active and will start instead of Win
  5. Start Linux OS, open terminal and issue the following command as a root user: update-grub - This will refresh all OS labels in a Grub menu.

Cheers!!
Add a comment
 

Screen saver killer for windows

AddThis Social Bookmark Button
The Screensaver killer script

Sometimes you have to work with the systems where you are not a local admin, or you haven’t been given the credentials instead of someone just logged you in letting you work for a while upon a desktop. Most of the time there is a screensaver policy running which is set up to 5, 10 sometimes 15 minutes. Such an annoying could it be when you are back to your desk finding your laptop/desktop locked due to the strict time out policies! What would you do? Either asking someone, for the next time; “could you please log me in, again?” or ask uncle Google for a small “exec” file which is being called the screensaverkiller !

To the point - Installing screensaver killer in Win OS:

1.    Download screen saver killer zip package icon ScreenSaver Killer (65.78 kB)
2.    Crete a directory C:\scr_killer and unzip scr_killer.zip into this dir, you will get scr_killer.exe and sleep.exe
3.    Create a batch file in C:\scr_killer called scr_killer.bat
4.    Put below code into the file:

:DIRS
SET scriptdir=
SET scriptdir=%CD%
 
:BEGIN
start %scriptdir%\scr_killer.exe
sleep.exe 5
GOTO BEGIN

5.    Save changes, create a shortcut on your desktop, execute scr_killer.bat script and you are done.
6.    To stop the script; hit CTRL+C and press "Y"

Enjoy your always unlocked desktop.
Add a comment
 

JVM memory allocation between the managed servers in WLS 10.3

AddThis Social Bookmark Button
Oracle WebLogic Server 10.3 comes with default configuration of the JVM memory distribution between the managed servers. Assuming we have the "AdminServer" and one managed server “SOA_Server1” in "soadomin" domain, the JVM memory allocation will be the same for all servers by default.

In order to tune the JVM memory allocation for all managed servers and allocate desired amount of memory per a managed server an update of the configuration file can be performed.

Example configuration files in <MIDDLEWARE_HOME>/domains/soadomain/bin
Linux OS    : setSOADomainEnv.sh
Win OS      : setSOADomainEnv.cmd

Memory allocation will be set as follow
AdminServer     = 768MB
SOA_Server1    = 2048MB (2g)
Default memory = 1024MB (1g)
  • Entries for Linux:
if [ "${SERVER_NAME}" = "" ] || [ "${SERVER_NAME}" = "SOA_Server1" ]; then
DEFAULT_MEM_ARGS="-Xms2g -Xmx2g"
PORT_MEM_ARGS="-Xms2g -Xmx2g"
elif [ "${SERVER_NAME}" = "" ] || [ "${SERVER_NAME}" = "AdminServer" ]; then
DEFAULT_MEM_ARGS="-Xms768m -Xmx768m"
PORT_MEM_ARGS="-Xms768m -Xmx768m"
else
DEFAULT_MEM_ARGS="-Xms1g -Xmx1g"
PORT_MEM_ARGS="-Xms1g -Xmx1g"
fi
 
  • Linux WLS Cluster:
if [ "${SERVER_NAME}" = "SOA_Server1" ] || [ "${SERVER_NAME}" = "SOA_Server2" ]; then
DEFAULT_MEM_ARGS="-Xms2g -Xmx2g"
PORT_MEM_ARGS="-Xms2g -Xmx2g"
elif [ "${SERVER_NAME}" = "" ] || [ "${SERVER_NAME}" = "AdminServer" ];then
DEFAULT_MEM_ARGS="-Xms768m -Xmx768m"
PORT_MEM_ARGS="-Xms768m -Xmx768m"
else
DEFAULT_MEM_ARGS="-Xms1g -Xmx1g"
PORT_MEM_ARGS="-Xms1g -Xmx1g"
fi
  • Entries for Windows
(In section :OracleJVM)

:OracleJVM
 
...
...
 
if "%SERVER_NAME%"=="AdminServer" (
set USER_MEM_ARGS=-Xms768m -Xmx768m
set PORT_MEM_ARGS=-Xms768m -Xmx768m
 
) else (
set USER_MEM_ARGS=%DEFAULT_MEM_ARGS%
set PORT_MEM_ARGS=%PORT_MEM_ARGS%
)
 
if "%SERVER_NAME%"=="SOA_Server1" (
set USER_MEM_ARGS=-Xms2g -Xmx2g
set PORT_MEM_ARGS=-Xms2g -Xmx2g
) else (
set USER_MEM_ARGS=%DEFAULT_MEM_ARGS%
set PORT_MEM_ARGS=%PORT_MEM_ARGS%
)

Start the WLS environment and test settings:

[weblogic@host ~]$ ps auxww |grep java
 

 


Add a comment
 

Identifying locked objects and killing the session in DB

AddThis Social Bookmark Button
Common error: ORA-00054: resource busy and acquire with NOWAIT specified

To identify all locked sessions in an Oracle database:

Query 1:

  SELECT oracle_username || ' (' || s.osuser || ')' username,
         s.sid || ',' || s.serial# sess_id,
         owner || '.' || object_name object,
         object_type,
         DECODE (l.block, 0, 'Not Blocking', 1, 'Blocking', 2, 'Global') STATUS,
         DECODE (v.locked_mode,
                 0, 'None',
                 1, 'Null',
                 2, 'Row-S (SS)',
                 3, 'Row-X (SX)',
                 4, 'Share',
                 5, 'S/Row-X (SSX)',
                 6, 'Exclusive',
                 TO_CHAR (lmode))
            mode_held
    FROM v$locked_object v,
         dba_objects d,
         v$lock l,
         v$session s
   WHERE     v.object_id = d.object_id
         AND v.object_id = l.id1
         AND v.session_id = s.sid
ORDER BY oracle_username, session_id;

Query 2:

SELECT c.owner,
c.object_name,
c.object_type,
b.sid,
b.serial#,
b.STATUS,
b.osuser,
b.machine
FROM v$locked_object a ,
v$session b,
dba_objects c
WHERE b.sid = a.session_id
AND a.object_id = c.object_id;

Output example:
OWNER	 OBJECT_NAME	SID,SERIAL OBJECT      OBJECT_TYPE   STATUS	     MODE_HELD
SCHEMA_1 (user.test) 738,9076 SCHEMA1.EMP TABLE NOT Blocking Share

Get the SID and SERIAL values of the session you want to kill.

To kill the session in an oracle database:

SQL> ALTER SYSTEM KILL SESSION '579, 703' IMMEDIATE;

This is it!



Add a comment
 

Orcle APEX Manage HTTP remote access

AddThis Social Bookmark Button
Manage HTTP Access in Application Express 3.0

After default installation of Oracle APEX 3.0, remote users are not allowed to access Database home page (APEX console)
  • http://127.0.0.1:8080/apex
  • http://localhost:8080/apex
  • http://hostname.com:8080/apex (not allowed by default from remote location)
This is because the listener local access setting is being set to local only by default.

To set HTTP Access to allow remote connects:

SQL> exec dbms_xdb.setListenerLocalAccess (l_access => FALSE);

To set HTTP Access back to Local only:
 
SQL> exec dbms_xdb.setListenerLocalAccess (l_access => TRUE);

 

More information availble at Oracle: Oracle Application Express

Manage HTTP Access under Tasks To set HTTP Access to Local only:
  exec dbms_xdb.setListenerLocalAccess
(l_access => TRUE);

To set HTTP Access to allow remote connects:
  exec dbms_xdb.setListenerLocalAccess
(l_access => FALSE);
Add a comment
 

Installing Oracle AIA 11g Foundation Pack on Linux 64bit

AddThis Social Bookmark Button

Installation of Oracle Application Intergration Architecture Foundation Pack (AIA) 11g including Oracle SOA Suite 11g with Oracle BAM 11g on Oracle Database XE 10g and Linux 64bit.

Assumptions:
  1. This demo will be performed within VMware image. Personally, I don't recommend to install AIA11g on 32bit OS.
  2. An image: Oracle Enterprise Linux 5U4 (64bit), 4GB of swap and 6GB of RAM, 20GB of disk space.
  3. Oracle Database: Express Edition 10g, only for development purposes and saving resources in vmware env.
  4. Download software from Oracle downlod website and only from Oracle.
  5. SOA 11g R1 Patch Set 1 (11.1.1.2.0) is required for AIA 11gR1.
  6. Use of Service Registry (11gR1) and Enterprise Repository (11gR1) is optional (not covered in this demo).
  7. AIA 11g R1 Certification Matrix is available here.
  8. AIA 11g R1 (software and docs) is available at eDelivery here:
    AIA 11g at eDelivery
  9. This tutorial also covers ORACLE BAM since it is included in SOA Suite 11g

Download software and place it into /home/oracle/stage directory:
Database
If you don't already have an Oracle database installed, choose Oracle Express Edition for a small footprint database. (Oracle XE is suitable for development only. Ignore the warning during installation about the database version as that pertains to production installations.)


Oracle Database 10g Release 2 (10.2.0.1) Express Edition for Linux x86

http://www.oracle.com/technology/software/products/database/xe/htdocs/102xelinsoft.html

Oracle WebLogic Server 11gR1 (10.3.2) 64bit - Package Installer  (Additional Platforms, file: wls1032_generic.jar)
http://www.oracle.com/technology/software/products/ias/htdocs/wls_main.html

Repository Creation Utility (11.1.1.2.1)
http://www.oracle.com/technology/software/products/middleware/htdocs/fmw_11_download.html

SOA Suite 11.1.1.2.0 Generic: 1.7 GB (Nov-2009)
http://www.oracle.com/technology/software/products/middleware/htdocs/fmw_11_download.html

Oracle AIA 11gR1 (11.1.1.2.0) Linux x86 V20956-01.zip
http://edelivery.oracle.com
  • Let's roll:
Install the following software in the order it is shown.
Add a comment

Read more...

 

Ho to uninstall Oracle SOA Suite 11g & WebLogic Server

AddThis Social Bookmark Button
This short demo demonstrates how to uninstall Oracle SOA Suite 11g including WebLogic platform and database schemas.

  • Go to uninstall directory of SOA Suite installation and execute deinstallation script:
[oracle@host uninstall]$ cd $SOA_ORACLE_HOME/Middleware/utils/uninstall/
[oracle@host uninstall]$ ./uninstall.sh

  • soa_1
  • soa_2
  • soa_3
  • soa_4


  • Once uninstall is complete, remove SOA home directory from filesystem:
[oracle@host /]$rm -rf /u01/app/oracle/product/Middleware
  • Clean up the dehydration store database and the file system by executing the following statements:
--Schemas:
SQL> drop user "DEV_MDS" cascade;
SQL> drop user "DEV_ORABAM" cascade;
SQL> drop user "DEV_ORASDPM" cascade;
SQL> drop user "DEV_SOAINFRA" cascade;
SQL> delete from SCHEMA_VERSION_REGISTRY where OWNER like 'DEV%';
SQL> commit;

--Tablespaces and datafiles:
SQL>DROP TABLESPACE DEV_IAS_ORASDPM INCLUDING CONTENTS AND DATAFILES;
SQL>DROP TABLESPACE DEV_IAS_TEMP INCLUDING CONTENTS AND DATAFILES;
SQL>DROP TABLESPACE DEV_MDS INCLUDING CONTENTS AND DATAFILES;
SQL>DROP TABLESPACE DEV_ORABAM INCLUDING CONTENTS AND DATAFILES;
SQL>DROP TABLESPACE DEV_SOAINFRA INCLUDING CONTENTS AND DATAFILES;
cascade
Add a comment
 

Oracle database startup shutdown script

AddThis Social Bookmark Button

Automate Oracle Database startup shutdown script

orarun - script automates database start, stop, status query tasks, also allows user to manage isqlplus console and em database control

Usage: orarun {start|stop|status|isqlstart|isqlstop|emstart|emstop}
  • orarun start|stop|status  - starts/stops database, query for database status
  • orarun isqlstart/isqlstop - starts/stops isqlplus console
  • orarun emstart/emstop  - starts/stops enterprise manager database control
Requirements: configured and working "dbstart" and "dbshut" scripts.

Installation:

Create "orarun" file and paste the code into the created file.
Make sure script's location is in user's $PATH (ex.: /home/oracle/bin/orarun)
[oracle@host bin]$ touch /home/oracle/bin/orarun; vi /home/oracle/bin/orarun
#paste the code and save changes (:wq)

#grand execute rights to the script
[oracle@host bin]$ chmod +x /home/oracle/bin/orarun
[oracle@host bin]$ orarun status
*** Oracle database status ***
Database: MY_DB1 is up and running
Enjoy the script...

Add a comment

Read more...

 
More Articles...
Banner