Archive for April, 2018

Select Number And Convert Number From English To Arabic In Oracle

April 23rd, 2018, posted in Oracle Queries
Share
CREATE FUNCTION numToEasternArabic(
  in_value IN NUMBER
) RETURN NVARCHAR2 DETERMINISTIC
IS
  p_num  VARCHAR2(100) := TO_CHAR( in_value );
  p_char CHAR(1);
  o_str  NVARCHAR2(100);
BEGIN
  FOR i IN 1 .. LENGTH( p_num ) LOOP
    p_char := SUBSTR( p_num, i, 1 );
    o_str := o_str
          || CASE p_char
             WHEN '.'
             THEN N'.'
             ELSE UNISTR(
                    '\' || TO_CHAR(
                             TO_NUMBER( p_char ) + 660,
                             'FM0000'
                           )
                  )
             END;
  END LOOP;
  RETURN o_str;
END;
/


Query 1:

SELECT numToEasternArabic( 1438 )
FROM   DUAL

Results:

| NUMTOEASTERNARABIC(1438) |
|--------------------------|
|                     ١٤٣٨ |
 
Share

Make Yourself so Strong And Fit

April 21st, 2018, posted in Allama Iqbal, DAtEs iN a YeAR
Share

Allama, Allama Iqbal, but to be something, ego, human, human being, Iqbal, not to see something, paani-paani-kar-gayi, Pakistan, poet, poetry, shairi, Ultimate aim, urdu, urdu poetry

Share

The Dua Of Rasullulah(saw) In The Month Of Rajab And Shaban

April 19th, 2018, posted in Rajab
Share

The Dua Of Rasullulah(saw) In The Month Of Rajab And Shaban,The Dua,In The Month Of Rajab And Shaban,The Dua In The Month Of Rajab And Shaban,Rajab And Shaban,Rajab,Shaban,Islamic Months,Holy Prophet sayings,Holy Prophet sayings,

It is mentioned on the authority of Anas Bin Malik (May Allah be pleased with him) that when the Holy Prophet (SAW) sighted the moon of Rajab, he used to pray to Allah in the following words,

‘Allahuma Barik lana fi Rajaba wa Sha’bana wa ballighna Ramadhan’

“O Allah, make the months of Rajab and Sha’ban blessed for us, and let us reach the month of Ramadan (i.e. prolong our life up to Ramadan, so that we may benefit from its merits and blessings).”

Share

Teach Me And I will Remember

April 17th, 2018, posted in DAtEs iN a YeAR, MESSAGEs
Share

Teach Me And I will Remember

Share

Change Oracle Database Character Set WE8MSWIN1252 to AL32UTF8

April 15th, 2018, posted in Oracle Queries
Share

How to change Oracle database character set WE8MSWIN1252 to AL32UTF8,Oracle database character set WE8MSWIN1252 to AL32UTF8.How to change Oracle database character set WE8MSWIN1252,How to change Oracle database character set AL32UTF8,How to change Oracle database character set english to arabic,Oracle dba,oracle apps dba,oracle database character set,oracle database, character set,nls database parameters,database parameters,oracle nls database parameters,oralce NLS LANGUAGE,Oracle database NLS LANGUAGE

 

 

 

 

 

 

 

 

 

 

 

 

Changing character set for Oracle database.

My scenario is to support Arabic data format.

My existing oracle database character set is : WE8MSWIN1252

My requirement is to change this character set to  AL32UTF8 ( Which will support Arabic format)

Step :1

Set your ORACLE_HOME and SID .

Windows :

SET  ORACLE_HOME= E:\app\7stl\product\11.1.0\db_1

SET SID=ORCL

Linux : Use export command to set ORACLE_HOME and SID.
How to change Oracle database character set WE8MSWIN1252 to AL32UTF8,Oracle database character set WE8MSWIN1252 to AL32UTF8.How to change Oracle database character set WE8MSWIN1252,How to change Oracle database character set AL32UTF8,How to change Oracle database character set english to arabic,Oracle dba,oracle apps dba,oracle database character set,oracle database, character set,nls database parameters,database parameters,oracle nls database parameters,oralce NLS LANGUAGE,Oracle database NLS LANGUAGE

 

 

 

Step 2 :

Connect sqlplus through command prompt.

Enter user name as below shown in screenshot.
user-name:    / as sysdba

How to change Oracle database character set WE8MSWIN1252 to AL32UTF8,Oracle database character set WE8MSWIN1252 to AL32UTF8.How to change Oracle database character set WE8MSWIN1252,How to change Oracle database character set AL32UTF8,How to change Oracle database character set english to arabic,Oracle dba,oracle apps dba,oracle database character set,oracle database, character set,nls database parameters,database parameters,oracle nls database parameters,oralce NLS LANGUAGE,Oracle database NLS LANGUAGE

 

 

 

step 3:

Shutdown your database immediate or normal by using below command.

shutdown normal
How to change Oracle database character set WE8MSWIN1252 to AL32UTF8,Oracle database character set WE8MSWIN1252 to AL32UTF8.How to change Oracle database character set WE8MSWIN1252,How to change Oracle database character set AL32UTF8,How to change Oracle database character set english to arabic,Oracle dba,oracle apps dba,oracle database character set,oracle database, character set,nls database parameters,database parameters,oracle nls database parameters,oralce NLS LANGUAGE,Oracle database NLS LANGUAGE

 

 

Step 4 :

mount your database by using below command

startup mount

How to change Oracle database character set WE8MSWIN1252 to AL32UTF8,Oracle database character set WE8MSWIN1252 to AL32UTF8.How to change Oracle database character set WE8MSWIN1252,How to change Oracle database character set AL32UTF8,How to change Oracle database character set english to arabic,Oracle dba,oracle apps dba,oracle database character set,oracle database, character set,nls database parameters,database parameters,oracle nls database parameters,oralce NLS LANGUAGE,Oracle database NLS LANGUAGE

 

 

 

 

step 5:

Now execute below commands

SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION;
System altered.

SQL> ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
System altered.

SQL> ALTER SYSTEM SET AQ_TM_PROCESSES=0;
System altered.

How to change Oracle database character set WE8MSWIN1252 to AL32UTF8,Oracle database character set WE8MSWIN1252 to AL32UTF8.How to change Oracle database character set WE8MSWIN1252,How to change Oracle database character set AL32UTF8,How to change Oracle database character set english to arabic,Oracle dba,oracle apps dba,oracle database character set,oracle database, character set,nls database parameters,database parameters,oracle nls database parameters,oralce NLS LANGUAGE,Oracle database NLS LANGUAGE

 

 

 

 

 

Step 6:

SQL> ALTER DATABASE OPEN;
Database altered.

How to change Oracle database character set WE8MSWIN1252 to AL32UTF8,Oracle database character set WE8MSWIN1252 to AL32UTF8.How to change Oracle database character set WE8MSWIN1252,How to change Oracle database character set AL32UTF8,How to change Oracle database character set english to arabic,Oracle dba,oracle apps dba,oracle database character set,oracle database, character set,nls database parameters,database parameters,oracle nls database parameters,oralce NLS LANGUAGE,Oracle database NLS LANGUAGE

 

 

Step 7:

Now change the character set by using below command.

ALTER DATABASE CHARACTER SET AL32UTF8;

If you facing this error ” ORA-12712: new character set must be a superset of old character set”
use below command to overcome from this issue.

ALTER DATABASE CHARACTER SET INTERNAL_USE AL32UTF8;

If you facing below error while executing above command then follow below steps:

ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-30556: functional index is defined on the column to be modified

Execute this command first then followed by character set command.

How to change Oracle database character set WE8MSWIN1252 to AL32UTF8,Oracle database character set WE8MSWIN1252 to AL32UTF8.How to change Oracle database character set WE8MSWIN1252,How to change Oracle database character set AL32UTF8,How to change Oracle database character set english to arabic,Oracle dba,oracle apps dba,oracle database character set,oracle database, character set,nls database parameters,database parameters,oracle nls database parameters,oralce NLS LANGUAGE,Oracle database NLS LANGUAGE

 

 

 

SQL> alter system set “_system_trig_enabled”=FALSE

System altered.

Step 8:

SQL> ALTER DATABASE CHARACTER SET INTERNAL_USE AL32UTF8;

Database altered.

How to change Oracle database character set WE8MSWIN1252 to AL32UTF8,Oracle database character set WE8MSWIN1252 to AL32UTF8.How to change Oracle database character set WE8MSWIN1252,How to change Oracle database character set AL32UTF8,How to change Oracle database character set english to arabic,Oracle dba,oracle apps dba,oracle database character set,oracle database, character set,nls database parameters,database parameters,oracle nls database parameters,oralce NLS LANGUAGE,Oracle database NLS LANGUAGE

 

 

Step 9:

SQL> SHUTDOWN NORMAL;
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> STARTUP;

How to change Oracle database character set WE8MSWIN1252 to AL32UTF8,Oracle database character set WE8MSWIN1252 to AL32UTF8.How to change Oracle database character set WE8MSWIN1252,How to change Oracle database character set AL32UTF8,How to change Oracle database character set english to arabic,Oracle dba,oracle apps dba,oracle database character set,oracle database, character set,nls database parameters,database parameters,oracle nls database parameters,oralce NLS LANGUAGE,Oracle database NLS LANGUAGE

 

 

 

 

 

Now query your Database to confirm the change in CHARACTER SET.

Use below query :

select * from database_properties where PROPERTY_NAME in (‘NLS_CHARACTERSET’,  ‘NLS_NCHAR_CHARACTERSET’);

How to change Oracle database character set WE8MSWIN1252 to AL32UTF8,Oracle database character set WE8MSWIN1252 to AL32UTF8.How to change Oracle database character set WE8MSWIN1252,How to change Oracle database character set AL32UTF8,How to change Oracle database character set english to arabic,Oracle dba,oracle apps dba,oracle database character set,oracle database, character set,nls database parameters,database parameters,oracle nls database parameters,oralce NLS LANGUAGE,Oracle database NLS LANGUAGE

 

 

 

 

 

 

Your character set has changed successfully.

Share