Showing posts with label 19c. Show all posts
Showing posts with label 19c. Show all posts

Saturday, June 25, 2022

History Option on Sqlplus

 Starting from oracle 12.2, SQL*Plus can keep the history of the commands executed.

You can enable or disable the HISTORY command in the current SQL*Plus session by using the SET HISTORY command.

You can view , delete and run statements easily , instead of scrolling up and down and copy then run previous SQL commands .This would be very useful when running multiple complex statements and you need to re-run them multiple times .


SQL> select name from v$database;

NAME

---------

JAYDEMO

SQL> show hist;

history is OFF

SQL> set hist on;

SQL> select * from global_name;

GLOBAL_NAME

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

JAYDEMO.DEMO.EXAMPLE.COM

SQL> select * from dual;

D

-

X

SQL> history

  1  select * from global_name;

  2  select * from dual;


By default , history keep record of last 100 commands , if you need to increase it , you can do the following :

SQL> set history 1500

SQL> show history

History is ON and set to “1500”


How to automatically turn on this option

But Turing on history every time we login to sqlplus would be challenging. so we can leverage glogin.sql (or) login.sql which would execute the statement we defined every time we login.

The Site Profile file, glogin.sql, for site wide settings. -  $ORACLE_HOME/sqlplus/admin/glogin.sql

Additionally, the User Profile, login.sql, sets user specific settings.  (sqlplus takes the file under $ORACLE_PATH)


Please add below entries in either glogin.sql (or) login.sql 

set hist on;

set history 1000   

Sunday, November 15, 2020

EBS 12.2: Autoconfig/Sqlplus connection is faling with ORA-28547 on 19c





Issue: 

Receiving   "ORA-28547: connection to server failed, probable Oracle Net admin error"  while running autoconfig (or) connecting via sqlplus  after sourcing CDB (or) PDB env file.

Cause:

Missing $ORACLE_HOME/nls/data/9idata directory

Solution:
 
On the database server node, as the owner of the Oracle RDBMS file system and database instance, run the following command to create the $ORACLE_HOME/nls/data/9idata directory.

$ perl $ORACLE_HOME/nls/data/old/cr9idata.pl

After creating the directory, make sure that the ORA_NLS10 environment variable is set to the full path of the 9idata directory whenever you enable the 19c Oracle home.

Now re-run the autoconfig & make sure it completes without any issues.

How to Compile Forms , Reports & Custom.pll in R12.2

How to Compile Custom.pll   cd $AU_TOP/resource  cp CUSTOM.plx CUSTOM.plx_bkup  cp CUSTOM.pll CUSTOM.pll_bkup  frmcmp_batch module=CUSTOM.pl...