rasti.hil@hilandco.com +41 79 367-9677

Oracle SQL Developer problem: buttons don't work [delete, backspace, arrows, etc.]

I come across this problem recently the solution is not to uninstall/reinstall SQL Developer, just go to:

Tools -> Preferences -> Accelerators -> Load Preset -> Default -> OK

Number Format Exception while starting WebLogic Server

Error when starting the Admin Server

java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:417)
at java.lang.Integer.parseInt(Integer.java:499)
at weblogic.ldap.EmbeddedLDAP.validateVDEDirectories(EmbeddedLDAP.java:1035)
at weblogic.ldap.EmbeddedLDAP.start(EmbeddedLDAP.java:212)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

cd user_projects/domains/ClassicDomain/servers/AdminServer/data/ldap/conf/
vi replicas.prop
add
replica.num=0

HTML5 localstorage()

Here is a simple source code for showing how to use localstorage().
Please see the comments in source for explanation.

<!DOCTYPE HTML>
<html>
<head>
<title>localStorage()</title>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> 
</head>

<body>
<!-- create input elements -->
E-mail: <input type="email" name="user_email" id="email"/ > <br />
First Name: <input type="text" name="f_name" id="fname"/ > <br />
Last Name: <input type="text" name="l_name" id="lname"/ > <br />


<input type="submit" id="submit" />   <input type="button" value="Remove localstorage" id="reset" />
<br /><br />
<!-- show inserted values -->
<div id="show"></div>

<script> 
$(function() {

  
   var edit = document.getElementById('submit');
   var reset = document.getElementById('reset');

  $(edit).click(function() {
 // get data
   var email = document.getElementById('email').value;
 var fname = document.getElementById('fname').value;
 var lname = document.getElementById('lname').value;
 
 var newDate = new Date();
 var itemId = newDate.getTime();
 var values = new Array();
 
 //push each value into our values array
 values.push(email); 
 values.push(fname);
 values.push(lname);
 
 // check if localStorage is supported by browser
 if (typeof(localStorage) == 'undefined' ) {
 alert('Your browser does not support HTML5 localStorage. Try upgrading.');
 }else{
  //store the item in the database
  try {
   localStorage.setItem(itemId, values.join(";")); 
   window.location.href=window.location.href;
  } catch (e) {
   if (e == QUOTA_EXCEEDED_ERR) {
    alert("Quota exceeded!");
   }
  }
 
 }
  });
  
  // when the page loads
  var innerhtml;
  innerhtml ="<table border=\"1\"><tr><td>Email</td><td>Firstname</td><td>Lastname</td></tr>";
  for (i=0;i<localStorage.length;i++){
   var itemKey = localStorage.key(i);
 var values = localStorage.getItem(itemKey); 
 //values currently look like 'name@organization;firstname;lastname' so split them
 values = values.split(";");
 var emails = values[0];
 var fnames = values[1];
 var lnames = values[2];
 innerhtml = innerhtml + "<tr><td>" + emails + "</td><td>" + fnames + "</td><td>" + lnames + "</td></tr>";
  }
   innerhtml = innerhtml + "</table>";
   document.getElementById("show").innerHTML=innerhtml;
 // clear local database
   $(reset).click(function() {
 localStorage.clear();
 window.location.href=window.location.href;
  }
  )
 
  
});</script>
</body>
</html>

The Oracle Database File System (DBFS) and Samba (SMB)

Install Samba
cd /etc/yum.repos.d
wget http://public-yum.oracle.com/public-yum-el5.repo
yum install samba

Manual FUSE Installation

Download the FUSE 2.8.5 package from http://fuse.sourceforge.net/.

Determine the kernel directory.
# echo /usr/src/kernels/`uname -r`-`uname -p`
/usr/src/kernels/2.6.18-128.el5-x86_64
#
Install the FUSE package as the "root" user using the following commands, substituting your kernel directory.
# tar -xzvf fuse-2.8.5.tar.gz
# cd fuse-2.8.5
# ./configure --prefix=/usr --with-kernel=/usr/src/kernels/2.6.18-128.el5-x86_64
# make
# make install
# /sbin/depmod
# /sbin/modprobe fuse
# chmod 666 /dev/fuse
# echo "/sbin/modprobe fuse" >> /etc/rc.modules
# chmod 700 /etc/rc.modules

Create DBFS File System

create user dbfs identified by dbfs default tablespace users quota unlimited on users;

grant dbfs_role to dbfs;
grant create session to dbfs;
grant create procedure to dbfs;
grant create table ro dbfs;
alter user dbfs default role all;

Create a simple file system

cd $ORACLE_HOME/rdbms/admin
sqlplus dbfs/dbfs @dbfs_create_filesystem.sql USERS SAMBADBFS

Create a mount point
mkdir /smbdbfs
chown oracle:oinstall /smbdbfs

Configure fuse
echo user_allow_other > /etc/fuse.conf

Mount File System

export LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/db_1/lib
dbfs_client dbfs@localhost:1521/odmdb -o allow_root /smbdbfs <>

Configure Samba
smbpasswd -a oracle

vi /etc/samba/smb.conf

[global]
security = user
encrypt passwords = Yes
username map = /etc/samba/smbusers

[smbdbfs]
path = /smbdbfs
writeable = true
username = oracle

/etc/init.d/smb restart

Windows Map Drive
net use t: \\server\smbdbfs password /USER:oracle




Creating new user for Oracle Business Intelligence Enterprise Edition 11g Release 1

1) Login into the Administration Console of Oracle BI EE
http://[host]:[port]/console
default port: 7001


2) Click on the "Security Realms" link


3) Click on the "myrealm" link to view all users, groups, and permissions for that security realm.


4) Click on the "Users and Groups" tab


5) Click on the "New" button.


6) After entering the new user's name, description, and password then click on "OK" button.


7) Now we have created new user, but it has no any privilege. So we have to assign it to a group.
At first click on created user:


8) Click on the "Groups" tab


9) If you want to give admin privilege to new user then choose the "Administrators" and "BIAdminsitrators"


10) Login into analytics:
http://[host]:[port]/analytics
default port: 9704

Installing Oracle Business Intelligence 11g

1. Creating Schemas for Oracle BI Publisher 11g using the Repository Creation Utility (RCU)
In this post you can see how to Create Schemas for BIP 11g using the Repository Creation Utility (RCU)

2. Starting Oracle Business Intelligence 11g Installer
Run the following commands in the Disk1 directory:
- Linux: ./runInstaller.sh
- Windows: setup.exe

a. Welcome screen
Click Next


b. Select Installation Type
Choose the Simple Install type and click Next.


c. Prerequisite Checks screen
If an error message appears, fix the error and then click Retry to run the prerequisite check again (recommended). Repeat this until all prerequisite checks conclude with no errors.
Click Next.


d. Specify Installation Location
Click Browse to navigate to the directory and click Next.


e. Administrator Details
Specify the user name and password for the system administrator.
Click Next.


f. Configure Components
By default, all components are configured. Leave all items checked and click Next.


g. Database Details
Specify the database type, the connect string, and the username and password for the Oracle Business Intelligence schemas you created in your database using RCU.
Click Next.


h. Security Updates
Specify your My Oracle Support email address and password (optional).
Click Next.


i. Summary
Click Install


j. Installation Progress
Click Next when the installation is complete.


k. Configuration Progress
Click Next when the configuration concludes without any errors or warnings.


l. Installation Completed Screen
Click Finish.


m. Login into BI Publisher 11g

Oracle Embedded PL/SQL Gateway & listener.ora & tnsnames.ora

I came across a problem that /apex/ DAD doesn't really want to work via EPG,
so i did:

listeners.ora:
SID_LIST_LISTENER =
    (SID_LIST =
        (SID_DESC =
            (SID_NAME = ec211gr2)
            (GLOBAL_DBNAME = ec211gr2)
            (ORACLE_HOME =/u01/app/oracle/product/11.2.0/db_1)
        )
    )


LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1522))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 8080))
      (PRESENTATION=HTTP)
      (SESSION=RAW)
    )
  )
tnsnames.ora:
EC211GR2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1522))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 8080))(Presentation=HTTP)(Session=RAW)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ec211gr2)
    )
  )
some sql as sysdba
alter system set dispatchers=(PROTOCOL=TCP)(SERVICE=ec211gr2XDB) scope booth;
alter system set local_listener=EC211GR2 scope booth;
create pfile from spfile;
shutdown immediate
startup
some bash command as oracle
lsnrctl stop
lsnrctl start

Creating Schemas for Oracle Business Intelligence using the Repository Creation Utility (RCU)

1. Starting the Repository Creation Utility (RCU)
you have to download and extract the RCU .zip file. Run the following commands in the bin directory of RCU_HOME:
- on Linux: ./rcu
- on Windows: rcu.bat

2. Creating Schemas for Oracle Business Intelligence

a. Welcome Screen
Click next


b. Create Repository Screen
Select Create and click Next.


c. Database Connection Details Screen




d. Select Components Screen
Select Create a new Prefix. Click the Business Intelligence check box. This automatically selects the Metadata Services (MDS) and Business Intelligence Platform schemas, which are required by Oracle Business Intelligence.
Click Next.



e. Schema Passwords Screen
Select Use same password for all schemas.
In the Password field, enter a password for accessing the schemas. Enter the password again in the Confirm Password field
Click Next.


f. Map Tablespaces Screen
Click Next. The Creating Tablespaces screen opens. If there are errors, details about the error appear on the Map Tablespaces screen. Fix the errors and click Next again. After the tablespaces are created with no errors, click OK to dismiss the screen.




g. Summary Screen
Click Create. The Create screen opens. If there are errors, details about the errors appear on the Summary screen. Fix the errors and click Next again. After the schemas are created with no errors, click OK to dismiss the screen.



h. Completion Summary Screen
Click Close.

BI Publisher turn on/off cache

From BI Publisher Release 10.1.3.3.2 there is a possibility to cache documents.
You can enable/disable this feature by going to

"Report" -> Edit -> Report Editor -> Report Properties -> General Settings -> Enable Document Cache

Recover datafile

1) check which tablespace is corrupted
SQL> select name, status from v$datafile where status not in ('ONLINE', 'SYSTEM');
2) take offline, recover datafile, bring it back online
SQL> alter datafile  'C:/ORACLEXE/ORADATA/XE/DATAFIEL_NAME.DBF' offline;
SQL> recover datafile 'C:/ORACLEXE/ORADATA/XE/DATAFIEL_NAME.DBF';
SQL> alter datafile  'C:/ORACLEXE/ORADATA/XE/DATAFIEL_NAME.DBF' online;

Add new type fonts to Bi Publisher server

Have you ever have that except PDF everything coming from BI Publisher look OK, but in pdf there are question marks like ??????? ???????? ????.
This is because other format use the local machine's fonts but PDF use own fonts.
The solution is to add the missing font type to

$BI_HOME//jdk/jre/lib/fonts/

After font types are copied to server you have to do a font mapping in BIP

"REPORT" -> Configure -> Font Mappings -> Add Font Mapping

Hil & Co IT Solutions on iGoogle

From June 21th, 2010 this blog's rss/Atom feed is available also as iGoogle gadget.
By clicking on this link you can insert a gadget which will list the last tree blog entry title in you iGoogle page.

How to create web service via JDeveloper 10.1.3.3

1) At first you have to create Application Server Connection to oc4j and Database Connection to hr user in JDeveloper. And create EMP_FETCHER package
2) Right-click the Applications node in the Applications Navigator and select New Application

Application Name: App_001
Application Template: No Template [All Technologies]
and click the OK button

Project Name:Proj_001
and click the OK button

Right-click Proj_001 and select New node

Select General -> Deployment Descriptors -> OC4J Deployment Descriptor Wizard

Click the next button, after that select data-sources.xml

select 1.0 version and click the Finish button

Right-click Proj_001 and select New node

Select Business Tier -> Web Services -> PL/SQL Web Service and click the next button

Select J2EE 1.3 (Oracle) Web Service

Select the hr Database Connection, select EMP_FETCHER package, and the Web Service Name: ws_001

Select GET_EMP_ALL function and click the next button, and again click the next button and at finally click on the Finish button

In Applications Navigator, expand the Resources node, right-click WebServices.deploy and select Deploy to "your Application Server for OC4J"

Click the Source tab at the bottom of the WSDL

And copy the address location link

At finally paste the link into browse and you can try the your Web Service:

Click on getEmpAll link