0% found this document useful (0 votes)
167 views17 pages

Sap

The document describes the process for exporting and importing optimizer statistics between databases. It states that statistics must first be exported from the source database into a user-created statistics table. This table can then be copied to the target database using various methods. Finally, the statistics are imported from the user table into the data dictionary of the target database, making them available to the optimizer.

Uploaded by

李德军
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
167 views17 pages

Sap

The document describes the process for exporting and importing optimizer statistics between databases. It states that statistics must first be exported from the source database into a user-created statistics table. This table can then be copied to the target database using various methods. Finally, the statistics are imported from the user table into the data dictionary of the target database, making them available to the optimizer.

Uploaded by

李德军
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 17

Before exporting statistics, you first need to create a table for holding the

statistics. This statistics table is created using the procedure


DBMS_STATS.CREATE_STAT_TABLE. After this table is created, then you can export
statistics from the data dictionary into your statistics table using the
DBMS_STATS.EXPORT_*_STATS procedures. The statistics can then be imported using the
DBMS_STATS.IMPORT_*_STATS procedures.

Note that the optimizer does not use statistics stored in a user-owned table. The
only statistics used by the optimizer are the statistics stored in the data
dictionary. In order to have the optimizer use the statistics in user-owned tables,
you must import those statistics into the data dictionary using the statistics
import procedures.

In order to move statistics from one database to another, you must first export the
statistics on the first database, then copy the statistics table to the second
database, using the EXP and IMP utilities or other mechanisms, and finally import
the statistics into the second database.

Note: The EXP and IMP utilities export and import optimizer statistics from the
database along with the table. One exception is that statistics are not exported
with the data if a table has columns with system-generated names.

In the following example the statistics for the APPSCHEMA user are collected into a
new table, STATS_TAB, which is owned by DBASCHEMA:

1. Create the statistics table.


EXEC DBMS_STATS.CREATE_STAT_TABLE(ownname =>'SCHEMA_NAME', stat_tab =>
'STATS_TABLE', tblspace => 'STATS_TABLESPACE');

SQL> EXEC DBMS_STATS.CREATE_STAT_TABLE('DBASCHEMA','STATS_TAB');

2. Export statistics to statistics table.


EXEC DBMS_STATS.EXPORT_SCHEMA_STATS('ORIGINAL_SCHEMA', 'STATS_TABLE', NULL,
'STATS_TABLE_OWNER');

SQL> EXEC DBMS_STATS.EXPORT_SCHEMA_STATS('APPSCHEMA','STATS_TAB',NULL,


'DBASCHEMA');
(or)
EXEC DBMS_STATS.EXPORT_SCHEMA_STATS(OWNNAME=>'APPSCHEMA',
STATTAB=>'STAT_TAB',STATID=>'030610',STATOWN=>'DBASCHEMA');

3. This table can be transferred to another server using any one of the below
methods.
SQLPlus Copy:
SQL> insert into dbaschema.stats_tab select * from dbaschema.stats_tab@source;

Export/Import:
exp file=stats.dmp log=stats_exp.log tables=dbaschema.stats_tab
imp file=stats.dmp log=stats_imp.log

Data Pump:
expdp directory=dpump_dir dumpfile=stats.dmp logfile=stats_exp.log tables=
dbaschema.stats_tab
impdp directory=dpump_dir dumpfile=stats.dmp logfile=stats_imp.log

4. Import statistics into the data dictionary.


EXEC DBMS_STATS.IMPORT_SCHEMA_STATS('NEW_SCHEMA', 'STATS_TABLE', NULL, 'SYSTEM');

SQL> EXEC DBMS_STATS.IMPORT_SCHEMA_STATS('APPSCHEMA','STATS_TAB',NULL,


'DBASCHEMA');
(or)
EXEC DBMS_STATS.IMPORT_SCHEMA_STATS(OWNNAME=>'APPSCHEMA',
STATTAB=>'STAT_TAB',STATID=>'030610',STATOWN=>'DBASCHEMA');

5. Drop the statistics table (optional step).


EXEC DBMS_STATS.DROP_STAT_TABLE('SYSTEM','STATS_TABLE');
SQL> EXEC DBMS_STATS.DROP_STAT_TABLE('DBASCHEMA','STATS_TAB');

How To Use SQL Profiles for Queries Using Different Literals Using the Force_Match
Parameter of DBMS_SQLTUNE.ACCEPT_SQL_PROFILE (Doc ID 1253696.1)

116200 116201 18-APR-22 08.00.24.431 AM 1 1,026.65


116032 116033 11-APR-22 08.00.54.746 AM 1 562.42

已经改进:
ZFIF005 会计账簿科目明细表
ZFIF006 会计账簿科目明细表(外币)
ZFIF007 会计账簿科目余额表
ZFIF008 会计账簿辅助明细表
ZFIF009 会计账簿辅助余额表

下阶段任务:
ZCOR009 毛利分析报表
ZFIR003 现金流量表
ZFIR004 供应商往来明细表
ZFIR006 客户往来明细表

s2cloud.DPS_CWBB_CWBB

--user=root --password=DPSsql@123

10.5.10.80
10.5.10.79

sendEmail -f oracle@dbtst03 -t [email protected] -u 'HEALTH CHECK REPORT: For


Database [TST] on Server: [dbtst03]' -a
/home/oracle/BUNDLE_Logs/tst_HEALTH_CHECK_REPORT.html -m 'Health Check Report
Attached.' -s mail.dfpv.com.cn:25 -xu username -xp password

-s smtp.foo.com:25 -xu username -xp password

mail -s "$(echo -e "����\nContent-Type: text/html; charset=utf-8")" �ռ��� < �����Դ

echo "hello" | mailx -v -s "tozhao" -S smtp="10.2.0.34:587" -S smtp-use-starttls -S


ssl-verify=ignore [email protected]

[email protected];[email protected]

set [email protected]
set smtp=mail.dfpv.com.cn
set [email protected]
set smtp-auth-password=dfmcyc99!
set smtp-auth=login

set ���Խ��оֲ����ԣ�����Ҫ���ԵĴ���֮ǰ���ϡ�set -x������Ҫ���ԵĴ���֮����ϡ�set +x������


like��
�޸�test.sh:
....
set -x

awk '{sum+=1} END{print sum}' test.sh

set +x

echo "hello" | mailx -v -s "tozhao" -S smtp="10.2.0.34:587" -S smtp-use-starttls -S


ssl-verify=ignore [email protected]

echo "hello" | mailx -v -s "tozhao" -S smtp="10.5.45.201" -S smtp-use-starttls -S


ssl-verify=ignore [email protected]

dba_constraints

[applprod@uat01-fi PROD_uat01-fi]$ ./adcmctl.sh stop apps/dfg21#0908

You are running adcmctl.sh version 115.28

Shutting down concurrent managers for PROD ...


Submitted request 2128867 for CONCURRENT FND SHUTDOWN

adcmctl.sh: exiting with status 0

[applprod@uat01-fi PROD_uat01-fi]$ ./adcmctl.sh start apps/dfg21#0908

You are running adcmctl.sh version 115.28

Starting concurrent manager for PROD ...


Starting PROD_0412@PROD Internal Concurrent Manager
Default printer is noprint

1.�е����������ó�,���ţ����‫�ͼ��ޣ‬ȵ�λϵͳ��ά����
2.�е�oracle,mysql��‫�ݿ‬ϵͳ���ϴ����������Ż�
3.�е�SAP��ά���ֵȹ���

���䣺 [email protected]��[email protected]
������Ƽ�������ϵ����������ͳһ���������䣺 [email protected]��

maximum runtime

monitor for processed XML messages


SXMB_MONI

/u01/app/oracle/diag/rdbms/esb/ESB_1/trace
[oracle@caoradb001 ~]$ export ORACLE_SID=ESB_2
[oracle@caoradb001 ~]$ export ORACLE_SID=ESB_1

cacpmoc-scan.drac.corp
sqlplus zhao/[email protected]/ESB

srvctl stop instance -d ESB -i ESB_2 -o immediate

srvctl status instance -d ESB -i ESB_2 -o immediate

TMS_ORDER_DETAIL
343000
RELATEBILL3" distinct 988836

08:43:45

test =
(DESCRIPTION =
(ADDRESS_LIST =
(LOAD_BALANCE = OFF)
(FAILOVER = ON)
(ADDRESS = (PROTOCOL = TCP)(HOST = cacpmoc-scan.drac.corp)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ESB)
)
)

ʹ�� COE XFR SQL Profile �ű������Ż���ɱ��������úõ�ִ �мƻ� (Doc ID 2297540.1)

/usr/sap/PRD/SYS/exe/run/brspace -p initPRD.sap -s 20 -l E -U -f dbshow -c tsinfo -


s PSAPSR3USR

cd /etc/yum.repos.d
wget http://public-yum.oracle.com/public-yum-ol7.repo
��[ol7_addons]��enable����Ϊ1
yum install oracle-ebs-server-R12-preinstall.x86_64 -y

wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7 -O /etc/pki/rpm-gpg/RPM-


GPG-KEY-oracle

FRM-92050

/d01/VIS/inst/apps/TESTDB_lyg/logs

hostnamectl set-hostname

Summary of Possible Reasons and Solutions for the Problem Where All
Concurrent Requests Stuck in Pending Phase (Doc ID 182154.1)

E3481174532

VIRT represents the total amount of virtual memory used by mysql. It includes all
code, data and shared libraries plus pages that have eventually been swapped out.
USED reports the sum of process rss (resident set size, the portion of memory
occupied by a process that is held in RAM) and swap total count.

# curl -s http://get.dbsake.net > dbsake


# chmod u+x dbsake
# dbsake sandbox

netstat -atunlp|grep 1521

esbtst =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.223.41.75)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.223.41.76)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ESB)
(FAILOVER_MODE =
(TYPE = select)
(METHOD = basic)
(RETRIES = 180)
(DELAY = 5)
)
)
)

134033.1

RW-00000 Unable to write to the following directory

## DB
/R12/PROD/db/tech_st/11.2.0
/R12/PROD/db/apps_st/data
## APP
/R12/PROD/apps/apps_st/comn
/R12/PROD/apps/apps_st/appl
/R12/PROD/apps/apps_st/ora
/R12/PROD/inst

479-539

mkdir -p /u01/StageR12
unzip -d /u01/StageR12 <ZipFile>

Wk495#wdhac
Tools > Internet Options > Security > Trusted Sites > Sites

S0009359614
CVE-2021-44228 (10.0), CVE-2022-22531 (8.7), CVE-2022-22530 (8.7), CVE-2021-44235
(8.4)

sar -u -f /var/log/sa/sa16 -s 19:00:00 -e 20:00:00


at_pp_vehicle
at_pp_vehicle_wip

select
sql_text
from
dba_hist_sqltext
where
sql_id in
(select distinct maxquerysqlid from
(select * from
(select
snap_id,
maxquerylen,
undoblks,
maxquerysqlid,
to_char(begin_time,'YYYY-MM-DD HH24:MI') begin,
to_char(end_time,'YYYY-MM-DD HH24:MI') end
from
dba_hist_undostat
order by
undoblks desc,
maxquerylen desc
)
where rownum<11
)
);

System Administration (SAP HANA as a Database) with SAP NetWeaver

<CVE-2021-44235 (8.4)>

sap netweaver as abap system administration

The following releases of component SAP_BASIS are affected

7.00 SP32-SP39 (*) / 7.01 SP17-SP24 (*) / 7.10 SP22-SP25 / 7.11 SP17-SP20 / 7.02
SP17-SP24 (*) / 7.30 SP13-SP21 / 7.31 SP15-SP30 (*) / 7.40 SP10-SP27 (*) / 7.50
SP00-SP22 / 7.51 SP00-SP13 / 7.52 SP00-SP09 / 7.53 SP00-SP07 / 7.54 SP00-SP05 /
7.55 SP00-SP03 /
7.56 SP00-SP01

·��Ϊ/sapinst/JAVA_COM

����5���
expdp ftpc/ftpc dumpfile=tab5.dmp tables=
at_pp_order,at_pp_vehicle,at_pp_pmodel,at_pp_model,at_pp_order_bs_plan
logfile=5.log DIRECTORY=EXP_EMS
impdp ftpc/ftpc directory=DATA_PUMP_DIR dumpfile=tab5.dmp
TABLE_EXISTS_ACTION=REPLACE logfile=5in.log

expdp ftpc/ftpc dumpfile=tab3.dmp tables=


at_pp_order,at_pp_vehicle,at_pp_vehicle_wip logfile=5.log DIRECTORY=EXP_EMS
impdp ftpc/ftpc directory=DATA_PUMP_DIR dumpfile=tab3.dmp
TABLE_EXISTS_ACTION=REPLACE logfile=3in.log
insert into mysql_servers (hostgroup_id, hostname, port)
values(15,'10.5.71.47',3306);

3123396
./sapinst SAPINST_SLP_MODE=false
HANA 1709 HANA 1610

select table_name,OWNER,round((blocks*8),2) "size (kb)" ,


round((num_rows*avg_row_len/1024/1024/1024),2)
"actual_data (kb)",
(round((blocks*8),2) -
round((num_rows*avg_row_len/1024/1024/1024),2)) "wasted_space (kb)"
from dba_tables
where (round((blocks*8),2) > round((num_rows*avg_row_len/1024/1024/1024),2)) and
OWNER not In ('SYS','SYSTEM')
order by 5 asc;

SQL> select count(*) from ftpc.AT_IF_SOCK_CONN_LOG;

COUNT(*)
----------
611119

SQL> select sum(bytes)/1024 from dba_segments where owner='FTPC' and


segment_name='AT_IF_SOCK_CONN_LOG';

SUM(BYTES)/1024
---------------
165888

OWNER size (kb)


------------------------------------------------------------ ----------
actual_data (kb) wasted_space (kb)
---------------- -----------------
218656.32 41743.68

AT_IF_SOCK_CONN_LOG
FTPC 164416
122031.21 42384.79

alter table FTPC.AT_IF_SOCK_CONN_LOG enable row movement;


alter table FTPC.AT_IF_SOCK_CONN_LOG shrink space cascade;

SQL> select index_name,index_type,status from dba_indexes where


table_name='AT_IF_SOCK_CONN_LOG' and owner='FTPC';

INDEX_NAME
------------------------------------------------------------
INDEX_TYPE STATUS
------------------------------------------------------ ----------------
DPKBIF_SOCK_CONN_LOG
NORMAL VALID
DXA0IF_SOCK_CONN_LOG
NORMAL VALID

DXA1IF_SOCK_CONN_LOG
NORMAL

====
SQL> select sum(bytes)/1024 from dba_segments where owner='FTPC' and
segment_name='AT_IF_SOCK_CONN_LOG';

SUM(BYTES)/1024
---------------
151360

====

FEEDING_POINT
VMES 40
30.98 9.02

select count(*) from VMES.FEEDING_POINT

select sum(bytes)/1024/1024 from dba_segments where owner='VMES' and


segment_name='FEEDING_POINT';

select s.sql_text from v$sql s, v$undostat u where u.maxqueryid=s.sql_id;

select s.sid,s.username,t.used_urec,t.used_ublk from v$session s, v$transaction t


where s.saddr = t.ses_addr order by t.used_ublk desc;

27dwvh8ggzpft

col inst_id format 99 head 'In|st'


col current_size_mb format 999,999,999 head 'Current|undo, MB'
col is_autoextensible format a4 head 'Auto|ext?'
col undo_retention format 999.9 head 'Retention|hours'
col undo_size_min_mb format 999,999,999 head 'Minimumal|req UNDO,
MB'
col undo_size_guarantee_mb format 999,999,999 head 'Max req|UNDO, MB'
col longest_sql format 999,999.9 head 'Longest|SQL, h'
col longest_sql_id format a13 head 'Longest|sql_id'
col max_ora1555_cnt format 999,999 head 'Max ORA-|1555 cnt'
col max_no_space_cnt format 999,999 head 'Max no|space cnt'

select
ua.inst_id,
ua.current_size_mb,
ua.is_autoextensible,
ua.undo_retention/3600 undo_retention,
um.undo_size_min_mb,
u.undo_size_guarantee_mb,
um.longest_sql/3600 longest_sql,
um.longest_sql_id,
um.max_ora1555_cnt,
um.max_no_space_cnt
from
gv$parameter p,
( -- how much undo is required to guarantee undo retention for
awr_snapshots_count period
select
inst_id,
max(required_undo_mb) undo_size_guarantee_mb
from
(
select
inst_id,
sum(undo_size) over (partition by inst_id order by begin_interval_time rows
&awr_snapshots_count preceding) required_undo_mb
from
(
select
s.instance_number inst_id,
s.begin_interval_time,
round((ss.value - lag(ss.value) over (partition by s.instance_number
order by s.begin_interval_time))/1024/1024) undo_size
from
dba_hist_snapshot s,
v$database d,
dba_hist_sysstat ss,
v$statname n
where
s.dbid = d.dbid and
s.dbid = ss.dbid and
s.instance_number = ss.instance_number and
s.snap_id = ss.snap_id and
ss.stat_id = n.stat_id and
n.name = 'undo change vector size'
)
)
group by inst_id
) u,
( -- minimally required undo as max active blocks
select
uh.instance_number inst_id,
max(activeblks * p.value/1024/1024) undo_size_min_mb,
max(maxquerylen) longest_sql,
max(maxquerysqlid) keep (dense_rank first order by maxquerylen desc)
longest_sql_id,
max(ssolderrcnt) max_ora1555_cnt,
max(nospaceerrcnt) max_no_space_cnt
from
dba_hist_snapshot s,
v$database d,
dba_hist_undostat uh,
v$parameter p
where
s.dbid = d.dbid and
s.dbid = uh.dbid and
s.instance_number = uh.instance_number and
s.snap_id = uh.snap_id and
p.name = 'db_block_size'
group by
uh.instance_number
) um,
( -- current undo setup
select
p.inst_id,
round(sum(bytes)/1024/1024) current_size_mb,
max(t.autoextensible) is_autoextensible,
max(ur.value) undo_retention
from
dba_data_files t,
gv$parameter p,
(select inst_id, value from gv$parameter where name = 'undo_retention') ur
where
t.tablespace_name = p.value and
p.name = 'undo_tablespace' and
p.inst_id = ur.inst_id
group by
p.inst_id
) ua
where
p.inst_id = u.inst_id and
p.name = 'undo_retention' and
u.inst_id = ua.inst_id and
ua.inst_id = um.inst_id
;

In Current Auto Retention Minimumal Max req Longest


st undo, MB ext? hours req UNDO, MB UNDO, MB SQL, h
--- ------------ ---- --------- ------------ ------------ ----------
Longest Max ORA- Max no
sql_id 1555 cnt space cnt
------------- -------- ---------
1 12,045 YES .3 258 5,244 11.8
27dwvh8ggzpft 0 0

2 12,048 YES .3 235 8,753 3.0


dhh22g71zd6x2 0 0

SQL_ID 27dwvh8ggzpft
--------------------
UPDATE AT_PP_VEHICLE A SET A.IS_VEXPORT_AUTO_Y = 1 WHERE A.VIN_S = :B1

SELECT * FROM table(dbms_xplan.display_awr ('dhh22g71zd6x2',null,null,'advanced'));

SELECT * FROM table(dbms_xplan.display_awr ('6t2vpswuu70x9',null,null,'advanced'));

2udxb01xq51fd 1m2frpnagaxv9 g2k33xhauxwgq 53ymhhckxuz9m 6t2vpswuu70x9

This is caused by lack of OS resources or incorrect configuration, where more


memory is required and Operating system reaches the limits set.

SELECT O6, O7, O8, O9, O10, O11, ATR_KEY ,MOTOR,MOTOR_TYPE FROM
AT_IF_EXPORT_VIEW_NEW WHERE IS_VEXPORT_AUTO_Y = 0

hana a simple test:


CREATE TABLE "PRODUCT" (
"PRODUCT_ID" INTEGER NOT NULL ,
"PRODUCT_NAME" VARCHAR(20),
"PRODUCT_TYPE" VARCHAR(10),
"PRODUCT_QUANTITY" INTEGER,
"NEXT_ORDER_DATE" DATETIME,
"DELIVERY_DATE" DATETIME,
PRIMARY KEY (PRODUCT_ID)
);

/sapcd/SWPM
./sapinst
./sapinst SAPINST_SLP_MODE=false

172.19.94.42

vi /etc/hosts
��saphanaprd ��IP�����172.19.4.110���޸�Ϊ����IP 172.19.4.117
service nscd restart

1.‫������ע‬node HANA_PRI
156�� hdbnsutil -sr_enable --name=HANA_one
2.ֹͣ157 HANA������‫�ݿ‬
3.��157ִ��‫��ע‬HANA ����
hdbnsutil -sr_register --name=HANA_SEC --remoteHost=sap-hana-op01 --
remoteInstance=00 --mode=syncmem --operationMode=logreplay
4.��157ִ����HANA������‫�ݿ‬

sapcontrol -nr 00 -function StartSystem HDB

INSERT INTO "PRODUCT"


( PRODUCT_ID, PRODUCT_NAME, PRODUCT_TYPE, PRODUCT_QUANTITY, NEXT_ORDER_DATE,
DELIVERY_DATE)
VALUES
( 1,'TABLE','WOOD',100,'2022/03/03 19:10:10:10', '2022/03/03 19:10:10:10');

INSERT INTO "PRODUCT"


( PRODUCT_ID, PRODUCT_NAME, PRODUCT_TYPE, PRODUCT_QUANTITY, NEXT_ORDER_DATE,
DELIVERY_DATE)
VALUES
( 2,'TABLE','WOOD',100,'2019/05/10 19:10:10:10', '2019/06/10 19:10:10:10');

INSERT INTO "PRODUCT"


( PRODUCT_ID, PRODUCT_NAME, PRODUCT_TYPE, PRODUCT_QUANTITY, NEXT_ORDER_DATE,
DELIVERY_DATE)
VALUES
( 3,'TABLE','STEEL',100,'2022/03/03 19:10:10:10', '2022/03/03 19:10:10:10');

ST03N does not collect indirectly called transactions in custom code. This means if
custom code uses a call transaction XYZA, the transaction XYZA is NOT recorded in
ST03N

select AEDAT from sapabap1.ekko where AEDAT='20210303';

hdbsql SBX=> \dc ekko


https://help.sap.com/viewer/f1b440ded6144a54ada97ff95dac7adf/2.7/en-US/
c24d054bbb571014b253ac5d6943b5bd.html
\de sapabap1

./bplist -s 2022-03-02 -e 2022-03-02 -C mdm-db1_nbu -t 24 /


bplist -t 4 -R -l -s 2022-02-20 -e 2022-02-21 -C mdm-db1_nbu /

./bplist -t 4 -R -l -s 2022-02-20 -e 2022-02-21 -C mdm-db1_nbu /

[root@ORACLE-TEST1 bin]# ./bplist -t 4 -R -l -s 02/20/2022 -e 02/21/2022 -C


vfiledb_bak /
-rw-rw---- oracle oinstall 12320768 Feb 21 22:26 /cntrl_7463_1_1097274367
-rw-rw---- oracle oinstall 2070528K Feb 21 22:22 /al_7462_1_1097274170
-rw-rw---- oracle oinstall 2191104K Feb 21 22:22 /al_7461_1_1097274162
-rw-rw---- oracle oinstall 2190848K Feb 21 22:19 /al_7460_1_1097273976
-rw-rw---- oracle oinstall 2192128K Feb 21 22:19 /al_7459_1_1097273968
-rw-rw---- oracle oinstall 2190848K Feb 21 22:16 /al_7458_1_1097273772
-rw-rw---- oracle oinstall 2191872K Feb 21 22:16 /al_7457_1_1097273771
-rw-rw---- oracle oinstall 262144 Feb 21 22:12 /bk_7456_1_1097273558
-rw-rw---- oracle oinstall 12320768 Feb 21 22:10 /bk_7455_1_1097273412
-rw-rw---- oracle oinstall 1413376K Feb 21 22:00 /bk_7454_1_1097272817
-rw-rw---- oracle oinstall 1558016K Feb 21 22:00 /bk_7453_1_1097272817
-rw-rw---- oracle oinstall 12320768 Feb 20 22:57 /cntrl_7452_1_1097189856

set global wait_timeout=28800;

FORMAT 'bk_%s_%p_%t'

./bplist -t 4 -R -l -s 02/20/2022 -e 02/21/2022 -C vfiledb_bak /

bplist -s 02/24/2022 -e 02/24/2022

bplist -s 02/02/2022 -e 02/02/2022

./bplist -s 2022-03-02 -e 2022-03-02

select * from sapabap1.ekko where AEDAT

SELECT Upper(F.TABLESPACE_NAME) ,D.TOT_GROOTTE_MB,D.TOT_GROOTTE_MB-


F.TOTAL_BYTES,To_char(Round(( D.TOT_GROOTTE_MB - F.TOTAL_BYTES )/D.TOT_GROOTTE_MB *
100, 2), '990.99')|| '%' "ʹ�ñ�",F.TOTAL_BYTES,F.MAX_BYTES
FROM (SELECT TABLESPACE_NAME,
Round(Sum(BYTES) / ( 1024 * 1024 ), 2) TOTAL_BYTES,
Round(Max(BYTES) / ( 1024 * 1024 ), 2) MAX_BYTES
FROM SYS.DBA_FREE_SPACE
GROUP BY TABLESPACE_NAME) F,
(SELECT DD.TABLESPACE_NAME,
Round(Sum(DD.BYTES) / ( 1024 * 1024 ), 2) TOT_GROOTTE_MB
FROM SYS.DBA_DATA_FILES DD
GROUP BY DD.TABLESPACE_NAME) D
WHERE D.TABLESPACE_NAME = F.TABLESPACE_NAME
ORDER BY 1;

127.0.0.1 localhost

# special IPv6 addresses


::1 localhost ipv6-localhost ipv6-loopback

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
172.19.4.117 saphanap02 saphanap02.wdhac.com.cn
172.19.4.110 saphanap01 saphanap01.wdhac.com.cn
#SAP APP
172.19.6.200 sapprdapp sapprdapp.wdhac.com.cn
172.19.6.196 sapprdapp02 sapprdapp02.wdhac.com.cn
172.19.2.232 wdhac-nbu-master
172.19.2.233 wdhac-nbu-media

10.2.9.43
OGG��Ŀ����10.2.9.43 ORACLEVMES-PLM
172.16.16.26
VMES-PLM

[inifile_checker]/replicate = true

LOOP EXECUTE IMMEDIATE 'GRANT SELECT ON ' || x.table_name || ' TO dmpqry'; END
LOOP; FOR x IN (SELECT * FROM user_tables)

set serveroutput on

declare
cursor c1 is select table_name from dba_tables where owner='ATHZBC';
cmd varchar2(200);
begin
for c in c1 loop
cmd := 'GRANT SELECT ON ATHZBC.'||c.table_name||' to dmpqry;';
--execute immediate cmd;
DBMS_OUTPUT.PUT_LINE(cmd);
end loop;
end;

./hdbuserstore list

��1.hana��system replicationʱ��,ͨ��ָ‫���ݻ‬ӽ‫���ڵ‬Լӿ���

select * from table(dbms_xplan.display('5gnb4h2vy6yvd'));


SELECT * FROM table(dbms_xplan.display_awr ('5gnb4h2vy6yvd',null,null,'advanced'));

ZCXTSC.TG_GPSQD_ZX to ZCXTSC.TG_GPSQD_ZX

2udxb01xq51fd SELECT * FROM VMES_IF_MS05

sapcontrol -nr 00 -function StopSystem HDB


hdbnsutil -sr_register --name=HANA_PRI --remoteHost=saphanap02 --remoteInstance=00
--mode=syncmem --operationMode=logreplay

HANA������ִ ���л����� HANA_SEC�‫�ڵ‬


hdbnsutil -sr_takeover

hdbnsutil -sr_state --sapcontrol=1

inifile_checker

hdbnsutil -sr_unregister

cdpy
python systemReplicationStatus.py
python landscapeHostConfiguration.py

hdbnsutil -sr_enable --name=HANA_PRI

SELECT * FROM table(dbms_xplan.display_awr ('2udxb01xq51fd',null,null,'advanced'));

SELECT * FROM VMES_IF_MS05

7v56m4wp4h1uj

10.2.9.38 MYSQL

163424.1
select a.spid from v$process a ,v$session b where a.addr=b.paddr and b.sid in
(select sid from dba_jobs_running);

view ggsevt

UPPER(F.TABLESPACE_NAME) TOT_GROOTTE_MB
------------------------------------------------------------ --------------
D.TOT_GROOTTE_MB-F.TOTAL_BYTES ʹ�ñ� TOTAL_BYTES MAX_BYTES
------------------------------ ---------------- ----------- ----------
MESPDB 268000
241322.81 90.05% 26677.19 3968

DMS5.0-MYSQL5-DEV-10.5.71.31

DMS5.0-DB06-TEST--10.5.71.50
DMS5.0-DB12-TEST--10.5.71.56

chfs -a size=+3072M /oracle

/u01/app/11.2.0.4/grid/bin/ocrcheck
1.�鿴��Ч��OCR����
ocrconfig -showbackup
2.�ֶ����� OCR
ocrconfig -manualbackup

backup archivelog all format '/expdpfile/orclarchbk_%d_%T_%s' delete input;


delete input
oracleasm configure

# ls /sys/class/scsi_host/
host0 host1 host2

# echo '- - -' > /sys/class/scsi_host/host0/scan


# echo '- - -' > /sys/class/scsi_host/host1/scan
# echo '- - -' > /sys/class/scsi_host/host2/scan

cd /sys/class/scsi_host/
echo '- - -' > /sys/class/scsi_host/host0/scan
echo '- - -' > /sys/class/scsi_host/host1/scan
echo '- - -' > /sys/class/scsi_host/host2/scan
echo '- - -' > /sys/class/scsi_host/host3/scan
echo '- - -' > /sys/class/scsi_host/host4/scan

/dev/sdcd
/dev/sdce
/dev/sdcf
/dev/sdcg
/dev/mapper/360002ac0000000000000001b00024596

[root@dms4-db1 scsi_host]# oracleasm querydisk -p /dev/sdcd


Device "/dev/sdcd" is not marked as an ASM disk

[root@dms4-db1 scsi_host]# oracleasm querydisk -p


/dev/mapper/360002ac0000000000000001b00024596
Device "/dev/mapper/360002ac0000000000000001b00024596" is not marked as an ASM disk
[root@dms4-db1 scsi_host]#
[root@dms4-db1 scsi_host]# oracleasm querydisk -p
/dev/mapper/360a980002d6731614f5d426f63427157
Device "/dev/mapper/360a980002d6731614f5d426f63427157" is marked an ASM disk with
the label "DMS4DBDATAEX03"

[root@dms4-db1 scsi_host]# /usr/sbin/oracleasm createdisk NFRA01 /dev/sdcd


Unable to open device "/dev/sdcd": Device or resource busy
[root@dms4-db1 scsi_host]#

975 oracleasm createdisk DMS4DBDATADG12 /dev/dm-18


976 oracleasm createdisk DMS4DBDATADG13 /dev/dm-18
977 oracleasm createdisk DMS4DBDATADG13 /dev/dm-19
978 oracleasm scandisks

oracleasm querydisk -p /dev/dm-20

oracleasm createdisk NFRA01 /dev/dm-20

lrwxrwxrwx 1 root root 8 Sep 2 13:56 360002ac0000000000000001b00024596 -


> ../dm-20

alter diskgroup ASMDATA add FAILGROUP ASMDATA_0001 disk


'/dev/oracleasm/disks/XXX_100G';

ALTER DISKGROUP FRADG ADD DISK '/dev/oracleasm/disks/NFRA01';


SQL> select path,mount_status from v$asm_disk;

PATH
--------------------------------------------------------------------------------
MOUNT_S
-------
/dev/oracleasm/disks/DMS4DBDATA003
IGNORED

0 0 IGNORED MEMBER ONLINE


/dev/oracleasm/disks/DMS4DBDATA003 2017/02/01 18:10:35
0 1 CLOSED PROVISIONED ONLINE
/dev/oracleasm/disks/NFRA01
1 0 DATADG02_0000 DATADG02_0000 CACHED MEMBER
ONLINE /dev/oracleasm/disks/DMS4DBDATAEX01 2017/12/02 22:13:56
1 1 DATADG02_0001 DATADG02_0001 CACHED MEMBER
ONLINE /dev/oracleasm/disks/DMS4DBDATAEX02 2017/

ORA-15250: insufficient diskgroup space for rebalance completion


ORA-15067: command or option incompatible with diskgroup redundancy
ERROR: ORA-15075 signalled during reconfiguration of diskgroup DATADG
ORA-15032: not all alterations performed

TIME_OUT
SQL_CAUGHT_RABAX

/dev/oracleasm/disks/DMS4FRA1

ALTER DISKGROUP FRADG ADD DISK '/dev/oracleasm/disks/NFRA01';


SUCCESS: disk FRADG_0002 (2.3916003715) added to diskgroup FRADG
select INST_ID, OPERATION, STATE, POWER, SOFAR, EST_WORK, EST_RATE, EST_MINUTES
from GV$ASM_OPERATION where GROUP_NUMBER=2;

ALTER DISKGROUP FRADG ADD DISK '/dev/oracleasm/disks/NFRA01';


alter diskgroup FRADG drop DISK FRADG_0000;
alter diskgroup FRADG drop DISK FRADG_0001;

SQL> select group_number,name,state,mode_status from v$asm_disk where


GROUP_NUMBER=3;

GROUP_NUMBER NAME STATE MODE_ST


------------ ------------------------------ -------- -------
3 FRADG_0001 NORMAL ONLINE
3 FRADG_0000 DROPPING ONLINE
3 FRADG_0002 NORMAL ONLINE

select INST_ID, OPERATION, STATE, POWER, SOFAR, EST_WORK, EST_RATE, EST_MINUTES


from GV$ASM_OPERATION where GROUP_NUMBER=1;

oracleasm deletedisk DMS4FRA1;


oracleasm deletedisk FRA2;

alter diskgroup DATA rebalance power 10


oracleasm createdisk NDATAEX01 /dev/dm-4

show parameter asm_power_limit;

SQL> select group_number,name, path,FAILGROUP,TOTAL_MB, FREE_MB,REDUNDANCY from


v$asm_disk where GROUP_NUMBER=1;

GROUP_NUMBER NAME
------------ ------------------------------
PATH
--------------------------------------------------------------------------------
FAILGROUP TOTAL_MB FREE_MB REDUNDA
------------------------------ ---------- ---------- -------
1 DATADG02_0000
/dev/oracleasm/disks/DMS4DBDATAEX01
DATADG02_0000 1048593 259455 UNKNOWN

1 DATADG02_0001
/dev/oracleasm/disks/DMS4DBDATAEX02
DATADG02_0001 1048593 259464 UNKNOWN

GROUP_NUMBER NAME
------------ ------------------------------
PATH
--------------------------------------------------------------------------------
FAILGROUP TOTAL_MB FREE_MB REDUNDA
------------------------------ ---------- ---------- -------

1 DATADG02_0002
/dev/oracleasm/disks/DMS4DBDATAEX03
DATADG02_0002 1048593 259461 UNKNOWN

You might also like