Tuesday, January 22, 2008

Tip : Database Query Tool for Oracle 8i,Oracle 9i,Oracle 10g with Free Aqua Data Studio 4.7



Forgot the SQL Plus in oracle from now.

I'm proud to present the professional database query tool "Aqua Data Studio 4.7" that free for developer and student.

I my opinion ,i think i success for develop software with oracle database ,the key for success is quickly development "Aqua Data Studio 4.7" can save a lot of time for development, so i love it.

This tip i want to share the best and valuable experience in hard working.

The first,i will take you tour "Aqua Data Studio 4.7" feature.

1.)Aqua Data Studio run on Window XP,Windows Vista,Mac OS,Linux,Solaris and Java Plateform Enabled

2.)Aqua Data Studio working on Oracle 8i,Oracle 9i and Oracle 10g.

3.)Include Oracle Database Administration (DBA) Tools following Instance Manager, storage
Manager, Rollback Manager, Log Manager, Security Manager, Session Manager, GA Manager, Server Statistics

4.) Visual Query Builder allows users to graphically select tables, views and relationships to build queries. this feature will save your time.

5.) Super Auto-completion is a hight light feature of Aqua Data Studio

6.) SQL Formatter (Beautifier)

7.) Parameterized Scripts

8.) Shortcut Toolbar

9.) Schema Browser Filtering

10.) Mountable Server Connections

11.) Query Analyzer: Changable Schema Context (Oracle & DB2)

12.) Query Analyzer Permissions

Wow .. those are "Aqua Data Studio 4.7" features .

Next, we will explain how to install and configuration "Aqua Data Studio 4.7" with Oracle 8i,Oracle 9i,Oracle 10g

Download "Aqua Data Studio 4.7"


Aqua Data Studio 4.7


System requirement before installation:
- Java Runtime Environment 1.5 or above
- Operating System Windows XP, Windows Vista, Linux, Mac OS and Java Platform Enabled

You can install with two choices:
- with installer (.exe in windows)
- without installer extract to driver (.zip or .tar.gz)

Install "Aqua Data Studio" in general step by click and click ..
Notice :
For User & License dialog :
in "Usage" select "Personal Use - Personal use for leaning purpose"
in "Personal License" select "I verify that my use ..." and type "YES" in text box


Picture 1. How to chose Personal License in Aqua Data Studio 4.7

for this step finish to installation "Aqua Data Studio 4.7" , but you need to check your oracle version before open "Aqua Data Studio 4.7"

for oracle 10g you can start "Aqua Data Studio 4.7"
for oracle 9i you can start "Aqua Data Studio 4.7"

for oracle 8i you must copy ORACLE_HOME/jdbc/classes12.zip to AQUA_DATA_STUDIO_HOME/lib and change AQUA_DATA_STUDIO_HOME/datastudio.cfg by see "oracle.jar" and replace with "classes12.zip"

------- original datastudio.cfg ------
-Dsun.swing.enableImprovedDragGesture -Xmx256M -cp ".\lib\ads.jar;.\lib\aqua-lib.jar;.\lib\jnlp.jar;.\lib\oracle.jar;.\lib\nlscharset12.jar;.\lib\jtds.jar;.\lib\mysql.jar;.\lib\postgresql.jar;.\lib\db2java.jar;.\lib\db2jcc.jar;.\lib\db2jcc_license_cu.jar;.\lib\ifxjdbc.jar;.\lib\jconnect55.jar;.\lib\jconnect60.jar;.\lib\xmlparserv2.jar;.\lib\xdb.jar" com.aquafold.datastudio.DataStudio
------- change to ---------
-Dsun.swing.enableImprovedDragGesture -Xmx256M -cp ".\lib\ads.jar;.\lib\aqua-lib.jar;.\lib\jnlp.jar;.\lib\classes12.zip;.\lib\nlscharset12.jar;.\lib\jtds.jar;.\lib\mysql.jar;.\lib\postgresql.jar;.\lib\db2java.jar;.\lib\db2jcc.jar;.\lib\db2jcc_license_cu.jar;.\lib\ifxjdbc.jar;.\lib\jconnect55.jar;.\lib\jconnect60.jar;.\lib\xmlparserv2.jar;.\lib\xdb.jar" com.aquafold.datastudio.DataStudio

Save and Close edit datastudio.cfg and Start "Aqua Data Studio 4.7"

Congratulations!! ,You can use "Aqua Data Studio 4.7" for Oracle 8i,Oracel 9i and Oracle 10g

Next Step we will create group and register oracle server with oci :

Right click on "Oracle Database Server" menu and Select "New Server Group" ,New Server Group dialog are displayed ,type any your group for example "oracle database group"


Picture 2. Create New Server Group

Right click "oracle database group" and select "Register Server"


Picture 3. Create Group Name

Type oracle connect info to "Register Server" Dialog


Picture 4. Setup "Register Server"

When you finish on this step ,try to connect .

In "Server Menu" select "Query Analyzer" and put your SQL for test Query.

Picture 5. Query Analyzer Tools with Super Auto Completion
And another tools in "Server" menu for example Query Builder


Picture 6. Query Builder Tools for Create SQL with GUI

I think this experience are useful for many people and save a lot of time for develop software with oracle database (oracle 8i,oracle 9i,oracle 10g).

Note : Enjoy with made easy.
Today's Joke :
SQL Plus is devil because killer your time.

Add to: Power Oldie Add to: Digg Add to: Del.icio.us Add to: StumbleUpon Add to: Yahoo Add to: Spurl Add to: Google

TIP : Explode and Implode duo function in php



This is duo php function that very useful when we need parser and insert string with any delimiter for example "a-b-c-d-e-f" you can explode to array in php with simple statement

for explode function in php.
-------- PHP Code -------
$str = "a,b,c,d,e,f" ;
$arr = explode(",","a,b,c,d,e,f") ; //This function will extract by "," and add for each character to array
print_r($arr);
---------------------------
Output:
Array
(
[0] => a
[1] => b
[2] => c
[3] => d
[4] => e
[5] => f
)




for implode function in php .
-------- PHP Code -------
$arr = array('a','b','c','d','e','f');
$str = implode('-',$arr); //this function will insert '-' character between array element
print_r($str);
---------------------------
Output:
a-b-c-d-e-f

Note :
implode and explode in php5 are useful when you manipulate with CSV file with any delimiter for example white space, comma, colon .

Today's Joke :
Remember that explode is a bomb also implode is a glue.


Add to: Power Oldie Add to: Digg Add to: Del.icio.us Add to: StumbleUpon Add to: Yahoo Add to: Spurl Add to: Google

Wednesday, January 16, 2008

FAQ : PHP 5.2.5 and Setup php_oci8.dll (oracle 8,oracle 9,oracle 10)



For setup php_oci8.dll or oracle extension in php 5.2.5

Important : PHP 5.2.5 must to use oci.dll in Oracle 10g above.

First download oci.dll (from oracle 10)




Download Now

1.) uncomment line in php.ini

;extension=php_oci8.dll -> change to -> extension=php_oci8.dll

2.) copy oci.dll from downloaded to PHP5.2.5_DIR/ext

3.) check php can load extension module with command :

/>cd c:/php-5.2.5-win32
/>php.exe -m
[PHP Modules]
bcmath
calendar
com_dotnet
ctype
date
dom
filter
ftp
hash
iconv
json
libxml
mysql
oci8
odbc
pcre
Reflection
session
SimpleXML
SPL
standard
tokenizer
wddx
wsf
xml
xmlreader
xmlwriter
xsl
zlib
[Zend Modules]

------ End ---
If you can't find any error or warning ,congratulations!! you succeed to setup oracle extension.
Some problems may be occur in step 3 for example :


  • The procedure entry point OCIStmtPrepare2 could not be located in the dynamic link library OCI.dll, You can fixed this problem by copy oci.dll in oracle10g only to php directory and test again
  • Remember oci.dll in Oracle 8 and Oracel 9 not work with PHP 5.2.5 .
  • The procedure entry point OCILobRead2 could not be located in the dynamic link library OCI.dll, this problem can occur when you copy oci.dll from Oracle 9 to php directory.You can fixed by copy oci.dll in oracle10g only to php_directory and test again
4.) Start Apache or IIS :

Some problems may be occur in step 4 for example :
  • PHP Startup: Unable to load dynamic library 'C:/php-5.2.5-Win32/ext/php_oci8.dll" - The specified procedure could not be found, You can fixed this problem by copy oci.dll (from oracle 10) to apache_home/bin then restart apache again

Today's Joke :

If you can't fixed this problem, please restart you computer now, Ohh my god ... it work fine.


Add to: Power Oldie Add to: Digg Add to: Del.icio.us Add to: StumbleUpon Add to: Yahoo Add to: Spurl Add to: Google