Monday, June 25, 2018

oracle forms 10g configuration

Installation oracle dev suitehome_1 (oracle developer suite 10)
After successfully installed then configure some file
11      Open default.env file from location
22       G:/devsuitehome_1 /forms/server/default.env
33      Formsweb.cfg
44     Install java jre-6u45-windows-i586.exe
55     Run jinit file
66     Open forms builder and go edit and preference put browse address
77     baseHTMLjinitiator=basejini.htm
88     #baseHTMLjinitiator=basejpi.htm <<<<<<<<<<<<
99 basejini.htm  replace  basejpi.htm

Thursday, March 29, 2018

ORA-00054: resource busy and acquire with NOWAIT specified



Resource busy and acquire with NOWAIT specified :ORA-00054



You can also look up the sql,username,machine,port information and get to the actual process which holds the connection

first select the busy session and then kill the busy session with below query

SELECT
    O.OBJECT_NAME,
    S.SID,
    S.SERIAL#,
    P.SPID,
    S.PROGRAM,
    SQ.SQL_FULLTEXT,
    S.LOGON_TIME
FROM
    V$LOCKED_OBJECT L,
    DBA_OBJECTS O,
    V$SESSION S,
    V$PROCESS P,
    V$SQL SQ
WHERE
    L.OBJECT_ID = O.OBJECT_ID
    AND L.SESSION_ID = S.SID
    AND S.PADDR = P.ADDR
    AND S.SQL_ADDRESS = SQ.ADDRESS
   
    alter system kill session 'SID,SERIAL#';
   
    alter system kill session '378,11329'
    alter system kill session '19,13583'

Saturday, February 10, 2018

ORA-01031: insufficient privileges when Toad 11.6 connect to an Oracle 12c database


ORA-01031 When Connecting To 12c Database With Toad



When attempting to connect via Toad 11.6 to an Oracle 12c database, create any table, create any script, show any view, any scritp that time  toad application  through very annoying message “ORA-01031: insufficient privileges”

For any kind of change in database give

 ORA-01031: insufficient privileges

clicking  “OK ” in Toad, it looks  to connect to the database but not working anything  . just come a screen and still nothing show  

The ora-error code
ORA-01031   only happens when using Toad 11.6 version . It does not occur in SQL*Plus, oracle SQL Developer or any other versions of Toad.


Solution

Access to SYS.USER$ has been restricted in Oracle 12c (for oracle 12c  security , role, privilege, references doc  https://docs.oracle.com/database/121/DBSEG/E48135-19.pdf)
The issue can be resolved by granting access to the SYS.USER$ table to the related user /schemas:
GRANT SELECT ON SYS.USER$ TO <user>;
For grant the privilege login as sys dba

Sqlplus sys/sys_password@orcl  as sysdba
SQL> GRANT SELECT ON SYS.USER$ TO <user_name>;

Grant succeeded.
Reference Oracle Doc ID 1958777.1)

Monday, January 15, 2018

ORA-22858: invalid alteration of datatype


 SQL> set define offSQL> ALTER TABLE PMIS.RM_WRITTEN_EXAM_SCHEDULE
MODIFY(ADMIT_CARD_CONDITION NCLOB)ALTER TABLE PMIS.RM_WRITTEN_EXAM_SCHEDULE
MODIFY(ADMIT_CARD_CONDITION NCLOB)
Error at line 3
ORA-22858: invalid alteration of datatype
Script Terminated on line 3.


Solution:  Just create a new field with desire data type and then alter the table to copy old field value and then drop the old field and then rename new field with old field .


ORA-22858: invalid alteration of datatype Solution.


ALTER TABLE RM_WRITTEN_EXAM_SCHEDULE ADD (NEW_1 NCLOB);
UPDATE RM_WRITTEN_EXAM_SCHEDULE SET NEW_1 = OLD_1;
ALTER TABLE RM_WRITTEN_EXAM_SCHEDULE DROP COLUMN OLD_1;
ALTER TABLE RM_WRITTEN_EXAM_SCHEDULE RENAME COLUMN NEW_1 TO OLD_1;




ALTER TABLE RM_WRITTEN_EXAM_SCHEDULE ADD (ADMIT_CARD_CONDITION_1 NCLOB);
UPDATE RM_WRITTEN_EXAM_SCHEDULE SET ADMIT_CARD_CONDITION_1 = ADMIT_CARD_CONDITION;
ALTER TABLE RM_WRITTEN_EXAM_SCHEDULE DROP COLUMN ADMIT_CARD_CONDITION;
ALTER TABLE RM_WRITTEN_EXAM_SCHEDULE RENAME COLUMN ADMIT_CARD_CONDITION_1 TO ADMIT_CARD_CONDITION;

Saturday, August 26, 2017

how to write bangla in oracle 12c weblogic database on windows10

ORACLE BANGLA FONT SET UP FOR WINDOWS 10

1.DOWNLOAD SolaimanLipi.ttf
download url:https://www.omicronlab.com/bangla-fonts.html
2.Install SolaimanLipi.ttf
3. go to windows c and [search fonts]
    C> write Fonts [pest solaimanlipi.ttf]
   
4.C:\Program Files (x86)\Java\jre1.8.0_144\lib\fonts
SolaimanLipi.ttf

If JDK same as jre
C:\Program Files (x86)\Java\jdk1.8.0_144\jre\lib\fonts
SolaimanLipi.ttf

5.  E> Oracle > [search registry.dat]
E:\app\oracle\config\domains\frm\config\fmwconfig\servers\WLS_FORMS\applications\formsapp_12.2.1\config\oracle\forms\registry
default.fontMap.defaultFontname=[SolaimanLipi]
default.fontMap.defaultSize=900
default.fontMap.defaultStyle=PLAIN
default.fontMap.defaultWeight=PLAIN


default.fontMap.appFontnames=Courier New,Courier,courier,System,Terminal,Fixed,Fixedsys,Times,Times New Roman,MS Sans Serif,Arial,Vrinda,SolaimanLipi
default.fontMap.javaFontnames=MonoSpaced,MonoSpaced,MonoSpaced,Dialog,MonoSpaced,Dialog,Dialog,Serif,Serif,Dialog,SansSerif,SolaimanLipi

write end of line , solaimanlipi


For Report Configuration

E:\app\oracle\config\domains\frm\config\fmwconfig\components\ReportsToolsComponent\reptools1\tools\COMMON

uifont.ali



Go to Oracle folder and search [fonts]
pset solaimanlipi all fonts folder.
E:\app\oracle\product\12.1.0\dbhome_1\javavm\lib\fonts
Pest SolaimanLipi font

E:\app\oracle\product\12.1.0\dbhome_1\jdk\jre\lib\fonts
E:\app\oracle\product\Mid_home\oracle_common\rda\da\public_html\ui\fonts
E:\app\oracle\product\Mid_home\oracle_common\jdk\jre\lib\fonts

E:\app\oracle\config\domains\frm\reports\fonts
E:\app\oracle\JDK\jre\lib\fonts


Run >regedit

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
search NLS_LANG
ALL PLACE CHANGE UTF8 [ASIAN LNS_LANG MODEL ULT32UTG IS USED FOR EUPOR, AMERICA UNICODE FONT , FOR ASIAN FONT UTF8]

jUST replace[AMERICAN_AMERICA.UTF8] all oracle LNS_LANG

Sunday, July 16, 2017

UDE-12560: operation generated ORACLE error 12560 ORA-12560: TNS:protocol adapter error

When I export from my oracle 12c database i got
 UDE-12560: operation generated ORACLE error
 12560 ORA-12560: TNS:protocol adapter error


I set everything  on my windows machine.

from command promp(CMD)
C:> set ORACLE_SID=ORCL
C:> loging sqlplus /nolog

sql> conn sys / as sysdba
UDE-12560: operation generated ORACLE error
 12560 ORA-12560: TNS:protocol adapter error

But found getting this error.

Solution for this error:
UDE-12560: operation generated ORACLE error
 12560 ORA-12560: TNS:protocol adapter error


Solution: LSNRCTL FROM COMMAND PROMPT


C:>set oracle_sid=ORCL
C:> LSNRCTL
 
LSNRCTL> status
LSNRCTL> stop
LSNRCTL> start


Go windows machine services:

restart oracle services
restart tns services.

Then I ran again expdp command and chill
Now  below error vanish!!!!
UDE-12560: operation generated ORACLE error
 12560 ORA-12560: TNS:protocol adapter error





Wednesday, June 14, 2017

Recovering database after loss of current controlfile



Recovering database after loss of current controlfile

In this scenario we will be recovering the database after loss of current control file. We assume that database is in archive log mode and all the datafile, online redo log files and archive log files are intact.
Same steps holds good even if the database is in no archive log mode.
1) Database is in archive log mode here. But archivelog mode does not matter. These steps holds good even if the database is not in archive log mode.

bash-2.05$ sqlplus “/as sysdba”

SQL*Plus: Release 10.2.0.1.0 – Production on Thu Jun 12 05:51:04 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /dy/oracle/product/db10g/archive/htmldb
Oldest online log sequence 71
Next log sequence to archive 73
Current log sequence 73
SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options

2) Remove the control files from file system.
bash-2.05$ ls
htmldb redo02.log system01.dbf test_control2
htmldb01.dbf redo03.log temp01.dbf undotbs01.dbf
redo01.log sysaux01.dbf test_control1
bash-2.05$ rm test_control*

After doing this database will crash after some time, when ever any background process needs to update the control file, it wont find the same and DB will crash.
3) Create a “create control file script”. This can be obtained using “Alter database backup controlfile to trace” command if used some time back. Its a good practice to backup the control file to trace regularly when ever the structure if changed (Example when ever a datafile is added).
Create control file command is stored in crdb.sql
bash-2.05$ cat crdb.sql
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE “HTMLDB” NORESETLOGS ARCHIVELOG
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXDATAFILES 100
MAXINSTANCES 1
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ‘/dy/oracle/product/db10g/dbf/redo01.log’ SIZE 100M,
GROUP 2 ‘/dy/oracle/product/db10g/dbf/redo02.log’ SIZE 100M,
GROUP 3 ‘/dy/oracle/product/db10g/dbf/redo03.log’ SIZE 100M
— STANDBY LOGFILE
DATAFILE
‘/dy/oracle/product/db10g/dbf/system01.dbf’,
‘/dy/oracle/product/db10g/dbf/undotbs01.dbf’,
‘/dy/oracle/product/db10g/dbf/sysaux01.dbf’,
‘/dy/oracle/product/db10g/dbf/htmldb01.dbf’
CHARACTER SET US7ASCII
;

RECOVER DATABASE
ALTER SYSTEM ARCHIVE LOG ALL;
ALTER DATABASE OPEN;
ALTER TABLESPACE TEMPTS1 ADD TEMPFILE ‘/dy/oracle/product/db10g/dbf/temp01.dbf’
SIZE 20971520 REUSE AUTOEXTEND OFF;

4) Run the “Create control file” script crdb.sql.
bash-2.05$ sqlplus “/as sysdba”
SQL*Plus: Release 10.2.0.1.0 – Production on Thu Jun 12 05:55:43 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> @crdb.sql
ORACLE instance started.

Total System Global Area 1073741824 bytes
Fixed Size 1984184 bytes
Variable Size 243276104 bytes
Database Buffers 822083584 bytes
Redo Buffers 6397952 bytes

Control file created.
Media recovery complete.
System altered.
Database altered.
Tablespace altered.
SQL>
We are done. Database is now up and running. Note that this is a complete recovery. There is no loss of data, because all the data files and redo log files were intact.