Tuesday, December 24, 2013

SQL Developer & fixing missing MSVCR100.DLL Error

As salamualikum (islamic greetings), brothers and sisters.

 Huhh, Post again after a long time. I'm passing very busy time. Lot's of change around me.

Come to the topic.


When you run first time after installation or migration from any other older Oracle SQL Developer, you can heart at the very first and see the following messages...


 duhh ! :( 

How you solve the problem ?

It's easy, go to driver location of jdk for example: \sqldeveloper\jdk\jre\bin
 you will see the MSVCR100.DLL and copy it to

\sqldeveloper\sqldeveloper\bin  folder.

Now, you are done... 

Start the Team Viewer. An what you get ?


Comments to share your thoughts.. 


End for the day....


Praise to Almighty Allah(swt).  :)

Fi amanillah




 

Thursday, November 28, 2013

How to get connected user session and the application name, who are using ?

As salamualikum (islamic greetings), brothers and sisters.

 Huhh, Post again after a long time. I'm passing very busy time. Lot's of change around me.

Come to the topic. And it's about database session issue.

Here we will learn how to get all the open database session (open by different application) and also the session for a particular USER.

By this information you will kill the session and also terminate any session forcefully and do you necessary works with the database.

connect database with the SYS/SYSTEM user. And run the bellow code.

SELECT s.inst_id,
       s.sid,
       s.serial#,
       p.spid,
       s.username,
       s.program,
       s.machine
FROM   gv$session s
       JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id
WHERE  s.type != 'BACKGROUND';


it will show you all the open session for the database. If you need for a particular user, then run the bellow code.

SELECT s.inst_id,
       s.sid,
       s.serial#,
       p.spid,
       s.username,
       s.program,
       s.machine
FROM   gv$session s
       JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id
WHERE  s.type != 'BACKGROUND'

AND s.username='db_user';

If you want to get just in a easy SQL, then run the bellow code,

select sid
           ,serial# 
from v$session 
where username = 'db_user';

Now, you get all the required information to terminate the specific session. How will you do this ?

You need to follow the following syntax.

alter system kill session '<sid>,<serial#>';

alter system kill session '39,1232';

You are done...!!!

Do you need to close all the session for a specific user ?

Then you will need a LOOP to close one by one. Follow the bellow example.

begin    
    for x in ( 
            select Sid, Serial#, machine, program 
            from v$session 
            where 
                username = 'db_user' 
        ) loop 
            execute immediate 'Alter System Kill Session '''|| x.Sid 
                     || ',' || x.Serial# || ''' IMMEDIATE';
            dbms_output.put_line('Connected Session Found from '||x.machine||', Via '||x.program);                   
        end loop; 
    dbms_output.put_line('Ops! No Connected Session Found.');
end;



End for the day....

Praise to Almighty Allah(swt).  :)

Fi amanillah

Thursday, September 26, 2013

Error FRM-92095: Oracle Jnitiator version too low

As salamualikum (islamic greetings), brothers and sisters,

Today my topic is Error FRM-92095: Oracle Jnitiator version too low

Symtom:
After logging into application, system pop up below error message:

FRM-92095: Oracle JInitiator version too low. Please install version 1.1.8.2 or higher

Cause:
The JRE version is not incompatible.

Why it comes/shows ? 

When you have installed JRE version which is incompatible with your oracle form version, then you will get the above message. For example, your form version is 10.1.2.3 or 10.0.1.2 and your installed JRE version is 1.7.xx.xx, in that case you will get the message.

Cause this form version isn't certified by oracle corporation.

How to solve this ?

Open the "Java Control Panel" window.
Click the Java tab, then the View... button.

This should open a Java Runtime Environment Settings window with two tabs: User and System.
On
User tab, under Runtime Parameters, enter:

-Djava.vendor="Sun Microsystems Inc."

OR
-Djava.vendor="New Oracle"

click Ok. then Apply and Ok.
 
That's it. Close the  brower and java console and retry.

Praise to Almighty Allah(swt).  :)

Fi amanillah

Friday, April 5, 2013

How to Make Drill Down (Hyperlink) Report in Oracle Reports 10g/11g?


Greetings in Islamic way “As salamualikum”

Hyperlink reports in oracle means call another report from a report by clicking at a value.  For example, we have a report like bellow,
ID
Name
10001
Abdul Hamid
10002
Hamidur Rahman Siddique

And we want to call another report named DETAIL_INFO of a person by clicking on ID. How can we achieve this?

My example also helps to Hiding username/password when calling a report from another report

Follow the bellow steps and you are done.
1.       First stop the report server. (OC4J instance also for 10g)
2.       Search for CGICMD.DAT file in Developersuite home. (for 10g It’s located at <DevSuiteHome_1\reports\conf> folder. And for 11g D:\Oracle\Middleware\user_projects\domains\ClassicDomain\config\fmwconfig\servers\WLS_REPORTS\applications\reports_11.1.2\configuration)
3.       Open the CGICMD.DAT file and go to bottom line and add the bellow lines and modify as your value.

 ; ** MY DEFINE ** BY ** HAMIDHELAL **
hrs: userid=test/password@orcl server=rep_server desformat=pdf destype=cache paramform=no %*
(Where first userid, report server name, report destination format, destination type and no parameter form.)
4.       Save and close the file.
5.       Now open the report which will have the link.
6.       Select the data field and press F11 to go code editor and add the bellow code before
return (true);
SRW.SET_HYPERLINK('http://SERVER_NAME:8889/reports/rwservlet?hrs+report='D:\ID_CARD_ALL.rep+EMPID='||:EMP_ID);
(Change the report server url as you have, report name and parameter if you have)

Compile and save the reports. If needs convert to any other extension.

Now Run the report server and run your report…

You are done :)
 
Hope this helps…

Sunday, January 27, 2013

How to Get Number of Days In a Year ?

If you cannot calculate how many days in a year, here is an easy example for you. Write down the bellow code directly in sql*plus or SQL Developer or any others tools and get the result. :)

SELECT ADD_MONTHS(TRUNC(SYSDATE,'RRRR'),12)-TRUNC(SYSDATE,'RRRR')
FROM DUAL;
Hope it helps...

If any query, just leave your comments...

Wednesday, January 23, 2013

Oracle Forms Designer has stopped working/ How to apply Patchset 7047034 ?

As salamualikum Readers,

When you install Oracle Developer Suite 10g Release 2 on windows 7 and try to open any form within the builder, you may face the following issues..

Oracle Forms Designer Has stopped Working

Windows can check online for a solution to the problem.

---> Check online for a solution and close the program
----> close the program

What is the solution ?

There is two solution for this issue.

Solution # 1

  1. Open form builder.
  2.  Make connection with database.
  3.  Now open the form.
If solution # 1 doesn't work in your case then your need metalink (support.oracle.com) access which required valid support account.

 Solution #2

  1. Download Patchset no. 7047034
  2. Extract in root drive like C:\ 7047034
  3. open command prompt with admin previlage (@ write cmd)
  4. set oracle_home like (C:\Users\Administrator>set oracle_home=C:\DevSuiteHome_1)
  5. set PATH=%ORACLE_HOME%\OPatch;%PATH% like (C:\Users\Administrator>set PATH=%ORACLE_HOME%\OPatch;%PATH%)
  6. go to patchset folder like (C:\Users\Administrator>cd c:\7047034)
  7. write opatch apply like (c:\7047034>opatch apply)
  8. When your see >>Is this system ready for updating?
    Please respond Y|N > << Type Y and press Enter Key
  9. at finishing you will see >>OPatch succeeded.
    OPatch returns with error code = 0 <<
  10. write cscript //nologo remove_demo.js like (c:\7047034>cscript //nologo remove_demo.js)
Your are done. ;)

Now open form builder and open any form without error.

Enjoy Oracle Forms Developing..

If it helps, Leave your message.