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.

ORA-12712: new character set must be a superset of old character set


  ORA-12712: new character set must be a superset of old          character set             

  how to change oracle nls_characterset in 11g


Solution for ORA-12712: new character set must be a superset of old character set

Change Oracle character set from WE8MSWIN1252 to AL32UTF8 in oracle 11g R2, do the following steps:
 first Shut down the database, using either a SHUTDOWN IMMEDIATE .

[warning:Take  full backup of  your database because the ALTER DATABASE CHARACTER SET statement cannot be rolled back.]

Change Oracle character set from WE8MSWIN1252 to AL32UTF8  step by step:
 
 

SQL> SHUTDOWN IMMEDIATE .
SQL> STARTUP MOUNT;
SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION;
SQL> ALTER DATABASE OPEN;
SQL> ALTER DATABASE CHARACTER SET AL32UTF8;--if fail this command just use internal_use

in case of failure of this command

SQL>Alter database character set INTERNAL_USE AL32UTF8;
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP MOUNT ;
SQL> ALTER SYSTEM DISABLE RESTRICTED SESSION;
SQL>ALTER DATABASE OPEN;

SQL > select * from nls_database_parameters ORDER BY PARAMETER;



Practical Solution :

SQL> SHUTDOWN IMMEDIATE
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> STARTUP MOUNT;
ORACLE instance started.

Total System Global Area  763363328 bytes
Fixed Size                  2929064 bytes
Variable Size             528485976 bytes
Database Buffers          226492416 bytes
Redo Buffers                5455872 bytes
Database mounted.
SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION;

System altered.

SQL> ALTER DATABASE OPEN;

Database altered.

SQL> ALTER DATABASE CHARACTER SET AL32UTF8;
ALTER DATABASE CHARACTER SET AL32UTF8
*
ERROR at line 1:
ORA-12712: new character set must be a superset of old character set


SQL> Alter database character set INTERNAL_USE AL32UTF8;

Database altered.

SQL> SHUTDOWN IMMEDIATE;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> STARTUP MOUNT ;
ORACLE instance started.

Total System Global Area  763363328 bytes
Fixed Size                  2929064 bytes
Variable Size             528485976 bytes
Database Buffers          226492416 bytes
Redo Buffers                5455872 bytes
Database mounted.
SQL> ALTER SYSTEM DISABLE RESTRICTED SESSION;
ALTER SYSTEM DISABLE RESTRICTED SESSION

ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-01219: database or pluggable database not open: queries allowed on fixed
tables or views only


SQL> alter database disable restricted session;
alter database disable restricted session

ERROR at line 1:
ORA-00933: SQL command not properly ended


SQL> alter system disable restricted session;
alter system disable restricted session
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-01219: database or pluggable database not open: queries allowed on fixed
tables or views only


SQL> alter database open;

Database altered.



expdp ora-39213: metadata processing is not available expdp 11g




expdp ora-39213: metadata processing is not available expdp 11g

 
In Windows,maybe missing, invalid some registry key, we need to check the registry entriesin windows machine to ensure that they (key) are in a valid status.  In case you have INVALID status in dba_registry, yu have check it and try to find a solution for it.IN THIS CASE when we try expdp but oracle throw this error ORA-39213 metadata processing is not available . java, xml file error .

Symptoms

When running expdp the following errors are raised:

ORA-39006: internal error
ORA-39213: Metadata processing is not available

This error was detected while executing the DataPump in any platform.

Cause

DataPump export uses DBMS_METADATA_UTIL package but this package does not successfully run. Executing sys.dbms_metadata_util.load_stylesheets procedure failed with following error:
ORA-31609: error loading file "kualter.xsl" from file system directory "/rdbms/xml/xsl"
ORA-06512: at "SYS.DBMS_METADATA_UTIL", line 1807
ORA-06512: at line 1

This package needs XML being installed and XML needs JAVA being installed.

The select from view dba_registry shows neither Java nor XML were installed:
SQL> SELECT comp_id, version, status FROM dba_registry; 

COMP_ID                      VERSION                     STATUS
---------------------------  --------------------------- -----------
CATALOG                      10.2.0.2.0                  VALID
CATPROC                      10.2.0.2.0                  VALID

Solution

1. Install JVM and XML  executing the following scripts from sqlplus:

SQL> connect / as sysdba
SQL> @$ORACLE_HOME/javavm/install/initjvm.sql

SQL> connect / as sysdba
SQL> @$ORACLE_HOME/xdk/admin/initxml.sql

SQL> connect / as sysdba
SQL> @$ORACLE_HOME/rdbms/admin/catjava.sql

SQL> connect / as sysdba
SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql

2. Check if the scripts successfully ran:

select comp_name, version, status from dba_registry;

COMP_NAME                          VERSION                     STATUS
---------------------------------- --------------------------- -------
Oracle Database Catalog Views      10.2.0.2.0                 VALID
Oracle Database Packages and Types 10.2.0.2.0              VALID
JServer JAVA Virtual Machine       10.2.0.2.0                  VALID
Oracle XDK                         10.2.0.2.0                             VALID
Oracle Database Java Packages      10.2.0.2.0                  VALID

3. Run again sys.dbms_metadata_util.load_stylesheets from sqlplus:

connect / as sysdba
execute sys.dbms_metadata_util.load_stylesheets;
 
 
expdp bbb/ddd@ORCL schemas=niger directory=data_pump_dir dumpfile=140617.dmp logfile=exp140617.log 

Sunday, May 14, 2017

ORA-65096: invalid common user or role name oracle database 12c



              ORA-65096: invalid common user or role name



Cause: when you create a common user in oracle database 12c  it was  invalid for common users or roles. The usual rules for user and role names, common user and role names must start with C## or c## and consist only of ASCII characters.

SQL> create user tra identified by tra default tablespace users;
create user tra identified by tra default Tablespace users
            *
ERROR at line 1:
ORA-65096: invalid common user or role name










Action: Specify a valid common user or role name.
The solution to the ORA-06596 is to set a hidden parameter "_oracle_script".  When you set the undocumented (hidden) parameter "_oracle_script"=true  you can create the tra user without a C## in from of the user ID.  therefore this user will not used useful in a pluggable/container database.

SQL> alter session set "_ORACLE_SCRIPT"=true;

Session altered.


SQL> create user tra identified by tra ;

User created.

SQL> grant dba to tra;

Grant succeeded.



Tuesday, May 2, 2017

IN Oracle sql How to count different values in one column of table in Oracle 10g,11g,12c



 IN Oracle  sql How to count different values in one column of table in Oracle 10g,11g,12c


wher you want to select multiple values from single oracle filed just use the below sql query with group by clause.



"""SELECT ssc_dakhil, count(*)
FROM test_teacher_ssc_info
GROUP BY ssc_dakhil;   '''''



linux cpu core and socket count

[root@db-oracle-node1 ~]# grep -c ^processor /proc/cpuinfo
24
[root@db-oracle-node1 ~]# nproc --all
24
[root@db-oracle-node1 ~]#  lscpu | grep 'socket'
Core(s) per socket:    6

Wednesday, April 12, 2017

Counting Duplicate Record SQL on single Table

SELECT   INSTITUTE_ID, SL_NO, ROOM_NO, SIZE_NO, class_name, 
COUNT (*) dup_rec    FROM   class_rooms GROUP BY
INSTITUTE_ID, SL_NO, ROOM_NO, SIZE_NO, class_name  HAVING   COUNT (*) > 1
and INSTITUTE_ID is not null and SL_NO is not null and
ROOM_NO is not null and SIZE_NO is not null and   class_name is not null
order by INSTITUTE_ID desc, SL_NO, ROOM_NO, SIZE_NO, class_name;


























select INSTITUTE_ID, SL_NO, ROOM_NO, SIZE_NO, class_name from
class_rooms where institute_id=35065 and class_name='Six' order by institute_id;


SELECT INSTITUTE_ID, SL_NO, ROOM_NO, SIZE_NO, class_name,
COUNT(*) OVER(PARTITION BY INSTITUTE_ID, SL_NO, ROOM_NO, SIZE_NO, class_name) AS NumberOfDuplicates
FROM CLASS_ROOMS;

Tuesday, April 11, 2017

How to spool oracle sql output in xcel file

SQL> SET PAGESIZE 40000

SQL> SET FEEDBACK OFF

SQL> SET MARKUP HTML ON

SQL> SET NUM 24

SQL> SPOOL niger_duplicate.xls
 
SQL> SELECT INSTITUTE_ID,ROOM_NO, SIZE_NO,CLASS_NAME,
NO_BENCH,
NO_CHAIR,
NO_TABLE,
WRITNG_BOARD,
NO_FAN,
NO_LIGHT,
PARTITION_TYPE,
SL_NO,
MULTIMEDIA,
IS_ELECTRICITY
FROM class_rooms 
GROUP BY SIZE_NO,
CLASS_NAME,
NO_BENCH,
NO_CHAIR,
NO_TABLE,
WRITNG_BOARD,
NO_FAN,
NO_LIGHT,
PARTITION_TYPE,
INSTITUTE_ID,
SL_NO,
ROOM_NO,
MULTIMEDIA,
IS_ELECTRICITY 
HAVING count(*) > 1
order by SL_NO,institute_id;  


SQL>

SQL>SPOOL OFF

SQL>SET MARKUP HTML OFF

SQL>SPOOL OFF
 
 you can find the spool output in your current directory.
default directory  
 

Monday, March 20, 2017

ORA-09925: Unable to create audit trail file Linux-x86_64 Error: 2: No such file or directory Additional information: 9925

[oracle@dr dbs]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Sun Mar 19 20:11:28 2017

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> create spfile from pfile;


SQL> startup;
ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 9925


Go to oracle parameter file and check the audit trail file directory name : (in this case i have wrong i put small letter directory but actual directory will be capitap letter i just change audit trail directory name in Capital letter which have actual one)


[oracle@dr ~]$ cd /u01/app/oracle/product/12.1.0.2/db_1/dbs/
[oracle@dr dbs]$ ls
hc_orcl.dat  hc_stby.dat  initstby.ora  lkDUMMY  orapwstd
[oracle@dr dbs]$ cat initstby.ora
orcl.__data_transfer_cache_size=0
orcl.__db_cache_size=142606336
orcl.__java_pool_size=4194304
orcl.__large_pool_size=8388608
orcl.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
orcl._oracle_home='$ORACLE_BASE/product/12.1.0.2/db_1'
orcl.__pga_aggregate_target=394264576
orcl.__sga_target=335544320
orcl.__shared_io_pool_size=12582912
orcl.__shared_pool_size=159383552
orcl.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
*.audit_trail='db'
*.compatible='12.1.0.2.0'
*.control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/re                                       covery_area/orcl/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_file_name_convert='stby','orcl'
*.db_name='orcl'
*.db_unique_name='stby'
*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=4560m
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.fal_server='ORCL'
*.local_listener='LISTENER_ORCL'
*.log_archive_config='DG_CONFIG=(orcl,stby)'
*.log_archive_dest_2='SERVICE=orcl NOAFFIRM ASYNC VALID_FOR=(ONLINE_LOGFILES,PRI  MARY_ROLE) DB_UNIQUE_NAME=ORCL'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_format='%t_%s_%r.arc'
*.log_archive_max_processes=30
*.log_file_name_convert='stby','orcl'
*.memory_target=696m
*.open_cursors=300
*.processes=300
*.remote_login_passwordfile='EXCLUSIVE'
*.standby_file_management='AUTO'
*.undo_tablespace='UNDOTBS1'
[oracle@dr dbs]$ vi initstby.ora
[oracle@dr dbs]$ vi initstby.ora
[oracle@dr dbs]$ cd
[oracle@dr ~]$ export ORACLE_HOME
[oracle@dr ~]$ export ORACLE_SID
[oracle@dr ~]$ . .bash_profile
[oracle@dr ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Sun Mar 19 21:19:30 2017

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  729808896 bytes
Fixed Size                  2928680 bytes
Variable Size             557846488 bytes
Database Buffers          163577856 bytes
Redo Buffers                5455872 bytes

Sunday, March 19, 2017

REMAP_SCHEMA import one schema data to different name another schema data

 

IF you want to copy your one database schema to another same metadata and all dml datain another different database but different name schema you just import with following command


Syntax and Description
REMAP_SCHEMA=source_schema:target_schema



expdp system/abc123 SCHEMAS=hr DIRECTORY=DATA_PUMP_DIR DUMPFILE=hr.dmp version=11.1.0.6.0 (if version incompatible)



impdp system DIRECTORY=DATA_PUMP_DIR DUMPFILE=BBS_PDS19032017.dmp REMAP_SCHEMA=hr:scott


For Reference:https://docs.oracle.com/database/121/SUTIL/GUID-619809A6-1966-42D6-9ACC-A3E0ADC36523.htm#SUTIL927

ORA-01940: cannot drop a user that is currently connected

SQL>  drop user SID;
 drop user SID
*
ERROR at line 1:
ORA-01940: cannot drop a user that is currently connected


SQL> select sid,serial# from v$session where username = 'SID';

       SID    SERIAL#
---------- ----------
       125       2058

SQL> ALTER SYSTEM KILL SESSION '125,2058#';
ALTER SYSTEM KILL SESSION '125,2058#'
*
ERROR at line 1:
ORA-00026: missing or invalid session ID


SQL> ALTER SYSTEM KILL SESSION '125,2058';

System altered.

SQL> select sid,serial# from v$session where username = 'SID';

       SID    SERIAL#
---------- ----------
       125       2058

SQL> drop user SID;

User dropped.

Saturday, March 18, 2017

ORA-01078: failure in processing system parameters

When you getting ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file "String"  Dont be upset.


ora-01078
Ora-01078


Just execute /load oracle bash_profile
. .bash_profile

[oracle@dcAdg ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Thu Mar 16 22:03:45 2017

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

If you have Two database on same oracle_home , that means you create new database with dbca

you need to load /execute bash_profile .
set environment SET ORACLE_SID=ORCL
[oracle@dcAdg ~]$ . oraenv
ORACLE_SID = [orcl] ? orcl

sqlplus / as sysdba

You may loging first database with default bash_profile .

If you set another database environment you can create another bash_script:

mkdir valut
vim  orasidpds.sh

Writer following line with new database sid (just copy bash_profile line and changed only oracle_sid):

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1; export ORACLE_HOME
ORACLE_SID=sidpds; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH; export PATH

.


When you want to loging new database just execute the orasidpds.sh script.

.orasidpds.sh



When oracle database startup that time control file check its all file , database, datafile location , sid .
this information are write on spfile, parameter file . database first find spfile for verify its initialization parameter if not found spfile data then go to pfile for initialization . so for risk free you can create a pfile from spfile where mirror copy keep for start up database.




 

Sunday, February 26, 2017

oracle Backup policy


Taleo does 3 actions to backup production zones in its standard backup policy.
Backup data is kept on disk storage.  Backup Policy (Doc ID 1046592.1)

Oracle RMAN

  • Used for short term backups (30 days retention).
  • One full backup a week. For most customers, this is done on Friday or Saturday.
  • Two incremental backups per week, usually on Tuesday / Thursday or on Wednesday / Friday.
  • 6 backups of archive logs (transactions) per day.
  • These backups allows for an exact point in time recovery to be performed.

Oracle Data Pump

  • A full database export usually performed on Friday (weekly).
  • 60 days retention.
  • Copied on Tier 2 (local) and Tier 3 storage locations.

Oracle Data Guard

  • All transactions replicated to physical standby databases in Data Replication sites.

Backup Restoration

  • A database recovery is a billable service and requires a Statement of Work (SOW). Communicate with the Client Success Specialist (CSS / CE) for more information on creating this SOW.
  • During a restore, all data on the target zone is replaced by the backup's. It is not possible to restore only specific entities; the whole schema is replaced when applying the backup.
  • Any change or new data between the time the backup was taken and the moment the restore is applied is lost.

most important guidelines regarding Data Pump compatibility


The following are the most important guidelines regarding Data Pump compatibility:
1. The compatibility level of the Data Pump dumpfile set is determined by the compatibility level of the source database.

2. Use the Export Data Pump client (expdp) that matches the version of the source database (up to one major version lower expdp client can be used, but this is not recommended).

3. Use the Import Data Pump client (impdp) that matches the version of the target database (up to one major version lower impdp client can be used, but this is not recommended).

4. Use the Export Data Pump parameter VERSION in case the target database has a lower compatibility level than the source database.

5. Transferring data over a database link is supported even if the compatibility level of the (remote) source database differs from the (local) connected database (up to one major version difference is supported).

6. Import Data Pump can always read Export Data Pump dumpfile sets created by older versions of the database.

7. Export dumpfiles created with the Export Data Pump client (expdp) cannot be read by the original Import client (imp).

8. Export dumpfiles created with the original Export client (exp) cannot be read by the Import Data Pump client (impdp).

Saturday, February 25, 2017

List of background Processes in Oracle Database 12c

Acronym

Process Name
Description
Required for basic DB operation
Started by default
New in this release
ABMR
Auto BMR Background Process
Coordinates execution of tasks such as filtering duplicate block media recovery requests and performing flood control.
No
No
No
APnn
Logical Standby / Streams Apply Process Coordinator Process
Obtains transactions from the reader server and passes them to apply servers
No
No
No
ARC 0..t
Archiver Process (30 possible)
Copies the redo log files to archival storage when they are full or an online redo log switch occurs
No
No
No
BMRn
Automatic Block Media Recovery Slave Pool Process
Fetches blocks from a real-time readable standby database
No
No
No
BW nn
Database Writer Process (20 possible)
Writes modified blocks from the database buffer cache to the data files. The names of the 37th through 100th Database Writer Processes are BW36-BW99. See DBWn for more information on these processes.
Yes
Yes
Yes
CJQ0
Job Queue Coordinator Process
Spawns slave processes (Jnnn) to execute jobs in the queue.
No
Yes
No
CKPT
Checkpoint Process
Signals DBWn at checkpoints and updates all the data files and control files of the database to indicate the most recent checkpoint
Yes
Yes
No
CPnn
Database Capture Process
Captures database changes from the redo log by using the infrastructure of LogMiner.
No
No
No
CSnn
Streams Propagation Sender Process
Sends LCRs to a propagation receiver.
No
No
No
CSnn
I/O Calibration Process
Issues I/Os to storage as part of storage calibration. There is one slave process per CPU on each node of the database.
Yes
Yes
No
CTWR
Change Tracking Writer Process
Tracks changed data blocks as part of the Recovery Manager block change tracking feature
No
No
No
DBRM
Database Resource Manager Process
Sets resource plans and performs other Resource Manager tasks.
No
Yes
No
DBW 0..j
Database Writer Process
Writes modified blocks from the database buffer cache to the data files. There can be 1 to 100 Database Writer Processes. The names of the first 36 Database Writer Processes are DBW0-DBW9 and DBWa-DBWz. The names of the 37th through 100th Database Writer Processes are BW36-BW99.
Yes
Yes
No
DIA0
Diagnostic Process 0 (although 10 possible, only 0 is currently used)
Responsible for hang detection and deadlock resolution. Triggers DIAG to perform diagnostic tasks.
Yes
Yes
No
DIAG
Diagnostic Capture Process
Performs diagnostic dumps and executes global oradebug commands.
Yes
Yes
No
DMnn
Data Pump Master Process
Coordinates the Data Pump job tasks performed by Data Pump worker processes and handles client interactions.
No
No
No
Dnnn
Dispatcher Process
In a Shared Server configuration, dispatchers place connection requests in a connection request queue.
No
Yes
No
DWnn
Data Pump Worker Process
Performs Data Pump tasks as assigned by the Data Pump Master Process.
No
No
No
EMNC
EMON Coordinator Process
Coordinates the event management and notification activity in the database, including Streams Event Notifications, Continuous Query Notifications, and Fast Application Notifications. Spawns Ennn processes.
No
No
No
Ennn
EMON Slave Process
Performs database event management and notifications.
No
No
No
FBDA
Flashback Data Archiver Process
Archives historical rows for tracked tables into flashback data archives and manages archive space, organization, and retention
No
No
No
FMON
File Mapping Monitor Process
Spawns FMPUTL, an external non-Oracle Database process that communicates with the mapping libraries provided by storage vendors. Responsible for managing the mapping information.
No
No
No
GEN0
General Task Execution Process
Performs required tasks including SQL and DML.
Yes
Yes
No
Innn
Disk and Tape I/O Slave Process
Serves as an I/O slave process spawned on behalf of DBWR, LGWR, or an RMAN backup session.
No
No
No
Jnnn
Job Queue Slave Processes
Processes jobs in the queue. Spawned by CJQ0.
No
Yes
No
LGn
Log Writer Slave
On multiprocessor systems, LGWR creates slave processes to improve the performance of writing to the redo log. LGWR slaves are not used when there is a SYNC standby destination.
No
No
Yes
LGWR
Log Writer Process
Writes the log buffer out to the redo logs.
Yes
Yes
No
Lnnn
Pooled Server Process
Handles client requests in Database Resident Connection Pooling.
No
No
No
LREG
Listener Registration Process
LREG notifies the listeners about instances, services, handlers, and endpoint.
Yes
Yes
Yes
MMAN
Memory Manager Process
Serves as the SGA Memory Broker and coordinates the sizing of the memory components.
No
Yes
No
MMNL
Manageability Monitor Lite Process
Performs frequent and lightweight manageability-related tasks, such as session history capture and metrics computation.
No
Yes
No
MMON
Manageability Monitor Process
Collects statistics for the Automatic Workload Repository.
No
Yes
No
Mnnn
MMON Slave Process
Performs manageability tasks on behalf of MMON.
No
No
No
MSnn
LogMiner Worker Process
Reads redo log files and translates and assembles into transactions.
No
No
No
Nnnn
Connection Broker Process
Monitors idle connections and hands off active connections in Database Resident Connection Pooling
No
No
No
OFSD
Oracle File Server Background Process
This background process listens for new file system requests, both management (like mount, unmount, and export) and I/O requests, and executes them using Oracle threads.
Yes
Yes
No
PMON
Process Monitor
Recovers failed process resources. If Shared Server architecture is used, PMON monitors and restarts any failed dispatcher or server processes.
Yes
Yes
No
Pnnn
Parallel Query Slave Process
Started and stopped as needed to participate in parallel query operations.
No
No
No
PRnn
Parallel Recovery Process
Performs tasks assigned by the coordinator process performing parallel recovery
No
No
No
PSP0
Process Spawner Process
Starts and stops Oracle processes. Reduces workload of RBAL by starting / stopping ASM rebalance slaves.
No
Yes
No
RCBG
Result Cache Background Process
Supports SQL query and PL/SQL function result caches.
No
No
No
RECO
Recoverer Process
Resolves failures involving distributed transactions.
No
Yes
No
RM
RAT Masking Slave Process
This background process is used with Data Masking and Real Application Testing.
No
Yes
Yes
RPnn
Capture Processing Worker Process
Processes a set of workload capture files.
No
No
No
RPOP
Instant Recovery Repopulation Daemon
Responsible for re-creating and/or repopulating data files from snapshot files and backup files. The RPOP process is responsible for re-creating and repopulating data files from snapshots files. It works with the instant recovery feature to ensure immediate data file access. The local instance has immediate access to the remote snapshot file's data, while repopulation of the recovered primary data files happens concurrently. Any changes in the data are managed between the instance's DBW processes and RPOP to ensure the latest copy of the data is returned to the user.
No
No
Yes
RVWR
Recovery Writer Process
Writes flashback data to flashback database logs in the flash recovery area.
No
No
No
SAnn
SG Allocator
A small fraction of SGA is allocated during instance startup. The SAnn process allocates the rest of SGA in small chunks. The process exits upon completion of SGA allocation.
No
Yes
Yes
SMCO
Space Management Coordinator Process
Coordinates the execution of various space management related tasks, such as proactive space allocation and space reclamation.
No
Yes
No
SMON
System Monitor Process
Performs critical tasks such as instance recovery and dead transaction recovery, and maintenance tasks such as temporary space reclamation, data dictionary cleanup, and undo tablespace management
Yes
Yes
No
Snnn
Shared Server Process
In a Shared Server configuration, shared servers check a connection request queue (populated by dispatchers) and services the connection requests.
No
Yes
No
VKRM
Virtual Scheduler for Resource Manager Process
Serves as centralized scheduler for Resource Manager activity.
No
Yes
No
VKTM
Virtual Keeper of Time Process
Responsible for providing a wall-clock time (updated every second) and reference-time counter (updated every 20ms and available only when running at elevated priority).
Yes
Yes
No
Wnnn
Space Management Slave Process
These are slave processes spawned by SMCO to execute space management tasks.
No
Yes
No

which process starts first when instance is started?

The first process that will be started when we start instance is PSP process. This is called PROCESS SPAWNER.  This process is introduced in 10g and is responsible for creating and managing other oracle backgroung processes.
As the name specifies, this process can spawn so that you will see the process name as PSP0 in alert log file.

Monday, January 16, 2017

Not Paid Last Month salary



Respected Sir

 I am completing my last month's work with my admirable & Prominent Company ”    Spectrum Engineering ” and I am working as a Jr. Database Administrator .And On behalf of my company [SECL] I am supporting on very much valuable Customer National Board of Revenue which accordingly too much confidential and complex customer database also. I always tried to support NBR of my best effort.

Sir In the mean time I have come an opportunity and just took it. Now I have to join there.
Sir I have too much respect to you .Very few people as like you ever I have seen. You are so kind also on your employee. Sir I never abandon from your affectionate loving behavior. This will always with me.
I love and enjoy my profession. My hand always spread for any kind of support of National board of revenue database problem. I will be very happy if you order any task after my departure when fall any problem.

However Sir, As per Hr Policy they will not pay my last working month salary .Though also I am humbly requesting to you for considering my last working monthly salary issue and if possible please give this.

I always Expect and Pray for my Spectrum Engineering  well growth and stand its own foot strongly.

With Best Regards
Salmondy

Thursday, January 12, 2017

Invalid Archivelog deletion policy




 Data Guard Physical Standby - RMAN configure archivelog deletion policy reports RMAN-08591 (Doc ID 1984064.1)



When attempting to configure the RMAN archivelog deletion policy in a Data Guard environment RMAN reports the following warning:
RMAN> configure archivelog deletion policy to applied on standby;

new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
new RMAN configuration parameters are successfully stored
RMAN-08591: WARNING: invalid archived log deletion policy
 
 

Cause:

o eliminate the RMAN warning message when setting the deletion policy for archivelogs, at least one archive destination must be set as a mandatory destination.

As there is a broker configuration in place this MUST be performed through the broker.

The following process details this:

1. Log in to the broker command line utility
[oracle@grid2vm1 ~]$ dgmgrl
DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production

Copyright (c) 2000, 2013, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
 dgmgrl sys/welcome1
DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production

Copyright (c) 2000, 2009, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
Connected.
DGMGRL> show configuration

Configuration - AWDB_PRIMARY

  Protection Mode: MaxPerformance
  Databases:
    AWDB    - Primary database
    AWCTGFO - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

DGMGRL> show database verbose ORCL
Object "awdb" was not found
DGMGRL> show database verbose ORCLSTBY
Object "awctgfo" was not found
DGMGRL> show database verbose awctgfo
Object "awctgfo" was not found
DGMGRL> show database verbose "ORCLSTBY"

Database - ORCLSTBY

  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   0 seconds (computed 0 seconds ago)
  Apply Lag:       0 seconds (computed 0 seconds ago)
  Apply Rate:      630.00 KByte/s
  Real Time Query: ON
  Instance(s):
    awctgfo1
    awctgfo2 (apply instance)

  Properties:
    DGConnectIdentifier             = 'awctgfo_dg'
    ObserverConnectIdentifier       = ''
    LogXptMode                      = 'ASYNC'
    DelayMins                       = '0'
    Binding                         = 'optional'
    MaxFailure                      = '0'
    MaxConnections                  = '1'
    ReopenSecs                      = '300'
    NetTimeout                      = '30'
    RedoCompression                 = 'DISABLE'
    LogShipping                     = 'ON'
    PreferredApplyInstance          = ''
    ApplyInstanceTimeout            = '0'
    ApplyParallel                   = 'AUTO'
    StandbyFileManagement           = 'AUTO'
    ArchiveLagTarget                = '0'
    LogArchiveMaxProcesses          = '10'
    LogArchiveMinSucceedDest        = '1'
    DbFileNameConvert               = '+DATA_DCAW, +DATA_DRAW, +RECO_DCAW, +RECO                                                                                        _DRAW'
    LogFileNameConvert              = '+DATA_DCAW, +DATA_DRAW, +RECO_DCAW, +RECO                                                                                        _DRAW'
    FastStartFailoverTarget         = ''
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    SendQEntries                    = '(monitor)'
    LogXptStatus                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    ApplyLagThreshold               = '0'
    TransportLagThreshold           = '0'
    TransportDisconnectedThreshold  = '30'
    SidName(*)
    StaticConnectIdentifier(*)
    StandbyArchiveLocation(*)
    AlternateLocation(*)
    LogArchiveTrace(*)
    LogArchiveFormat(*)
    TopWaitEvents(*)
    (*) - Please check specific instance for the property value

Database Status:
SUCCESS



















. Locate the name of the standby site you want to set as a mandatory destination
2 . 
 
DGMGRL> show configuration;

Configuration - dg_db121

  Protection Mode: MaxPerformance
  Members:
  db121    - Primary database
    db121stb - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 39 seconds ago)
 
3. For the standby site locate the "Binding" property in the sites broker configuration
DGMGRL> show database verbose db121stb

Database - db121stb

  Role:               PHYSICAL STANDBY
  Intended State:     APPLY-ON
  Transport Lag:      0 seconds (computed 0 seconds ago)
  Apply Lag:          0 seconds (computed 0 seconds ago)
  Average Apply Rate: 14.00 KByte/s
  Active Apply Rate:  594.00 KByte/s
  Maximum Apply Rate: 5.06 MByte/s
  Real Time Query:    OFF
  Instance(s):
    db1211 (apply instance)
    db1212

  Properties:
    DGConnectIdentifier             = 'db121_stb'
    ObserverConnectIdentifier       = ''
    LogXptMode                      = 'ASYNC'
    RedoRoutes                      = ''
    DelayMins                       = '0'
    Binding                         = 'optional'     ****** controls whether the destination is mandatory or not
..
.

Database Status:
SUCCESS
 

Also, you can verify BINDING column of the V$ARCHIVE_DEST view of the database or far sync instance that is sending redo data using SQLPLUS by running below script
SQL > select binding from v$archive_dest;

4. Set the "Binding" property to MANDATORY

DGMGRL> edit database db121stb set property Binding='mandatory';
Property "binding" updated
DGMGRL> exit
OR using SQLPLUS
SQL>alter system set log_archive_dest_2='service=ORACLE MANDATORY lgwr async affirm valid_for=(online_logfiles,primary_role) db_unique_name=LARRY';


5. Once the broker configuration has set a standby site as a mandatory destination, the RMAN configuration can be altered to set the archivelog deletion policy to applied on standby.
[oracle@grid2vm1 ~]$ rman target /

Recovery Manager: Release 12.1.0.2.0 - Production on Thu Feb 26 17:43:27 2015

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DB121 (DBID=120781903)

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name DB121 are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
..
.
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.1.0/dbhome_1/dbs/snapcf_db1211.f'; # default

RMAN> configure archivelog deletion policy to applied on standby;

old RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
new RMAN configuration parameters are successfully stored