Friday, 29 September 2017



@$ORACLE_HOME/rdbms/admin/awrrpt.sql


@/dboracle/orabase/product/11.2.0.4.2.0/rdbms/admin/awrsqrpt.sql


Chinnakkalai,MK,Mahesh,TAJ C
21:47
979v22zsnjfhf
dm46p0r894pss
djt275c6q6zpx
28/09/2017 08:51:38.029
28/09/2017 07:28:49.455
28/09/2017 07:28:37.445


SELECT DECODE (l.BLOCK, 0, 'Waiting', 'Blocking ->') user_status
,CHR (39) || s.SID || ',' || s.serial# || CHR (39) sid_serial
,(SELECT instance_name FROM gv$instance WHERE inst_id = l.inst_id)
conn_instance
,s.SID
,s.PROGRAM
,s.osuser
,s.machine
,DECODE (l.TYPE,'RT', 'Redo Log Buffer','TD', 'Dictionary'
,'TM', 'DML','TS', 'Temp Segments','TX', 'Transaction'
,'UL', 'User','RW', 'Row Wait',l.TYPE) lock_type
--,id1
--,id2
,DECODE (l.lmode,0, 'None',1, 'Null',2, 'Row Share',3, 'Row Excl.'
,4, 'Share',5, 'S/Row Excl.',6, 'Exclusive'
,LTRIM (TO_CHAR (lmode, '990'))) lock_mode
,ctime
--,DECODE(l.BLOCK, 0, 'Not Blocking', 1, 'Blocking', 2, 'Global') lock_status
,object_name
,s.blocking_session
FROM
   gv$lock l
JOIN
   gv$session s
ON (l.inst_id = s.inst_id
AND l.SID = s.SID)
JOIN gv$locked_object o
ON (o.inst_id = s.inst_id
AND s.SID = o.session_id)
JOIN dba_objects d
ON (d.object_id = o.object_id)
WHERE (l.id1, l.id2, l.TYPE) IN (SELECT id1, id2, TYPE
FROM gv$lock
WHERE request > 0)
ORDER BY id1, id2, ctime DESC; 

==========


SELECT  distinct a.sql_id, a.blocking_session,a.blocking_session_serial#,
a.user_id,s.sql_text,a.module
FROM  V$ACTIVE_SESSION_HISTORY a, v$sql s
where a.sql_id=s.sql_id
and blocking_session is not null
and a.user_id <> 0
and a.sample_time between to_date('27/09/2017 00:00', 'dd/mm/yyyy hh24:mi')
and to_date('28/09/2017 23:50', 'dd/mm/yyyy hh24:mi');



SELECT  a.sql_id,a.session_id,a.session_serial#, a.blocking_session,a.blocking_session_serial#,A.SAMPLE_TIME,
a.user_id,s.sql_text,a.module
FROM  V$ACTIVE_SESSION_HISTORY a, v$sql s
where a.sql_id=s.sql_id
and blocking_session is not null
and a.user_id <> 0
and a.sample_time between to_date('28/09/2017 09:00', 'dd/mm/yyyy hh24:mi')
and to_date('28/09/2017 10:30', 'dd/mm/yyyy hh24:mi');


select session_id from V$ACTIVE_SESSION_HISTORY where BLOCKING_SESSION='852';

fx60akn9n2tc0
57nvt1ay0ggt2

select plan_table_output from table (dbms_xplan.display_awr('57nvt1ay0ggt2'));



SQL_ID 57nvt1ay0ggt2
--------------------
DELETE FROM BT_CWK_CONTRACT_EMP_PROV_INFO ContractEmpProvInfoEO WHERE
CONTRACT_EMPLOYEE_ID=:1 AND EFFECTIVE_START_DATE=:2 AND
EFFECTIVE_END_DATE=:3 AND EFF_SEQ=:4
Plan hash value: 3735639707
----------------------------------------------------------------------------------------------------
| Id  | Operation          | Name                          | Rows  | Bytes | Cost (%CPU)| Time     |
----------------------------------------------------------------------------------------------------
|   0 | DELETE STATEMENT   |                               |       |       |     2 (100)|          |
|   1 |  DELETE            | BT_CWK_CONTRACT_EMP_PROV_INFO |       |       |            |          |
|   2 |   INDEX UNIQUE SCAN| BT_CWK_CONTRACT_EMP_PROV__PK  |     1 |    26 |     2   (0)| 00:00:01 |
----------------------------------------------------------------------------------------------------

DELETE FROM BT_CWK_CONTRACT_EMP_PROV_INFO ContractEmpProvInfoEO WHERE CONTRACT_EMPLOYEE_ID=:1 AND EFFECTIVE_START_DATE=:2 AND EFFECTIVE_END_DATE=:3 AND EFF_SEQ=:4



@$ORACLE_HOME/rdbms/admin/awrrpt.sql

===========


@/dboracle/orabase/product/11.2.0.4.2.0/rdbms/admin/awrsqrpt.sql


=================================================================================



FAO: NFMI SPOCs (cc’d to NFMI Leads)

Subject: Q2 Deadline - Friday 29th September @ 15:00

1.       What’s happening?
·         The cut-off for Q2 is Friday 29th  September 2017 @ 15:00.

2.       What do I need to do?
·         Ensure all data you need to enter into NFMI has been updated and accurate.
·         Review your weekly NFMI SPOC digest and ensure any expiring questions have been updated to prevent them expiring on 1st October.

3.       What happens next?
·         We’ll gather the results and publish them to the Delivery Directors against the targets defined at the start of the year – this will happen in the next few weeks.
·         The NFMI Tool will move into the Q3 period and quarterly targets will reflect what was set in the Q3 glide path.
·         If you or your team missed any questions that were due to be refreshed, they’ll be automatically expired and could drop your NFMI score to 0%. This can be easily prevented by dealing with all Expiring or Expired questions before the cut-off – you just have to update them with current status or a note to say they’ve been reviewed.

4.       Issues with Run Book storage
·         We’ve been made aware that a number of teams have been unable to upload an updated RunBook to the SharePoint location where they’re centrally stored. The location is at its maximum and if correctly managed should have more than enough space to hold all the required Run Book documents.
·         I’m planning to gain control over this SP Site and will kick off some clean up activity next week. In the interim, each app/vendor need to take some responsibility for the areas they use in the SP Site. There are multiple copies of RunBooks, multiple versions which if cleaned up, could create a lot of free storage space. So, for now, clean up your spaces which will create the short term space required. Longer term, we’ll perform more analysis and clean-up activities.

If you see any issues or have further questions, please drop us a note at nfmi.admin@bt.com or reply to this email.

Thanks
NFMI Team

===================================


 release data is 30th 16:33 My release date is 30th sep 16:34 A new member joined 16:34 Mukherjee,SS,Subhra,TAJ C Hi Rakesh 16:34 Karam,R,Rakesh,TAJ C his name is soumyajit 16:34 Mukherjee,SS,Subhra,TAJ C ok please provide him the KT 16:34 Karam,R,Rakesh,TAJ C I have already given DB kT 16:35 pending is giving KT regarding server of applications 16:35 Mukherjee,SS,Subhra,TAJ C did that include the EOT DB also 16:35 ? 16:35 Karam,R,Rakesh,TAJ C Just I need to inform him what are the servernames , monitoring and password reset 16:36 thats all 16:36 Mukherjee,SS,Subhra,TAJ C ok fine 16:36 Karam,R,Rakesh,TAJ C so when u are free 16:36 I schedule a call 16:36 ? 16:36 Mukherjee,SS,Subhra,TAJ C hope he is aware of the architecture? 16:36 Karam,R,Rakesh,TAJ C architecture of DB? 16:37 He is having 2 yrs of exp on DB and linux 16:37 he know shell scripting. 16:37 as well 16:37 shall I schedule a call at 5pm 16:37 ? 16:37 Mukherjee,SS,Subhra,TAJ C we have a program at 5:00 pm 16:38 Karam,R,Rakesh,TAJ C ok what about 6pm? 16:38 Mukherjee,SS,Subhra,TAJ C you can have the call with him if he is available 16:38 does that need me? 16:38 Karam,R,Rakesh,TAJ C ok I am good , no issue . I mail once KT has been provided 16:39 Mukherjee,SS,Subhra,TAJ C thanks 16:39 We saved this conversation in the Conversations tab in Lync and in the Conversation History folder in Outlook.Karam,R,Rakesh,TAJ C
its long back ago,, I accessed payroll execel sheet. 17:49 U had set some password 17:50 i forgot it and can u ping the password agian 17:50 again 17:50 ? 17:50 We saved this conversation in the Conversations tab in Lync and in the Conversation History folder in Outlook.Mukherjee,SS,Subhra,TAJ C
yes 18:14 today_123 18:14 also help him to procure access to bridge, citrix and the servers 18:15 Karam,R,Rakesh,TAJ C ok 18:16

==============


Hi Rakesh

Pls submit

Debabrata- I will check and confirm on the issue. Pls be informed, the laptop can be sent back to KOL in case someone is travelling from Bangalore to KOL. Hence pls provision this
Regards
Moumita


========================================


to be uploaded
To:
Karam,R,Rakesh,TMR C (rakesh.karam@bt.com);
We all know there is Hardware Clock on each of the server which is used to manage various OS and Host components. Time Sync. on this server is very important particulary when Servers are Clustered together as is the case in Oracle RAC setup.

In Oracle RAC by there is a Oracle provided service(Unix Deamon) called CTSS (Cluster Time Sync. Service) which by Default runs in Observer mode when NTP is configured. NTP (Network Time Protocol) is O/S provided Protocol and is visible at OS level in form of "ntpd" deamon process when we perform "ps -ef|grep" command.

By Default NTP manages Oracle RAC DB server Time Sync.

On Oracle RAC we often find that DB server clock is not synced between RAC nodes. When difference gets too large (greater than defined tolerable offset), Oracle can kick that node out of cluster which is known as Node Eviction.

To Avoid such issues, sometimes manual sync. of Clock is required. Below steps outline the procedure used to accomplish same:

1.Suspend current NTP sync process. Suspend rather than stop as that way we don’t get spurious alerts about NTP not operating.

2.Pick the best time source, and schedule a cron job to slow down/speed up, ie SLEW, the system clock by 10% so the system clock approaches to best time source. This is a standard operation using “ntpdate –B”. If we don’t use –B we may get a STEP change, and this may cause problems with the databases in the cluster.

3.Leave the cron job operating until all hosts in the cluster are < 100 ms from the time source.

4.If bad time source isn’t fixed, then comment out bad time source in NTP configuration.

5.Stop NTP process.

6.Restart NTP process so it only SLEWS the time, and won’t STEP on startup. This requires manually running just the ntpd part of the startup.

7.Monitor for a few days.

========================================================



How often DBA is in a situation where he wants to perform some maintanance on a table and that very table is getting updated by end-user. This results in delaying the maintannce of tables in Outage window which is most often denied by Business due to need for availability of such critical tables in Production.

There is a way out in Oracle 11g.

In Oracle 11g release, You can make a Table Read Only. 

Command used will be :
Alter table EMP read only;

To make table Read-Write again, issue below command:
Alter Table EMP read write;

When a table is in Read Only mode, DMLs (Update,Insert,Delete) are NOT allowed. Performing DML on such table will result in ORA-12081 error:

delete emp *ERROR at line 1:ORA-12081: update operation not allowed on table "SCOTT"."EMP"

You can still perform DDL operations (Create indexes, maintain partitions and so on) on a Read Only Table. So, a very important Use Case for this feature would be Performing Table Maintenance.

Steps would be :

1. Make Table Read Only. This will ensure NO DMLs are allowed on table for which you want to perform maintanance. So you will not encounter any performance/locking issues while peroforming table maintanance.

2. Perform Table Maintance using necessary DDL commands.

3. Turn Table Read Write.

To see the status of the table, look for the read_only column in the data dictionary view dba_tables.

SQL> select read_only from user_tables where table_name = 'EMP'; REA---NO

=============================================


 

https://draxe.com/insomnia-cures/ -- insomania problem solutions
==========================



===========


This is an opportunity not to be missed. It’s not just a job we're offering you, it’s a career with a tailored training programme as well as incredible hands-on experiences. Don’t be put off from applying because you haven’t done anything similar before, you'll get loads of support, and if successful, after the first year you’ll have achieved a qualification for IT and Telecoms professionals*.

==============================


====================================



It's as if Richa Chadha and Huma Qureshi are competing to be the worst-dressed celeb of the month

We have few more queries left to be discussed on node addition activity.
Can you please let us know your availability to have a discussion on this.

==========


to be uploaded

Monday, 25 September 2017


control_file_record_keep_time        integer     7days

controlfile = $ORACLE_BASE/ORADATA/DB_UNIQUE_NAME/CONTROL01.dbf

if flash enabled

$ORACLE_BASE/FAST_RECOVERY_AREA/DB_UNIQUE_NAME/CONTROL02.CTL

REMOTE_LOGIn_PASSWORDFILE=exclusive.

audit_file_dest=$ORACLE_BASE/admin/DB_UNIQUE_NAME/adump

audit_trail=db

DB_recovery_file_dest
db_recovery_File_dest_size

things to be remembered

v$pwfile_users

oerr ora 16778

DGMGRL> show configuration;

Configuration - PeppiEnKokki

  Protection Mode: MaxPerformance
  Databases:
    peppi - Primary database
    kokki - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

https://docs.oracle.com/cd/B28359_01/backup.111/b28270/rcmdupdb.htm#BRADV89933 - auxilary instance initialization parameter


https://prutser.wordpress.com/2011/06/13/password-file-maintenance-in-a-data-guard-environment/ - Moving password file from
primary to standby

service name

A logical representation of a database, which is the way a database is presented to clients. (A database can be presented as multiple services and a service can be implemented as multiple database instances. The service name is a string that is the global database name, that is, a name comprising the database name and domain name, entered during installation or database creation. If you are not sure what the global database name is, you can obtain it from the value of the SERVICE_NAMES parameter in the initialization parameter file.)

The service name is included in the connect data part of the connect descriptor.


connect data

A portion of the connect descriptor that defines the destination database service name or Oracle System Identifier (SID). In the following example, SERVICE_NAME defines a database service called sales.us.example.com:

(DESCRIPTION=
  (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521)
  (CONNECT_DATA=
     (SERVICE_NAME=sales.us.example.com)))



connect descriptor

A specially formatted description of the destination for a network connection. A connect descriptor contains destination service and network route information.

The destination service is indicated by using its service name for Oracle9i or Oracle8i databases or its Oracle System Identifier (SID) for Oracle release 8.0 databases. The network route provides, at a minimum, the location of the listener through use of a network address

connect identifier

A connect descriptor or a name that maps to a connect descriptor. A connect identifier can be a net service name, database service name, or net service alias. Users initiate a connect request by passing a user name and password along with a connect identifier in a connect string for the service to which they want to connect:

CONNECT username@connect_identifier

connect string

Information the user passes to a service to connect, such as user name, password, and connect identifier:

CONNECT username@net_service_name

connect-time failover

A client connect request is forwarded to a another listener if a listener is not responding. Connect-time failover is enabled by service registration, because the listener knows if an instance is running to attempting a connection.



Choosing a Strategy for Naming Duplicate Files

When duplicating a database, RMAN generates names for the duplicate database files. If the destination host uses the same directory structure as the source host, then you can use the same names for the duplicate database files that you used for the source database files. In this case, you do not need to rename the duplicate files, but you do have to specify the NOFILENAMECHECK option on the DUPLICATE command

what is use of NOFILENAMECHECK option on the DUPLICATE command

if NOFILENAMECHECK check is specified , then then whatever the datafilenames is present in source database same datafile names gets copied to destination database provided both directory structure of source and destination database should be same.


If the hosts use different directory structures, or if they use the same structure but you want to name the duplicate files differently, then decide how to generate the names for the duplicate database files. Specifically, decide how to name the control files, datafiles, online redo log files, and tempfiles.

RMAN supports the following strategies for generating names for duplicate files:


Specify the SPFILE clause on the DUPLICATE command to set all necessary parameters involving filenames, with the exception of DB_FILE_NAME_CONVERT

Oracle recommends this strategy because it is simplest. When you execute DUPLICATE ... SPFILE, RMAN either restores the server parameter file from a backup or copies it from an active database. RMAN updates the initialization parameter values in the copied server parameter file based on the SPFILE PARAMETER_VALUE_CONVERT and SPFILE SET values (in this order). RMAN then restarts the auxiliary instance with the server parameter file.

if you use initialization paramter , then You can set the parameters in the initialization parameter file on the duplicate instance, specify the LOGFILE and DB_FILE_NAME_CONVERT clauses of the DUPLICATE command, or issue SET and CONFIGURE commands. You can combine any of these options to produce the desired effect.

SPFILE ... PARAMETER_VALUE_CONVERT 'string_pattern'

Specifies conversion strings for initialization parameters whose values specify path names, with the exception of the DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT parameters. The primary purpose of PARAMETER_VALUE_CONVERT is so that you can set a collection of initialization parameters and avoid explicitly setting them one by one.

SPFILE ... SET 'string_pattern'

Sets the specified initialization parameters to the specified values. You can use SET to set the LOG_FILE_NAME_CONVERT parameter for the online redo logs.

DB_FILE_NAME_CONVERT 'string_pattern'

Specifies a rule for creating the filenames for duplicate datafiles and tempfiles. Note that DB_FILE_NAME_CONVERT specified on the DUPLICATE command overrides the initialization parameter DB_FILE_NAME_CONVERT if it is set in the initialization parameter file.


NOFILENAMECHECK

Prevents RMAN from checking whether the source database datafiles and online redo logs files share the same names as the duplicated files. This option is necessary when you are creating a duplicate database in a different host that has the same disk configuration, directory structure, and filenames as the host of the source database. If duplicating a database on the same host as the source database, then make sure that NOFILENAMECHECK is not set.


Example 23-1 Using the SPFILE Clause to Name Duplicate Files



DUPLICATE TARGET DATABASE TO dup1
  FROM ACTIVE DATABASE
  DB_FILE_NAME_CONVERT '/disk1','/disk2'
  SPFILE
    PARAMETER_VALUE_CONVERT '/disk1', '/disk2'
    SET LOG_FILE_NAME_CONVERT '/disk1','/disk2'
    SET SGA_MAX_SIZE '200M'
    SET SGA_TARGET '125M';

shows a DUPLICATE command that uses the SPFILE clause to name duplicate files. The PARAMETER_VALUE_CONVERT option substitutes /disk2 for /disk1 in all initialization parameters that specify filenames (with the exception of DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT). The SET LOG_FILE_NAME_CONVERT clause substitutes /disk2 for /disk1 in the filenames of the online redo logs of the duplicate database. The DB_FILE_NAME_CONVERT option replaces /disk1 with /disk2 in the names of the duplicate datafiles and tempfiles.



Preparing the Auxiliary Instance




Step 1: Create an Oracle Password File for the Auxiliary Instance
A password file is required for the auxiliary instance only if one of the following conditions is true:

You use the RMAN client on a host other than the destination host.

You duplicate from an active database.

Note:
A password file is not required for backup-based duplication. You can use operating system authentication for the auxiliary connection when duplicating to the same host as the source database.

When using the FROM ACTIVE DATABASE option, the source database instance, which is the database instance to which RMAN is connected as TARGET, connects directly to the auxiliary database instance. This connection requires a password file with the same SYSDBA password. You can create the password file manually, making sure to use the same SYSDBA password as the source database. You may want to create the password file with a single password so you can start the auxiliary instance and enable the source database to connect to it.



===========


alter database backup controlfile to trace;

sqlplus sys/active@DG_ACTIVE as sysdba

orapwd file=orapwactive password=oracle entries=10 force=y ignorecase=y


Example 2-70 Duplicating from an Active Database

Assume that you want to create a test database from database prod1 on a new host. The new host has the same directory structure as the source host, so the files in the duplicate database can use the same names as the files in the source database. You want to create the database without using RMAN backups and allow prod1 to remain open during the duplication.

If prod1 uses a server parameter file, then you can create an initialization parameter file on the destination host that contains only the DB_NAME parameter set to an arbitrary value. Before starting the auxiliary instance you should create a password file that has the same SYSDBA password as the source database. Afterward, start the auxiliary instance.

By default, RMAN does not duplicate the password file when creating a duplicate database that is not a standby database. The PASSWORD FILE option specifies that RMAN should copy the password file to the destination host. If you want the duplicate database to contain all the passwords available on your source database, then use the PASSWORD FILE option.


You do not need to configure auxiliary channels because RMAN uses the normal channels configured on the source database to copy the database files. Start the RMAN client, connect to the source and auxiliary database instances, and duplicate the database as follows:


Friday, 1 September 2017

Dataguard
=========



https://docs.oracle.com/cd/B14117_01/server.101/b10823/toc.htm


https://docs.oracle.com/database/122/nav/high-availability.htm --- ORacle books for gettting more information of more technology

https://docs.oracle.com/cd/E17781_01/server.112/e18804/network.htm#ADMQS156


http://docs.oracle.com/en/database/   -- go to this url , you will get dropbox where u choose what database version document you want. ENJOY.


https://jakevdp.github.io/PythonDataScienceHandbook/index.html. --+ python






https://galileosuite.com/tutorials/relinking-oracle-binaries/ ---- Oracle relink well explained

how to check logs while database is being created via OUI

/u01/app/oracle/cfgtoollogs/dbca/primary ---- where primary is oracle_sid

https://docs.oracle.com/cd/E17781_01/server.112/e18804/memory.htm#ADMQS174 - good document over memmory

===


error :

[INS-41813] OSDBA for ASM, OSOPER for ASM, and OSASM are the same OS group.
[INS-41875] Oracle ASM Administrator (OSASM) Group specified is same as the users primary group.


what is this error.


http://www.hhutzler.de/blog/install_rac_11203_with_gns/#Fixing_a_failed_GRID_Installation - rac with dns



https://docs.oracle.com/database/121/CWLIN/usrgrps.htm#CHDHBDIJ - oracle user id and roles admininistartion --- check once



https://aprakash.wordpress.com/2010/08/14/silly-and%C2%A0interesting-v/ --- OS authentication



https://docs.oracle.com/cd/B28359_01/backup.111/b28270/rcmdupdb.htm#BRADV89938 --- rman duplicate


http://docs.oracle.com/cd/E25178_01/backup.1111/e10642/rcmadvre.htm ---- 11,2 for backup and recovery


http://docs.oracle.com/cd/B19306_01/backup.102/b14191/rcmrecov.htm#BRADV008 --- awesome rman senario


http://docs.oracle.com/cd/B19306_01/backup.102/b14192/recov003.htm#BRBSC50002 --
http://docs.oracle.com/cd/B19306_01/backup.102/b14192/recov003.htm#BRBSC50002 --- good backup senarios


https://bigdatauniversity.com/courses/  -----

For free big data hadoop training.