Sunday, July 26, 2009

Recyclebin in Oracle 10g

The recyclebin concept is introduced in oracle 10g onwards . So far we have been knowing that the DDL commands are auto commited and cannot be recovered as a normal user. But the oracle 10g onwards the recyclebin is introduced like we have in windows.
The user_recyclebin and dba_recyclebin data dictionaries can be used to view the deleted contents. Let's see the following example to understand this concept.
SQL> create table test
( id number,
name varchar2(30));

SQL> insert into test values ( 1,'name1');

SQL> select *
from test;

ID NAME
------------------
1 name1

Let's drop the table

SQL> drop table test;

Now this table goes into the recyclebin. (Here recyclebin is a synonym for user_recyclebin )

SQL> select *
from recyclebin;

OBJECT_NAME ORIGINAL_NAME DROP_TIME
----------------------------------------------------------
BIN$b5sG6wgurG3gQAnAoNwPOA==$0 TEST 2009-07-26:16:50:38

If you want to get back(restore) then

SQL> flashback table test to before drop;          

Now you can view the test table.

If you want to drop the table permenantly without going to the recyclebin then issue

SQL> drop table test purge;        

Thursday, July 9, 2009

E-mailing the Oracle Report in PDF Format not in EPS

Once the oracle report is deployed at the customer site and the end user wants view the report and send the report as pdf format via e-mail.If we do not do the following setting then the end user will be sending the report as ".eps" format.
To send it as pdf format you just have to
Open the properties of the DESFORMAT under the System Parameters node and set the initial value as PDF. Now you would get the report e-mail format as "PDF".

Thursday, July 2, 2009

Invoking the SEAM app through the client machine

We know that the seam application can be invoked through, the following url
http://localhost:8080/urapp
this would work fine if the jboss server and the client both are in the same machine..but if u wanna access it through another client u may access via
http://ip_address:8080/urapp
But this would not work unless if u don't do the following settings.
Step 1: Go to /bin
Eg : D:\jboss-eap-4.3\jboss-as\bin
Step 2: Copy the following in the notepad
run.bat -b 0.0.0.0
save it as "runjb.bat" at the bin folder.
Step 3: Create the short cut for runjb.bat.
Step4: Start the jbsos using the runjb.bat
Now ur client can access ur app via http://ip_address:8080/urapp the url.