Search This Blog

Wednesday, June 1, 2022

Oracle Apex Password Expired: ORA-28001: the password has expired

java.sql.SQLException: ORA-28001: the password has expired


Local Apex password expired solution:

------------------------------------

APEX_200200

ALTER USER APEX_200200 IDENTIFIED BY "Password";  

ALTER USER system ACCOUNT UNLOCK;       


APEX_LISTENER

ALTER USER APEX_200200 IDENTIFIED BY "Password";

ALTER USER APEX_200200 ACCOUNT UNLOCK;


YOUR_SCHEMA

ALTER USER YOUR_SCHEMA IDENTIFIED BY "Password";

ALTER USER YOUR_SCHEMA ACCOUNT UNLOCK;


APEX_PUBLIC_USER

ALTER USER APEX_PUBLIC_USER IDENTIFIED BY "Password";

ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK;


APEX_REST_PUBLIC_USER

ALTER USER APEX_REST_PUBLIC_USER IDENTIFIED BY "Password";

ALTER USER APEX_REST_PUBLIC_USER ACCOUNT UNLOCK;


APEX_INSTANCE_ADMIN_USER

ALTER USER APEX_INSTANCE_ADMIN_USER IDENTIFIED BY "Password";

ALTER USER APEX_INSTANCE_ADMIN_USER ACCOUNT UNLOCK;


ORDS_PUBLIC_USER

ALTER USER ORDS_PUBLIC_USER IDENTIFIED BY "Password";

ALTER USER ORDS_PUBLIC_USER ACCOUNT UNLOCK;


Tuesday, May 31, 2022

Find Number of Inserted Row.

sql%Rowcount is working to print number of inserted row. like below.

dbms_output.put_line('No Of rows'||sql%Rowcount);

Thursday, February 3, 2022

Set Alarm In Oracle Apex Using HTML, CSS, JavaScript

Few days ago I had a plan to make a alarm clock in Oracle Apex. So I tried to find out something to do it. And finally did it using HTML,CSS, JavaScript. I feel it works very well. So I am going to share my tricks and code to you. You can try or use it if needed. Even you may customize it your self according to your requirement.  Follow below steps. 

Step 1. Create a new page and a region using static content type. 


Step 2. Copy-Paste this CSS and Java Codes into Page properties >> HTML Header 

<style>
/* (A) FONT */
#ctime#tpick {
  font-family: Impactsans-serif;
}
.header {
  text-align: center;
  font-weight: normal;
  margin: 5px 0 10px 0;
}

/* (B) CURRENT TIME */
#ctime {
  margin: 0 auto;
  max-width: 350px;
  padding: 10px;
  background: #000;
  text-align: center;
}
#ctime .header {
  color: #c61d1d;
}
#ctime .square {
  display: inline-block;
  padding: 10px;
  margin: 5px;
}
#ctime .digits {
  font-size: 24px;
  background: #fff;
  color: #000;
  padding: 20px 10px;
  border-radius: 5px;
}
#ctime .text {
  margin-top: 10px;
  color: #ddd;
}

/* (C) TIME PICKER */
#tpick {
  margin: 0 auto;
  max-width: 350px;
  padding: 10px;
  background: #f2f2f2;
  white-space: nowrap;
}
#tpick-h#tpick-m#tpick-s {
  display: inline-block;
  width: 32%;
}
#tpick select {
  box-sizing: padding-box;
  width: 100%;
  font-size: 1.2em;
  font-weight: bold;
  margin: 20px 0;
}
#tset#treset {
  box-sizing: padding-box;
  width: 50%;
  background: #3368b2;
  color: #fff;
  padding: 10px;
  border: 0;
  cursor: pointer;
}
#tset:disabled#treset:disabled {
  background: #aaa;
  color: #888;
}
</style>

<script>

var ac = {
  // (A) INITIALIZE ALARM CLOCK
  init : function () {
    // (A1) GET THE CURRENT TIME - HOUR, MIN, SECONDS
    ac.chr = document.getElementById("chr");
    ac.cmin = document.getElementById("cmin");
    ac.csec = document.getElementById("csec");

    // (A2) CREATE TIME PICKER - HR, MIN, SEC
    ac.thr = ac.createSel(23);
    document.getElementById("tpick-h").appendChild(ac.thr);
    ac.thm = ac.createSel(59);
    document.getElementById("tpick-m").appendChild(ac.thm);
    ac.ths = ac.createSel(59);
    document.getElementById("tpick-s").appendChild(ac.ths);

    // (A3) CREATE TIME PICKER - SET, RESET
    ac.tset = document.getElementById("tset");
    ac.tset.addEventListener("click", ac.set);
    ac.treset = document.getElementById("treset");
    ac.treset.addEventListener("click", ac.reset);

    // (A4) GET ALARM SOUND
    ac.sound = document.getElementById("alarm-sound");

    // (A5) START THE CLOCK
    ac.alarm = null;
    setInterval(ac.tick, 1000);
  },

  // (B) SUPPORT FUNCTION - CREATE SELECTOR FOR HR, MIN, SEC
  createSel : function (max) {
    var selector = document.createElement("select");
    for (var i=0; i<=max; i++) {
      var opt = document.createElement("option");
      i = ac.padzero(i);
      opt.value = i;
      opt.innerHTML = i;
      selector.appendChild(opt);
    }
    return selector
  },

  // (C) SUPPORT FUNCTION - PREPEND HR, MIN, SEC WITH 0 (IF < 10)
  padzero : function (num) {
    if (num < 10) { num = "0" + num; }
    else { num = num.toString(); }
    return num;
  },

  // (D) UPDATE CURRENT TIME
  tick : function () {
    // (D1) CURRENT TIME
    var now = new Date();
    var hr = ac.padzero(now.getHours());
    var min = ac.padzero(now.getMinutes());
    var sec = ac.padzero(now.getSeconds());

    // (D2) UPDATE HTML CLOCK
    ac.chr.innerHTML = hr;
    ac.cmin.innerHTML = min;
    ac.csec.innerHTML = sec;

    // (D3) CHECK AND SOUND ALARM
    if (ac.alarm != null) {
      now = hr + min + sec;
      if (now == ac.alarm) {
        if (ac.sound.paused) { ac.sound.play(); }
      }
    }
  },

  // (E) SET ALARM
  set : function () {
    ac.alarm = ac.thr.value + ac.thm.value + ac.ths.value;
    ac.thr.disabled = true;
    ac.thm.disabled = true;
    ac.ths.disabled = true;
    ac.tset.disabled = true;
    ac.treset.disabled = false;
  },

  // (F) RESET ALARM
  reset : function () {
    if (!ac.sound.paused) { ac.sound.pause(); }
    ac.alarm = null;
    ac.thr.disabled = false;
    ac.thm.disabled = false;
    ac.ths.disabled = false;
    ac.tset.disabled = false;
    ac.treset.disabled = true;
  }
};

// (G) START CLOCK ON PAGE LOAD
window.addEventListener("load", ac.init);
</script>

Step 3.  Copy-Paste this code into Page properties >> Region>> Source

<!-- (A) CURRENT TIME -->
<div id="ctime">
  <h1 class="header">THE CURRENT TIME</h1>
  <div class="square">
    <div class="digits" id="chr">00</div>
    <div class="text">HR</div>
  </div>
  <div class="square">
    <div class="digits" id="cmin">00</div>
    <div class="text">MIN</div>
  </div>
  <div class="square">
    <div class="digits" id="csec">00</div>
    <div class="text">SEC</div>
  </div>
</div>

<!-- (B) SET ALARM -->
<div id="tpick">
  <h1 class="header">
    SET ALARM
  </h1>
  <div id="tpick-h"></div>
  <div id="tpick-m"></div>
  <div id="tpick-s"></div>
  <div>
    <input type="button" value="Set" id="tset"/>
    <input type="button" value="Reset" id="treset" disabled/>
  </div>
</div>

<!-- (C) ALARM SOUND -->
<audio id="alarm-sound" loop>
  <source src="#APP_IMAGES#Arekbar.mp3" type="audio/mp3">
</audio>

Step 4.  Upload a ringtone in  
  • Shared Components
  • Static Application Files
  •   then copy the reference for use as your ringtone source. 


    Step 5. Change the music directory source form Step 3 code. Use here new directory of your ringtone. 

    <audio id="alarm-sound" loop>
      <source src="#APP_IMAGES#Arekbar.mp3" type="audio/mp3">
    </audio>

    That's All. Now Just Set Alarm And Enjoy It. Thank You.  :) 

    Wednesday, November 24, 2021

    Work In USA with H1B Visa, Especially for IT Professionals

    Info about H1b visa to work in USA, Especially for IT professional,

    Every week I am getting lots of email about H1b visa. How can we apply for this visa? I also have seen one of Bangladeshi newspaper published wrong information about H-1b visa and a website linked in it, asking money for providing the information. Through I am replying individually, but I thought, I will write something details about this and share with you so that you can get informed and benefited.

    H1b visa can be a very good opportunity for Bangladeshi IT (Computer engineer) talents to work in USA. Lots of Indian (south Indian) and Chines professionals are coming to USA with this visa every year. So it could be a good job source also for Bangladeshi High skilled computer engineers. As per my knowledge, there are lots of world qualities IT professional in Bangladesh and I believe Bangladeshi’s are not less genius than others.  

    The US H1B visa is a non-immigrant visa that allows US companies to employ foreign workers in specialty occupations that require theoretical or technical expertise in specialized fields such as in Computer engineering, architecture, others engineering, mathematics, science, and medicine. Under the visa a US company can employ a foreign worker for up to six years at least. (3 years + 3 years extension). Then if there are not enough employees like you in US market then you can apply for Green Card.

    H1B visa applications can only be filed by the US employer (not the individual/beneficiary). Foreign Nationals MUST first obtain an H1B sponsorship job (sponsored employment position) with a US employer who will hire them and file for their H1B visa. (Now easy to find out but you have to more qualify for that)

    Current immigration law allows for a total of 85,000 new H-1B visas to be made available each government fiscal year. This number includes 65,000 new H-1B visas issued for overseas workers in professional or specialty occupation positions, and an additional 20,000 visas available for those with an advanced degree from a US academic institution. Once the visa cap has been reached, USCIS will stop accepting H-1B petitions for this year. If more application applied within a time frame then a lottery will happen for selecting 65,000 candidates and 20000 candidates.

    For understanding H-1B Requirements

    http://www.uscis.gov/eir/visa-guide/h-1b-specialty-occupation/understanding-h-1b-requirements

    More about H-1b program.

    http://www.uscis.gov/working-united-states/temporary-workers/h-1b-specialty-occupations-and-fashion-models/h-1b-fiscal-year-fy-2016-cap-season

    H-1B visa season starts on April 1st of every year. Usually USCIS starts accepting H-1B visa petitions for next fiscal year starting from April 1st of the current year. So you need to make sure, everything is ready by before April 1st. For The Bangladeshi, only hard thing is to find out a H-1B Visa sponsoring companies or US employers who are willing to sponsor.

    Need to be ready: 

     1) Find out the sponsoring companies.

    For searching on H1B Visa sponsoring companies. You can create a list of all the companies that are likely to sponsor H1B Visa for your profile. Send an attractive email to all of them with your experience, ability, success and more (with a good resume also) . Read article :  How to find H1B Visa 2015 Sponsors. You can use  H1B Visa Sponsors Database    and (http://www.myvisajobs.com/Search_Visa_Sponsor.aspx) links to look for companies that sponsor H1B visas in a particular City or Zipcode or Occupation or by company name. You will apply for jobs during this period with these companies and do job interviews with the companies. Think of this period as intensive job search.

    2) Verify the H1B Visa Sponsoring companies

    3) Finalize the H1B Sponsoring company

    4) You need to work with your employer and their attorney for filing H1B petition. You will need to send the documents, usually only scan copies of the documents are requested by attorney. Do NOT provide any originals.

    5) Send out all the scan copies via email. If anything required as hard copy, just courier the same.  It is critical that you work with your attorney and have it ready so that they file for your LCA during this week itself.

    6) You need to check with your attorney and employer, if they have all the documents and everything is on track. This is the busiest time for employers and attorneys. If everything went well and your attorney has all the paperwork, there is no activity for you.

    DON'T SEND ANY MONEY FOR CHARGE OF ANY FEES!

    FYI-   Now USA job market is good for IT professionals.

    For more info,

    How can you Apply H1B Visa

    http://redbus2us.com/category/h1b-visa-consulting/apply-h1b-visa-h1b-visa-consulting/

    http://blog.upcounsel.com/how-can-a-startup-sponsor-an-h1b-visa/

    How to find out H1B visa Sponsor companies

    http://www.myvisajobs.com/Search_Visa_Sponsor.aspx

    http://www.myvisajobs.com/H1B-Visa/SearchLCA.aspx?Y=2013&E=tata&O1=Employer&O2=JobTitle

    http://www.immihelp.com/h1b-sponsoring-companies-database/

    How to find companies, Avoid Fraud ?

    http://redbus2us.com/h1b-visa-2014-sponsors-how-to-find-companies-avoid-fraud/

    H1B Visa 2015 – Frequently Asked Questions

    http://redbus2us.com/h1b-visa-2015/

    For any clarification and more information, anyone can shoot me email or send me message.


    Monday, November 8, 2021

    Difference Between Table Name With Quotation mark and Without Quotation mark (")

    Difference Between Table Name test and "test" 

    Look at the below table. There is tow table named test and "test". You can create same name two table in a database and schema. But why ? What is the difference  ? 

    Actually Oracle database is case sensitive in this case. But this issue is little deferent. Oracle database take as smaller latter when table name with Quotation mark ("test") .  On the other hand without Quotation mark table name Oracle database take as capital letter. 

    When we do a query like (select * from test) Oracle database take the table name in capital letter and do the query.  So there is a case sensitive issue occurred. 

    So Finally, good practice is creating table without Quotation mark. If you create table with Quotation mark then every time you have to write Quotation mark when you will do query.   

    test

    “test”

    create table test (

    id number,

    name varchar2(20),

    address varchar2(500)

    )

    create table "test" (

    id number,

    name varchar2(20),

    address varchar2(500)

    )

    insert into test values (1,'Qaium','Address') ;

     

    insert into "testvalues (1,'Halim','Motron') ;

     

    select * from test ; 

    select * from "test" ;


    Tuesday, November 2, 2021

    How to create list of all file name from your google drive folder !!!

    Step 1.  Create a random spreadsheet from your google account. 

    Step 2. Click on  spreadsheet Tools >> Script editor  (There will be open a new tab with javascript editor)



    Step 3. Clear the editor and Copy Pest the below code and press on save button like below image .

    function ListExportFunction() {
      var folderName = 'SEAMAP_GA_Longline'; // Google Drive Just Folder Name
      var folderlisting = 'listing of folder ' + folderName;
      
      var folders = DriveApp.getFoldersByName(folderName)
      var folder = folders.next();
      var contents = folder.getFiles();
      var contents = folder.getFiles();
      
      var ss = SpreadsheetApp.create(folderlisting);
      var sheet = ss.getActiveSheet();
      sheet.appendRow(['name','link']);
      
      var file;
      var name;
      var link;
      var row; 
      while(contents.hasNext()){
        file = contents.next();
        name = file.getName();
        link = file.getUrl();
        sheet.appendRow([name, link]);
      } };


    Step 4. Finally Run the code by clicking run button like below image.  ( In this time browser may ask for allow to access your google drive. You have to allow it. Don't worry it's google script editor so it's safe )


    Step 5. After successfully execution there will show a completed message like below image. 


    That's  All. Now Check Your Drive Home Page With Your Folder Name Including "
    listing of folder"  File Name. 



    Wednesday, October 27, 2021

    Integrating APEX with Oracle E-Business (EBS) Suite hosting in the same hostname.

    Follow the steps given below to call the APEX application from EBS

    Know About EBS (EBS User's Guide)


    Step 1: Create an Oracle Apex Application and go to Shared Components => Application Items, then create the following items,

    Application Items 

    Scope: Application

    Session State Protection: Restricted – May not be set from the browser


    Step 2: Compile the apex_global package(apex_global.check_ebs_credentials) in the APPS schema.


    Step 3: Navigate to Shared Components => Security => Authorization, and create authorization as below,

    Name: Check EBS Credentials

    Scheme Type: PL/SQL Function Returning Boolean

    PL/SQL Function Body:

    BEGIN

          RETURN apps.apex_global.check_ebs_credentials;

       END;

    Error message:  “Access not allowed: No valid E-Business Suite session.”

    Evaluation point: once per page view


    Step 4: Navigate to Shared Components => Security => Authentication and choose No Authentication scheme(This is because we are going to directly launch Oracle Apex Application from EBS. Hence here we are choosing No authentication. However, the Apex application will not allow the user to access the application when there is not a valid EBS session.) and select Authorization Scheme as Check EBS Credentials and click Apply Changes button,


    Step 5: Then Log in to Oracle E-Business Suite with the SYSADMIN user.


    Step 6: Navigate to the System Administrator responsibility > Profile > System menu option


    Step 7: Search for Profile %APEX%, click Find and for profile FND: APEX URL enter Site

    :8080/apex” >http://<EBS_Hostname>:8080/apex (replace <EBS_Hostname> with your domain name e.g. http://ebsnew.doyensys.com:8080/apex)


    Step 8: Save the profile.


    Step 9: Navigate to the System Administrator responsibility > Application > Function menu option.


    Step 10: Create a function with the following details:

    Description 

    Function: APEX_FUN

    User Function Name: APEX Extension

    Properties 

    Type: SSWA jsp function

    Web HTML 

    HTML Call: GWY.jsp?targetAppType=APEX& p=<APEX Application Id>:

    <APEX Page>:<Session>:<Request>:<Debug>:<Clear Cache>:

    <Parameter Pairs>

    { For example, to call Oracle Application Express application 104, Page 1

    use GWY.jsp?targetAppType=APEX&p=104:1:0::NO:1: , all other parameters are

    optional}


    Step 11: Add a menu component under the required Menu as shown below-

    Menu Name:  [Specify Menu Name here]

    User Menu Name : [Specify User Menu Name here]

    Menu Type: Standard

    Create menu component –

    Sequence: 1

    Prompt: Launch APEX Page

    Function: APEX Extension


    Step 12: Save the menu. 



    --Collected Source

    Monday, October 25, 2021

    Oracle User Create .dmp Export -Import

     New User Create: 

    SQL> conn / as sysdba

    Connected.

    SQL> drop user NewUserName cascade ;

    User dropped.

    SQL> create user NewUserName identified by NewUserPassword ;

    User created.

    SQL> grant dba to NewUserName ;

    Grant succeeded.

    .dmp Export: 

    $exp OldUserName/OldUserPassword owner=OldUserName

    file=C:\locationPath\Name.dmp ;

    Import: 

    $imp NewUserName/NewUserPassword  file=D:\locationPath\Name.dmp fromuser=OldUserName 

    touser=NewUserName ;



    Wednesday, July 21, 2021

    Interactive Report Column Width Change

     Interactive Report Column Width Change :

    1. Set a static id for the report region. Example, Region Static RGNID 

    2. Set a static id for the column you want to change width. Example, Column ID COLID

    3. CSS by ID will be like this. Copy pest the code into Page Inline 

    #RGNID td[headers=COLID]{min-width:300px}


    Monday, June 7, 2021

    Remove ORA from process execution error massage

    just use this code on  process properties  Error Message

    <h7 style="color: #d00;">#SQLERRM_TEXT# </h7>



    Create a Form Using Python for Save Data into Excel like a Database

    #Download Pyhton from here https://www.python.org/downloads/  #Download Python: #Click the “Download Python 3.x.x” button (the latest versio...