--1 Oracle 版本查询
SELECT * FROM V$VERSION;
SELECT * FROM PRODUCT_COMPONENT_VERSION;
--2 Oracle字符集查看
SELECT * FROM Nls_Database_Parameters where PARAMETER in ('NLS_LANGUAGE','NLS_CHARACTERSET') ;--服务端
SELECT Userenv('language') FROM dual;--客户端
--3 oracle用户删除
--查看用户占用了多少空间
SELECT owner, tablespace_name, ROUND (SUM (BYTES) / 1024 / 1024/ 1024, 2) "USED(G)"
FROM dba_segments
GROUP BY owner, tablespace_name
ORDER BY SUM (BYTES) DESC;
--查询当前登陆用户所占空间大小:
select sum(BYTES) / 1024 / 1024/1024 as SIZE_G
from user_segments
--查询所有dba用户所占空间大小:
select sum(BYTES) / 1024 / 1024/1024 as SIZE_G
from dba_segments
--查看当前用户下所有表占用的空间情况:
select segment_name,tablespace_name,bytes,blocks from user_segments
/*先删除用户,再删除表空间,必须保证表空间没有用户使用才能删除*/
--查询用户的相关信息:
select * from DBA_USERS;
--删除用户:
drop user username cascade;
--删除表空间和它的系统文件:
drop tablespace YSSUCO including contents and datafiles;
--如果发现不能删除用户,应该是用户还有连接,查询用户的连接:
select username,sid,serial# from v$session where username='username';
--查询出他的sid,serial#,然后杀掉:
alter system kill session ‘1505,81’;
--再次查询,可以查询它的状态:
select saddr,sid,serial#,paddr,username,status from v$session where username='username';
--发现他的状态为KILLD时,已经杀掉,再次执行删除用户即可;
--4 Oracle用户创建
/*分为四步 */
/*第1步:创建数据表空间 */
create tablespace YSSUCO datafile '/u01/App/oracle/oradata/FA/YSSUCO01.DBF' size 1000M autoextend on next 100M maxsize 31900M;
/*第2步:Oracle表空间不足的处理方法*/
alter tablespace YSSUCO add datafile '/u01/app/oracle/oradata/FA/YSSUCO02.DBF' size 1000M autoextend on next 100M MAXSIZE 31900M;
alter tablespace YSSUCO add datafile '/u01/app/oracle/oradata/FA/YSSUCO03.DBF' size 1000M autoextend on next 100M MAXSIZE 31900M;
/*第3步:创建用户并指定表空间 */
CREATE USER username IDENTIFIED BY 1 DEFAULT TABLESPACE YSSUCO TEMPORARY TABLESPACE TEMP;
/*第4步:给用户授予权限 */
grant connect, resource, dba to username;
grant connect to username;
grant read,write on directory dp_dir to username;
grant exp_full_database,imp_full_database to username;
grant resource to username;
grant create database link to username;
grant create public synonym to username;
grant create synonym to username;
grant create view to username;
grant unlimited tablespace to username;
grant execute on dbms_crypto to username;
--5 Oracle创建数据库逻辑目录dp_dir
[root@CNZHAULAMC094 ~]# mkdir /dp_dir
[root@CNZHAULAMC094 ~]# chmod -R 777 /dp_dir
[root@CNZHAULAMC094 ~]# chmod -R 777 /dp_dir/expdp.dmp
[root@CNZHAULAMC094 ~]# su - oracle
[oracle@localhost ~]$ lsnrctl status;
[oracle@localhost ~]$ export ORACLE_SID=FA
[oracle@localhost ~]$ sqlplus / as sysdba;
SQL>select * from dba_directories; /*查询逻辑目录*/
SQL> create directory dp_dir as '/dp_dir'; /*创建数据库逻辑目录*/
--6 Oracle新建directory
/*1、查询有哪些directory*/
select * from dba_directories
/*2、把目录/dp_dir设置成dp_dir代表的directory*/
create or replace directory dp_dir as '/dp_dir';
/*3、赋权*/
grant read,write on directory dp_dir to username;
grant exp_full_database,imp_full_database to username;
/*4、删除*/
drop directory dp_dir
--7 Oracle数据备份
--表备份
/*1、备份表数据*/
create table user_info_bak as select * from user_info;
/*2、还原表数据*/
insert into user_info_bak select * from user_info;
--库备份,oracle 从一个oracle导数据到另外一个oracle
/*1、普通导库*/
exp INDBADMIN/INDBADMIN@10.1.252.38:1521/move owner=INDBADMIN file=D:INDBADMIN20190622.dmp log=D:INDBADMIN20190622.log
imp username/1@127.0.0.1:1521/orcl file=D:appyuoradatadp_dirnewgzdb.dmp log=D:appyuoradatadp_dirusername.log ignore=y FULL=y;
/*2、数据泵导库*/
1)按用户导
expdp v45test/1 schemas=v45test directory=dp_dir dumpfile=expdp.dmp ;
2)并行进程parallel
expdp v45test/1 directory=dp_dir dumpfile=expdp.dmp parallel=3 job_name=scott3
3)按表名导
expdp v45test/1 TABLES=t_s_user directory=dp_dir dumpfile=expdp.dmp;
4)按查询条件导
expdp v45test/1 directory=dp_dir dumpfile=expdp.dmp Tables=t_s_user query='WHERE c_user_code=ywy';
5)按表空间导
expdp v45test/1 directory=dp_dir dumpfile=expdp.dmp tablespaces=example;
6)导整个数据库
expdp v45test/1 directory=dp_dir dumpfile=expdp.dmp full=y;
5、还原数据
1)导到指定用户下
impdp username/1 DIRECTORY=dp_dir DUMPFILE=expdp.dmp SCHEMAS=username;
2)改变表的owner
impdp username/1 DIRECTORY=dp_dir DUMPFILE=expdp.dmp TABLES=v45test.dept REMAP_SCHEMA=v45test:username;
3)导入表空间
impdp username/1 DIRECTORY=dp_dir DUMPFILE=expdp.dmp TABLESPACES=example;
4)导入数据库
impdb username/1 DIRECTORY=dp_dir DUMPFILE=expdp.dmp FULL=y;
5)追加数据
impdp username/1 DIRECTORY=dp_dir DUMPFILE=expdp.dmp SCHEMAS=username TABLE_EXISTS_ACTION=append;
6)并行命令
从oss_scap_83(db_link名)导出scap用户,然后导入到本地数据库上scap用户上
impdp username/oracle NETWORK_LINK=oss_scap_83 directory=dp_dir SCHEMAS=scap job_name=expdmp parallel=4;
7)高版本导入底版本(12c到11g)
expdp v45test/1 directory=dp_dir dumpfile=expdp_%U.dmp parallel=6 Version=11.2.0.4.0 logfile=expdp.log schemas=v45test compression=all;
expdp v45test/1 directory=dp_dir dumpfile=expdp.dmp Version=11.2.0.4.0 logfile=expdp.log schemas=v45test ;
impdp username/1 directory=dp_dir dumpfile=expdp.dmp remap_schema=v45test:username logfile=impdp.log;
impdp username/1 directory=dp_dir parallel=6 dumpfile=expdp_01.dmp,expdp_02.dmp,expdp_03.dmp,expdp_04.dmp,expdp_05.dmp,expdp_06.dmp remap_schema=v45test:username logfile=impdp.log;
expdp username/1 directory=dp_dir dumpfile=expdp_%U.dmp parallel=6 logfile=expdp.log schemas=username compression=all;
8)不同用户不同表空间下的导入操作:
impdp 用户名/密码 directory='您创建的目录的名称' dumpfile='导出的文件名称'
remap_schema=导出的用户名称:要导入的用户名称 remap_tablespace=导出的表空间名称:要导入的表空间名称
例如:
[oracle@server36 ~]$ impdp system/oracle@XXX.XXX.XX.XXX/service_name directory=dp_dir remap_schema= EFMIS_23_YANSHI:efmis_23_20150511 dumpfile=EFMIS_23_YANSHI_201505110900.dmp
remap_schema=导出的用户:预备导入的用户
service_name:一般是orcl,可查询:select instance_name from v$instance;
9)数据文件压缩
/*压缩服务器上当前目录的内容为xxx.zip文件*/
zip -r expdp.zip ./*
/*解压zip文件到当前目录*/
unzip expdp.zip
--8 Oracle导库后操作
SQL>alter user test account unlock; --解锁用户
SQL>alter user username identified by 1; --数据库用户密码置1
SQL>update t_s_user set c_user_pwd = '
6B86B273FF34FCE19D6B804EFF5A3F5747ADA4EAA22F1D49C01E52DDB7875B4B' --系统用户密码置1
SQL> grant execute on DBMS_CRYPTO to test; --用户赋权
SQL> @D:Encrypt_AES.plb;
SQL> @D:Decrypt_AES.plb;
SQL> @D:调整sequence-生成脚本.sql;
--9 Oracle报错解决
ORA-04031: 无法分配 4064 字节的共享内存
第一种:治标不治本。
alter system flush shared_pool;
这种方法可以立即有效果,但是不是根本的解决办法,一小时左右又开始报上面的错误了,再次执行就可以了。
第二种:治标又治本。
ALTER SYSTEM SET SHARED_POOL_SIZE='100M' SCOPE=spfile;
1
然后重启下:
sql>shutdown immediate;
sql>startup;
---------------------
ORA-12519: TNS:no appropriate service handler found 解决
有时候连得上数据库,有时候又连不上.
可能是数据库上当前的连接数目已经超过了它能够处理的最大值.
select count(*) from v$process --当前的连接数
select value from v$parameter where name = 'processes' --数据库允许的最大连接数
修改最大连接数:
alter system set processes = 1000 scope = spfile;
重启数据库:
shutdown immediate;
startup;
--查看当前有哪些用户正在使用数据库
SELECT osuser, a.username,cpu_time/executions/1000000||'s', sql_fulltext,machine
from v$session a, v$sqlarea b
where a.sql_address =b.address order by cpu_time/executions desc;
select SEQ_ACM_CLAIM.NEXTVAL from DUAL --查询一下这个表的序列号在什么位子
alter sequence SEQ_ACM_CLAIM increment by 100 --表中SEQ_NO的值大于查询到的值,就将把索引值进行更新,设定序列步长为100(一般都是1)
select * from user_sequences; --查询所有所有索引:--
drop sequence SEQ_ACM_CLAIM; --删除索引:
CREATE UNIQUE INDEX SEQ_ACM_CLAIM ON TBL_ACM_CLAIM(SEQ_NO); ---创建索引
select * from t_s_db_up_his a where a.n_exe_status<>2; --表示执行失败的日志记录
JAVA.sql.BatchUpdateException: ORA-00001: 违反唯一约束条件 (TEST.PK_R_FR_VAT_LOCK) --问题
t_R_FR_VAT_LOCK--表名
select max(length(c_iden)) from t_R_FR_VAT_LOCK --查询约束条件最大几位
select max(c_iden) from t_R_FR_VAT_LOCK where length(c_iden)=6 --查询约束条件最大序列
select
Sequ_r_Fr_Vat_Lock.nextval from dual;--查询约束条件即将插入的序列,如果大于等于约束条件最大序列,就会报唯一性约束条件错误
alter sequence Sequ_r_Fr_Vat_Lock increment by 1000000; --不可以直接修改的,但是可以间接修改。
select
Sequ_r_Fr_Vat_Lock.nextval from dual;--修改步进的值,然后查询一次,
alter sequence Sequ_r_Fr_Vat_Lock increment by 1; --然后再把步进修改回去,相当于修改了序列的当前值。
--创建序列
create sequence sequ_d_ysskmtx3_set_temp002
increment by 1 -- 每次加几个
start with 1 -- 从1开始计数
nomaxvalue -- 不设置最大值
nocycle -- 一直累加,不循环
cache 10;
--删除序列
drop sequence sequ_d_ysskmtx3_set_temp002;
--查询序列
select sequ_d_ysskmtx3_set_temp002.nextval from dual;
--表信息收集语句
begin
dbms_stats.gather_table_stats(ownname => 'NEWGZDB',tabname => 'T_R_FR_ASTSTAT', estimate_percent => dbms_stats.auto_sample_size, method_opt => 'for all indexed columns',cascade => true, degree => 8);
end;
--索引重建:
alter index IDX_R_FR_ASTSTAT rebuild partition PART_2019;
alter index IDX_R_FR_ASTSTAT rebuild partition PART_2020;
--全表收集
declare
begin
for cur in (select owner, table_name
from dba_tables
where READ_ONLY = 'NO'
and temporary = 'N'
and iot_name is null
and cluster_name is null
and status = 'VALID'
and tablespace_name not in ('USERS', 'SYSTEM', 'SYSAUX')
and owner='NEWGZDB'
order by 1, 2) loop
dbms_stats.gather_table_stats(ownname => cur.owner,
tabname => cur.table_name,
estimate_percent => 25,
cascade => true,
degree => 4,
force => true);
end loop;
end;
--当前执行sql语句
select a.SID,
a.SERIAL#,
a.USERNAME,
b.PARSE_CALLS,
b.PARSING_SCHEMA_NAME,
b.CPU_TIME/1000000,
b.ELAPSED_TIME/1000000,
b.DISK_READS,
b.DIRECT_WRITES,
b.BUFFER_GETS,
a.event,
b.sql_text,
b.SQL_FULLTEXT
from v$session a inner join v$sqlarea b
on a.SQL_HASH_VALUE = b. hash_value and b.PARSING_SCHEMA_NAME=upper('smsdb')
--物理读最高sql语句
select a.USERNAME,
a. USER_ID,
b.PARSE_CALLS,
b.PARSING_SCHEMA_NAME,
b.CPU_TIME/1000000,
b.ELAPSED_TIME/1000000,
b.DISK_READS,
b.DIRECT_WRITES,
b.BUFFER_GETS,
b.sql_text,
b.SQL_FULLTEXT
from dba_users a inner join v$sqlarea b
on a.USER_ID = b.PARSING_USER_ID and b.PARSING_SCHEMA_NAME=upper('smsdb') and disk_reads>1000000
--查询前10名执行最多次数SQL语句
select sql_text "SQL语句", executions "执行次数"
from (select sql_text,
executions,
rank() over
(order by executions desc) exec_rank
from v$sqlarea)
where exec_rank <= 10;
--查询前10名占用CPU最高的SQL语句
select sql_text "SQL语句",
c_t "SQL执行时间(秒)",executions "执行次数",cs "每次执行时间(秒)" from (select sql_text,
cpu_time /1000000 c_t,executions,ceil(executions/(cpu_time/1000000))cs,
rank() over(order by cpu_time desc) top_time
from v$sqlarea) where top_time <= 10
--查询前10名执行时间最长SQL语句
select sql_text "SQL语句",
c_t "处理时间(秒)",executions "执行次数",cs "每次执行时间(秒)"
from (select sql_text,
ELAPSED_TIME / 1000000 c_t,executions,ceil(executions/(ELAPSED_TIME/1000000))cs,
rank() over(order by ELAPSED_TIME desc) top_time
from v$sqlarea) where top_time <= 10
--查询前10名最耗资源SQL语句
select sql_text "SQL语句",
DISK_READS "物理读次数",cs "每次执行时间(秒)"
from (select sql_text,
ELAPSED_TIME / 1000000 c_t,executions,ceil(executions/(ELAPSED_TIME/1000000))cs,DISK_READS,
rank() over(order by DISK_READS desc) top_disk
from v$sqlarea) where top_disk <= 10
--查询前10名最耗内存SQL语句
select sql_text "SQL语句",
BUFFER_GETS "内存读次数",cs "每次执行时间(秒)"
from (select sql_text,
ELAPSED_TIME / 1000000 c_t,executions,ceil(executions/(ELAPSED_TIME/1000000))cs,BUFFER_GETS,
rank() over(order by BUFFER_GETS desc) top_mem
from v$sqlarea) where top_mem <= 10
--查看锁表语句
Select
c.sid,
c.serial#,
d.name,
b.object_name,
c.username,
c.program,
c.osuser
from gv$Locked_object a, All_objects b, gv$session c, audit_actions d
where a.object_id = b.object_id
and a.inst_id = c.inst_id(+)
and a.session_id = c.sid(+)
and c.command = d.action;
--7 Oracle数据备份
表备份
--备份表语句:
create table user_info_bak as select * from user_info;
--还原表数据:;
insert into user_info_bak select * from user_info;
库备份
oracle 从一个oracle导数据到另外一个oracle
用exp和imp导出导入数据
导出:exp OSMPPORTAL/PORTAL@10.130.24.133:1521/omsp file=
/home/oracle/osmpportal.dmp
参数:owner=(system,sys)两个用户,tables=table1,table2 只要表结构不要数据:rows=n
导入:imp ccod/ccod@
192.168.30.20:1521/ccpbs16 file=/home/oracle/osmpportal.dmp fromuser=OSMPPORTAL touser=osmpportal
参数:imp 登陆的(有相应权限的)用户名/密码@oracle的ip:端口/sid file=文件目录 fromuser=导出时的用户 touser=要导入的用户
ignore=y有的表已经存在会报错,忽略
expdp和impdp
一 关于expdp和impdp 使用EXPDP和IMPDP时应该注意的事项:
EXP和IMP是客户端工具程序,它们既可以在客户端使用,也可以在服务端使用。
EXPDP和IMPDP是服务端的工具程序,他们只能在ORACLE服务端使用,不能在客户端使用。
IMP只适用于EXP导出的文件,不适用于EXPDP导出文件;IMPDP只适用于EXPDP导出的文件,而不适用于EXP导出文件。
expdp或impdp命令时,可暂不指出用户名/密码@实例名 as 身份,然后根据提示再输入,如:
expdp schemas=scott dumpfile=expdp.dmp DIRECTORY=dpdata1;
expdp OSMPPORTAL/PORTAL@ccpbszq DUMPFILE=osmpportaldp.dmp SCHEMAS=OSMPPORTAL
http://www.cnblogs.com/huacw/p/3888807.html
ORA-01031: insufficient privileges
原因:没有赋予相应权限
一:查看数据量
1.查询是否有用户:select * from dba_users where username='OSMPPORTAL'
2.查询当前用户总数据量:select sum(t.num_rows) from user_tables t
3.查询当前用户下各个表的数据量:select t.table_name,t.num_rows from user_tables t ORDER BY NUM_ROWS DESC
4.查询表空间对应的数据文件:select tablespace_name,file_name from dba_data_files
5.查询表空间对应的数据大小:select tablespace_name ,sum(bytes) / 1024 / 1024 as MB from dba_data_files group by tablespace_name;
6.查询数据量:select SEGMENT_NAME,s.BYTES/1024/1024/1024 as Gb from user_segments s where s.BYTES is not null order by s.BYTES desc
二:新建用户
1.新建用户:create user username identified by pwd
注:默认表空间:default tablespace hxzg_data;
2.修改密码:alter user username identified by newpwd
3.新建的用户也没有任何权限,必须授予权限
grant create session to zhangsan;//授予zhangsan用户创建session的权限,即登陆权限
grant unlimited tablespace to zhangsan;//授予zhangsan用户使用表空间的权限
grant create table to zhangsan;//授予创建表的权限
grante drop table to zhangsan;//授予删除表的权限
grant insert table to zhangsan;//插入表的权限
grant update table to zhangsan;//修改表的权限
grant all to public;//这条比较重要,授予所有权限(all)给所有用户(public)
4.drop user username; //删除用户
5.赋权限:grant resource,connect to db_hxzg;
6.给其他用户访问权限(db_hxzg以DBA权限登录)
grant select any table to sun;
几个问题
1.在机器orcl上查看用户默认表空间,以便导入时创建一样的表空间
select username,default_tablespace from dba_users where username ='CMS';
2.查看用户使用的表空间
select DISTINCT owner ,tablespace_name from dba_extents where owner like 'CMS';
3.查看表空间对应的数据文件,以便在B上创建大小合适的数据文件。
select file_name,tablespace_name from dba_data_files where tablespace_name in ('WORK01');
4.检查B机器的表空间,看是否存在work01表空间
select name from v$tablespace where name = ‘WORK01’;
查找不到,说明没有这个两个表空间,需要创建
5.要导入数据的server没有work01表空间,创建:
create tablespace work01
datafile '/u01/oradata/orac/work01.dbf'
size 200m
autoextend on
next 20m
maxsize unlimited
extent management local;
6. 在要导入的数据库上查找用户是否已经存在
select username from dba_users where username='CMS';
如果存在:
drop user cms cascade; --(删除用户及其拥有的所有对象)
-- 此时如果这个用户在连接,drop会出错,必须先杀掉用户的session,然后再drop
SELECT 'alter system kill session '''||SID||','||SERIAL#||''' immediate;'
FROM V$SESSION
WHERE USERNAME='CMS';
alter system kill session '93,56387' immediate;
alter system kill session '100,18899' immediate;
alter system kill session '135,24910' immediate;
alter system kill session '149,3' immediate;
alter system kill session '152,3' immediate;
alter system kill session '156,7' immediate;
alter system kill session '159,45889' immediate;
alter system kill session '160,1' immediate;
alter system kill session '161,1' immediate;
alter system kill session '162,1' immediate;
alter system kill session '163,1' immediate;
--再复制这些语句,粘贴到sqlplus中执行,来杀掉Test2的session。
如果不存在cms用户:
create user cms identified bycms default tablespace work01 temporary tablespace temp;
不管存不存在都应该给cms授权
grant connect,resource to cms;
7.最后将数据导入
下面在windows的cmd下将用户导进去
imp file=e:cms.dmp fromuser=cms touser=cms userid=cms/cms@orac
这里要注意的是之前我是用cms用户将数据导出来的,这个cms具有dba权限,那么这里导入的时候用的userid后面的cms也必须具有这个权限不然会报错
这里我们可以临时给cms赋予dba权限,最后回收他,但是回收之后,记得再给cms赋予resource权限NFO,USER_PROJECT_INFO) file=/home/oracle/osmp2.dmp
--11oracle如何生成awr报告
[root@localhost ~]# su - oracle
--查询生成awr报告生成位置
[oracle@localhost ~]$ pwd;
/home/oracle
oracle安装目录:
--oracle_home是oracle的产品目录。
[oracle@localhost ~]$ echo $ORACLE_HOME
--oracle_base 是oracle的根目录,
[oracle@localhost ~]$ echo $ORACLE_BASE
[oracle@localhost ~]$ env |grep ORA
[oracle@localhost ~]$ lsnrctl status;
[oracle@localhost ~]$ export ORACLE_SID=FA
[oracle@localhost ~]$ sqlplus / as sysdba;
SQL*Plus: Release 11.2.0.4.0 Production on Sat Aug 10 10:15:41 2019
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> exec dbms_workload_repository.create_snapshot;
PL/SQL procedure successfully completed.
SQL> exec dbms_workload_repository.create_snapshot;
PL/SQL procedure successfully completed.
SQL> @?/rdbms/admin/awrrpt
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
2340707931 TEST 1 test
Specify the Report Type
~~~~~~~~~~~~~~~~~~~~~~~
Would you like an HTML report, or a plain text report?
Enter 'html' for an HTML report, or 'text' for plain text
Defaults to 'html'
Enter value for report_type: html
Type Specified: html
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
* 2340707931 1 TEST test localhost.lo
caldomain
Using 2340707931 for database Id
Using 1 for instance number
Specify the number of days of snapshots to choose from
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Entering the number of days (n) will result in the most recent
(n) days of snapshots being listed. Pressing <return> without
specifying a number lists all completed snapshots.
Enter value for num_days: 1
Listing the last day's Completed Snapshots
Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
test TEST 319 22 Jun 2020 00:00 1
320 22 Jun 2020 01:00 1
321 22 Jun 2020 02:00 1
322 22 Jun 2020 03:00 1
323 22 Jun 2020 04:00 1
324 22 Jun 2020 05:00 1
325 22 Jun 2020 06:00 1
326 22 Jun 2020 07:00 1
327 22 Jun 2020 08:00 1
328 22 Jun 2020 09:00 1
329 22 Jun 2020 10:00 1
330 22 Jun 2020 11:00 1
331 22 Jun 2020 12:00 1
332 22 Jun 2020 13:00 1
333 22 Jun 2020 14:00 1
334 22 Jun 2020 15:00 1
335 22 Jun 2020 16:00 1
336 22 Jun 2020 17:00 1
337 22 Jun 2020 18:00 1
338 22 Jun 2020 19:00 1
339 22 Jun 2020 20:00 1
340 22 Jun 2020 20:43 1
341 22 Jun 2020 20:44 1
342 22 Jun 2020 20:58 1
343 22 Jun 2020 20:58 1
Enter value for begin_snap: 339
Begin Snapshot Id specified: 339
Enter value for end_snap: 343
End Snapshot Id specified: 343
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_339_343.html. To use this name,
press <return> to continue, otherwise enter an alternative.
Enter value for report_name: awrrpt_20200622.htlm
......
</body></html>
Report written to awrrpt_20200622.htlm
awr报告生成路径:
/home/oracle/awrrpt_20200622.htlm