0% found this document useful (0 votes)
3 views

arch_generation

Uploaded by

shraddhadhok13
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

arch_generation

Uploaded by

shraddhadhok13
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 6

select db.

name,trunc(FIRST_TIME) Ondate,count(1)
ArhiveLogs,to_char(sum(blocks*block_size)/1024/1024/1024,'999,999.99') "Size_in_GB"
from v$archived_log al,v$database db where al.name like '%/%' or al.name like '%\%'
group by db.name,trunc(FIRST_TIME) order by 1;

ssh [email protected]
-----------------------------------------------------------------------------------
-------------------------------------
find . -name "*.gz*" -mtime +2 -exec rm -rf {} \;&

find . -name "*.tr*" -mtime +2 -exec rm -rf {} \;&

find . -name "*.aud*" -mtime +2 -exec rm -rf {} \;&

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

rman target / << !


run {
delete force noprompt archivelog until time 'sysdate-1' like '+ARCHIVE_DG%'
backed up 1 times to device type sbt;
}
!

sqlplus '/ as sysdba'

-------------------------------------------------------UPZ3ODs RMAN
BKP--------------------------------------------------------------------------------
------------

Path: /oracle/11gR2/app/product/11.2.0/RMAN_BKP/UPZ3ODS/incremental

Command: nohup sh UPZ3ODS_ARCHbkp.sh &


-----------------------------------------------for view datafiles
size-------------------------------------------------------------------------------
--------------------

SQL> col file_name for a70


SQL> set lines 1000
SQL> select file_name, bytes/1024/1024 from dba_data_files where
tablespace_name='&TAB';
Enter value for tab: TBS_TDCRS_DATA (TBS_NAME)

-------------------------------------------DBSNMP
-----------------------------------------------------------------------

select user_id,username,profile,lock_date,expiry_date from dba_users where


username='DBSNMP';

create profile NOLIMIT_PWDCHND limit PASSWORD_LIFE_TIME unlimited


FAILED_LOGIN_ATTEMPTS unlimited PASSWORD_REUSE_TIME unlimited PASSWORD_REUSE_MAX
unlimited PASSWORD_VERIFY_FUNCTION null ;

alter user DBSNMP profile NOLIMIT_PWDCHND;


alter user dbsnmp identified by Rizquad#1382;

alter user dbsnmp account unlock;

alter user DBSNMP profile sec_profile;

select user_id,username,profile,lock_date,expiry_date from dba_users where


username='DBSNMP';

drop profile NOLIMIT_PWDCHND cascade;

select user_id,username,profile,lock_date,expiry_date from dba_users where


username='DBSNMP';

select user_id,username,profile,ACCOUNT_STATUS,lock_date,expiry_date from dba_users


where username='DBSNMP';

-------------------------------------------------------11G
create profile NOLIMIT_PWDCHND limit PASSWORD_LIFE_TIME unlimited
FAILED_LOGIN_ATTEMPTS unlimited PASSWORD_REUSE_TIME unlimited PASSWORD_REUSE_MAX
unlimited PASSWORD_VERIFY_FUNCTION null ;

alter user DBSNMP profile NOLIMIT_PWDCHND;

alter user dbsnmp identified by Oem#may13;

alter user dbsnmp account unlock;

alter user DBSNMP profile sec_profile;

select user_id,username,profile,lock_date,expiry_date from dba_users where


username='DBSNMP';

drop profile NOLIMIT_PWDCHND;

------------------------------------------------------------------Praful DBA
-------------------------------------------------------------

select USERNAME,ACCOUNT_STATUS,LOCK_DATE ,EXPIRY_DATE,PROFILE from dba_users where


USERNAME='PRAFULDBA';

select name, password from user$ where name='PRAFULDBA';

create profile NOLIMIT_PWDCHND limit PASSWORD_LIFE_TIME unlimited


FAILED_LOGIN_ATTEMPTS unlimited PASSWORD_REUSE_TIME unlimited PASSWORD_REUSE_MAX
unlimited PASSWORD_VERIFY_FUNCTION null ;

alter user PRAFULDBA profile NOLIMIT_PWDCHND ;

alter user PRAFULDBA identified by Indjan#17;


alter user PRAFULDBA profile sec_profile;

drop profile NOLIMIT_PWDCHND;


select user_id,username,profile,lock_date,expiry_date from dba_users where
username='PRAFULDBA';
select user_id,username,profile,ACCOUNT_STATUS,lock_date,expiry_date from dba_users
where username='PRAFULDBA';

--------------------------------------------------------Kedar Sirs Archieve


generation scripts--------------------------------------------

Identify Dest ID:


set lines 200 pages 5000
col destination for a45
select inst_id,dest_id,destination from gv$archive_dest where destination is not
null;

&

Then Modify whetever destination you wanted to check


select trunc(FIRST_TIME) Ondate,count(1)
ArhiveLogs,to_char(sum(blocks*block_size)/1024/1024/1024,'999,999.99') "Size in GB"
from v$archived_log al where DEST_ID=1group by trunc(FIRST_TIME) order by 1;

--------------------------------------------------Patch applied
scripts----------------------------------------------------------------------------
----------------------

set lines 200 pages 200


sho parameter db_n;
col NAMESPACE for a10
col VERSION for a10
col COMMENTS for a25
col ACTION for a15
col ACTION_TIME for a30
select * from registry$history;

-----------------
tail -9999f logsfor180616|grep -i LAG|tr -s ' '|cut -c1-30,80-104,165-177,178-195

----------------------------------------------------------Remedy
queries--------------------------

Netcool Query

'Assigned Group*+' LIKE "%DBA%" AND 'Status*' = "Assigned" AND 'First Name+' =
"Netcool"

External Query

'Assigned Group*+' LIKE "SSO-DBA-Dispatcher" AND 'Status*' < "Resolved" AND 'First
Name+' != "Netcool" AND 'Company*+' != "Vodafone - IT"

Internal Query
'Assigned Group*+' LIKE "SSO-DBA-Dispatcher" AND 'Status*' < "Resolved" AND 'First
Name+' != "Netcool" AND 'Company*+' = "Vodafone - IT"

Internal RBJ

'Assigned Group*+' LIKE "SSO-DBA-%" AND 'Status*' < "Resolved" AND 'First Name+' !=
"Netcool" AND 'Company*+' = "Vodafone - IT" AND 'Assigned Group*+' != "SSO-DBA-
Dispatcher"

External RBJ

'Assigned Group*+' LIKE "SSO-DBA-%" AND 'Status*' = "Assigned" AND 'First Name+' !=
"Netcool" AND 'Company*+' != "Vodafone - IT" AND 'Assigned Group*+' != "SSO-DBA-
Dispatcher"

APM Query

'Assigned Group*+' LIKE "%SSO-APM-DBA%" AND 'Status*' = "Assigned"

Open DBA

('Status*' < "Resolved") AND ('Assigned Group*+' LIKE "%DBA%") AND ('Assigned
Group*+' != "SSO - CRM DBA") AND ('Assigned Group*+' != "TCS DBA") AND ('Assigned
Group*+' != "TCS-MPESA-Infra -DBA") AND ('First Name+' != "Netcool")

Work ORder-A
('Status*' < "Completed") AND ('Assignee Support Group Name+' LIKE "%DBA%") AND
('Assignee Support Group Name+' != "SSO - CRM DBA") AND ('Assignee Support Group
Name+' != "TCS DBA") AND ('Assignee Support Group Name+' != "TCS-MPESA-Infra -DBA")

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

ps -ef|grep pmon
ls -ld /agent12c
uname -a
cat /etc/hosts|grep oem
telnet oemcloudha 1159

cd /agent12c
mkdir agent12csoft agent12base agent12c;chmod 750 agent12csoft agent12base agent12c

cd /agent12c/agent12csoft

scp [email protected]:/tmp/12.1.0.2.0_AgentCore_212.zip . (AIX64bit)

scp [email protected]:/tmp/12.1.0.2.0_AgentCore_226.zip . (Linux64bit)

cd /agent12c/agent12csoft
unzip *

cd /agent12c/agent12csoft
mv agent.rsp agent.rsp.ori
vi agent.rsp

Modify the rsp file as follows:


EM_INSTALL_TYPE="AGENT"
OMS_HOST=oemcloudha
EM_UPLOAD_PORT=1159
AGENT_REGISTRATION_PASSWORD=Oemoct13
AGENT_INSTANCE_HOME=/agent12c/agent12c
AGENT_PORT=3872

cd <Agent11g_Home>/bin
./emctl stop agent

ps -ef|grep emagent

echo $TZ
export TZ=Asia/Calcutta
echo $TZ

cd /agent12c/agent12csoft
./agentDeploy.sh -ignorePrereqs AGENT_BASE_DIR=/agent12c/agent12base
RESPONSE_FILE=/agent12c/agent12csoft/agent.rsp

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

https://itservicedesk.vodafone.co.in/forms/arsprod/
zVEL:CHG:TMS:ChangeTaskJoinForm/Default+Administrator+View/?
cacheid=da8da492&format=html

-----------------------------SER-1 & 2

Please check Sev-1,2 Remedy Query.

Sev2 -
'Priority*' = "High" AND 'Assigned Group*+' LIKE "%SSO%" AND 'First Name+' !=
"Netcool" AND 'Reported Date+' >= "09/18/2012"

Sev-1 -
'Priority*' = "Critical" AND 'Assigned Group*+' LIKE "%SSO%" AND 'First Name+' !
="Netcool" AND 'Reported Date+' >= "06/01/2012"

if needs to generate report kindly select incident with impact for meantime

----------------------------Patching OEM
link------------------------------------------------------------------------

https://10.87.226.51:7799/dbdash/patchdetails.html

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

telnet 10.87.133.10 3873 << EOF


EOF
telnet 10.87.133.11 3873 << EOF
EOF

select
to_char(df.creation_time,'MON-YYYY'),ts.name,trunc(sum(bytes/1024/1024/1024))
GB_ADDED from v$tablespace ts, v$datafile df where ts.ts#=df.ts# and
to_char(df.creation_time,'YYYY')='2017' group by to_char(df.creation_time,'MON-
YYYY'),ts.name order by 3 desc;

#####################################################DR LAG
checking###########################################################################
#

set lines 200 pages 50000


col DEST_NAME for a25
select
inst_id,DEST_ID,DEST_NAME,STATUS,ERROR,ARCHIVED_THREAD#,ARCHIVED_SEQ#,APPLIED_THREA
D#,APPLIED_SEQ# from gv$archive_dest_status where DESTINATION is not null and
DEST_NAME='LOG_ARCHIVE_DEST_2';

select sum(hwm) from (select file_id,max(block_id+blocks-1)*8192/1024/1024 hwm from


dba_extents where tablespace_name='GG_DATA' group by file_id);
select sum(hwm) from (select file_id,max(block_id+blocks-1)*8192/1024/1024 hwm
from dba_extents where tablespace_name='UPSS_DATA' group by file_id);

You might also like