[20170623]利用传输表空间恢复数据库2.txt
[20170623]利用传输表空间恢复数据库2.txt
--//继续上午的测试,测试truncate,是否可行,理论讲应该没有问题.我主要的目的测试是否要切换日志.
--//参考链接 : http://blog.itpub.net/267265/viewspace-2141166/
1.环境:
SCOTT@book> @ &r/ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
SCOTT@book> alter system archive log current ;
System altered.
--//测试前先切换一次日志.
SCOTT@book> select count(*) from t;
COUNT(*)
------------
84192
SCOTT@book> select current_scn,sysdate from v$database ;
CURRENT_SCN SYSDATE
------------ -------------------
13276962316 2017-06-23 15:21:54
SCOTT@book> truncate table t ;
Table truncated.
2.开始测试恢复:
$ mkdir /home/oracle/aux1
RMAN> transport tablespace tea tablespace destination '/home/oracle/aux1' auxiliary destination '/home/oracle/aux1' until scn 13276962316;
RMAN-05026: WARNING: presuming following set of tablespaces applies to specified point-in-time
List of tablespaces expected to have UNDO segments
Tablespace SYSTEM
Tablespace UNDOTBS1
Creating automatic instance, with SID='hFvw'
initialization parameters used for automatic instance:
db_name=BOOK
db_unique_name=hFvw_tspitr_BOOK
compatible=11.2.0.4.0
db_block_size=8192
db_files=200
sga_target=1G
processes=80
db_create_file_dest=/home/oracle/aux1
log_archive_dest_1='location=/home/oracle/aux1'
#No auxiliary parameter file used
starting up automatic instance BOOK
Oracle instance started
Total System Global Area 1068937216 bytes
Fixed Size 2260088 bytes
Variable Size 285213576 bytes
Database Buffers 771751936 bytes
Redo Buffers 9711616 bytes
Automatic instance created
Running TRANSPORT_SET_CHECK on recovery set tablespaces
TRANSPORT_SET_CHECK completed successfully
contents of Memory Script:
{
# set requested point in time
set until scn 13276962316;
# restore the controlfile
restore clone controlfile;
# mount the controlfile
sql clone 'alter database mount clone database';
# archive current online log
sql 'alter system archive log current';
}
executing Memory Script
executing command: SET until clause
Starting restore at 2017-06-23 15:24:49
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=127 device type=DISK
allocated channel: ORA_AUX_DISK_2
channel ORA_AUX_DISK_2: SID=133 device type=DISK
allocated channel: ORA_AUX_DISK_3
channel ORA_AUX_DISK_3: SID=139 device type=DISK
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/BOOK/autobackup/2017_06_23/o1_mf_s_947414679_dns04qp7_.bkp
channel ORA_AUX_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/BOOK/autobackup/2017_06_23/o1_mf_s_947414679_dns04qp7_.bkp tag=TAG20170623T104439
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/home/oracle/aux1/BOOK/controlfile/o1_mf_dnsjl28h_.ctl
Finished restore at 2017-06-23 15:24:51
sql statement: alter database mount clone database
sql statement: alter system archive log current
contents of Memory Script:
{
# set requested point in time
set until scn 13276962316;
# set destinations for recovery set and auxiliary set datafiles
set newname for clone datafile 1 to new;
set newname for clone datafile 3 to new;
set newname for clone datafile 2 to new;
set newname for clone tempfile 1 to new;
set newname for datafile 6 to
"/home/oracle/aux1/tea01.dbf";
# switch all tempfiles
switch clone tempfile all;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile 1, 3, 2, 6;
switch clone datafile all;
}
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
renamed tempfile 1 to /home/oracle/aux1/BOOK/datafile/o1_mf_temp_%u_.tmp in control file
Starting restore at 2017-06-23 15:24:56
using channel ORA_AUX_DISK_1
using channel ORA_AUX_DISK_2
using channel ORA_AUX_DISK_3
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00003 to /home/oracle/aux1/BOOK/datafile/o1_mf_undotbs1_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00006 to /home/oracle/aux1/tea01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /home/oracle/backup/full_20170623_f8s7gn1n_1_1.bak
channel ORA_AUX_DISK_2: starting datafile backup set restore
channel ORA_AUX_DISK_2: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_2: restoring datafile 00001 to /home/oracle/aux1/BOOK/datafile/o1_mf_system_%u_.dbf
channel ORA_AUX_DISK_2: reading from backup piece /home/oracle/backup/full_20170623_f9s7gn1n_1_1.bak
channel ORA_AUX_DISK_3: starting datafile backup set restore
channel ORA_AUX_DISK_3: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_3: restoring datafile 00002 to /home/oracle/aux1/BOOK/datafile/o1_mf_sysaux_%u_.dbf
channel ORA_AUX_DISK_3: reading from backup piece /home/oracle/backup/full_20170623_f7s7gn1n_1_1.bak
channel ORA_AUX_DISK_1: piece handle=/home/oracle/backup/full_20170623_f8s7gn1n_1_1.bak tag=TAG20170623T100023
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:15
channel ORA_AUX_DISK_2: piece handle=/home/oracle/backup/full_20170623_f9s7gn1n_1_1.bak tag=TAG20170623T100023
channel ORA_AUX_DISK_2: restored backup piece 1
channel ORA_AUX_DISK_2: restore complete, elapsed time: 00:00:15
channel ORA_AUX_DISK_3: piece handle=/home/oracle/backup/full_20170623_f7s7gn1n_1_1.bak tag=TAG20170623T100023
channel ORA_AUX_DISK_3: restored backup piece 1
channel ORA_AUX_DISK_3: restore complete, elapsed time: 00:00:15
Finished restore at 2017-06-23 15:25:11
datafile 1 switched to datafile copy
input datafile copy RECID=17 STAMP=947431511 file name=/home/oracle/aux1/BOOK/datafile/o1_mf_system_dnsjl8cy_.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=18 STAMP=947431511 file name=/home/oracle/aux1/BOOK/datafile/o1_mf_undotbs1_dnsjl8cp_.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=19 STAMP=947431511 file name=/home/oracle/aux1/BOOK/datafile/o1_mf_sysaux_dnsjl8dc_.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=20 STAMP=947431511 file name=/home/oracle/aux1/tea01.dbf
{
# set requested point in time
set until scn 13276962316;
# online the datafiles restored or switched
sql clone "alter database datafile 1 online";
sql clone "alter database datafile 3 online";
sql clone "alter database datafile 2 online";
sql clone "alter database datafile 6 online";
# recover and open resetlogs
recover clone database tablespace "TEA", "SYSTEM", "UNDOTBS1", "SYSAUX" delete archivelog;
alter clone database open resetlogs;
}
executing Memory Script
executing command: SET until clause
sql statement: alter database datafile 1 online
sql statement: alter database datafile 3 online
sql statement: alter database datafile 2 online
sql statement: alter database datafile 6 online
Starting recover at 2017-06-23 15:25:11
using channel ORA_AUX_DISK_1
using channel ORA_AUX_DISK_2
using channel ORA_AUX_DISK_3
starting media recovery
archived log for thread 1 with sequence 697 is already on disk as file /u01/app/oracle/archivelog/book/1_697_896605872.dbf
archived log for thread 1 with sequence 698 is already on disk as file /u01/app/oracle/archivelog/book/1_698_896605872.dbf
archived log for thread 1 with sequence 699 is already on disk as file /u01/app/oracle/archivelog/book/1_699_896605872.dbf
archived log for thread 1 with sequence 700 is already on disk as file /u01/app/oracle/archivelog/book/1_700_896605872.dbf
archived log for thread 1 with sequence 701 is already on disk as file /u01/app/oracle/archivelog/book/1_701_896605872.dbf
archived log for thread 1 with sequence 702 is already on disk as file /u01/app/oracle/archivelog/book/1_702_896605872.dbf
archived log for thread 1 with sequence 703 is already on disk as file /u01/app/oracle/archivelog/book/1_703_896605872.dbf
archived log for thread 1 with sequence 704 is already on disk as file /u01/app/oracle/archivelog/book/1_704_896605872.dbf
archived log for thread 1 with sequence 705 is already on disk as file /u01/app/oracle/archivelog/book/1_705_896605872.dbf
archived log for thread 1 with sequence 706 is already on disk as file /u01/app/oracle/archivelog/book/1_706_896605872.dbf
archived log for thread 1 with sequence 707 is already on disk as file /u01/app/oracle/archivelog/book/1_707_896605872.dbf
archived log for thread 1 with sequence 708 is already on disk as file /u01/app/oracle/archivelog/book/1_708_896605872.dbf
archived log for thread 1 with sequence 709 is already on disk as file /u01/app/oracle/archivelog/book/1_709_896605872.dbf
archived log file name=/u01/app/oracle/archivelog/book/1_697_896605872.dbf thread=1 sequence=697
archived log file name=/u01/app/oracle/archivelog/book/1_698_896605872.dbf thread=1 sequence=698
archived log file name=/u01/app/oracle/archivelog/book/1_699_896605872.dbf thread=1 sequence=699
archived log file name=/u01/app/oracle/archivelog/book/1_700_896605872.dbf thread=1 sequence=700
archived log file name=/u01/app/oracle/archivelog/book/1_701_896605872.dbf thread=1 sequence=701
archived log file name=/u01/app/oracle/archivelog/book/1_702_896605872.dbf thread=1 sequence=702
archived log file name=/u01/app/oracle/archivelog/book/1_703_896605872.dbf thread=1 sequence=703
archived log file name=/u01/app/oracle/archivelog/book/1_704_896605872.dbf thread=1 sequence=704
archived log file name=/u01/app/oracle/archivelog/book/1_705_896605872.dbf thread=1 sequence=705
archived log file name=/u01/app/oracle/archivelog/book/1_706_896605872.dbf thread=1 sequence=706
archived log file name=/u01/app/oracle/archivelog/book/1_707_896605872.dbf thread=1 sequence=707
archived log file name=/u01/app/oracle/archivelog/book/1_708_896605872.dbf thread=1 sequence=708
archived log file name=/u01/app/oracle/archivelog/book/1_709_896605872.dbf thread=1 sequence=709
media recovery complete, elapsed time: 00:00:04
Finished recover at 2017-06-23 15:25:16
database opened
contents of Memory Script:
{
# make read only the tablespace that will be exported
sql clone 'alter tablespace TEA read only';
# create directory for datapump export
sql clone "create or replace directory STREAMS_DIROBJ_DPDIR as ''
/home/oracle/aux1''";
}
executing Memory Script
sql statement: alter tablespace TEA read only
sql statement: create or replace directory STREAMS_DIROBJ_DPDIR as ''/home/oracle/aux1''
Performing export of metadata...
EXPDP> Starting "SYS"."TSPITR_EXP_hFvw":
EXPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
EXPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE
EXPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
EXPDP> Master table "SYS"."TSPITR_EXP_hFvw" successfully loaded/unloaded
EXPDP> ******************************************************************************
EXPDP> Dump file set for SYS.TSPITR_EXP_hFvw is:
EXPDP> /home/oracle/aux1/dmpfile.dmp
EXPDP> ******************************************************************************
EXPDP> Datafiles required for transportable tablespace TEA:
EXPDP> /home/oracle/aux1/tea01.dbf
EXPDP> Job "SYS"."TSPITR_EXP_hFvw" successfully completed at Fri Jun 23 15:25:53 2017 elapsed 0 00:00:31
Export completed
/*
The following command may be used to import the tablespaces.
Substitute values for <logon> and <directory>.
impdp <logon> directory=<directory> dumpfile= 'dmpfile.dmp' transport_datafiles= /home/oracle/aux1/tea01.dbf
*/
--------------------------------------------------------------
-- Start of sample PL/SQL script for importing the tablespaces
--------------------------------------------------------------
-- creating directory objects
CREATE DIRECTORY STREAMS$DIROBJ$1 AS '/home/oracle/aux1/';
CREATE DIRECTORY STREAMS$DIROBJ$DPDIR AS '/home/oracle/aux1';
/* PL/SQL Script to import the exported tablespaces */
DECLARE
-- the datafiles
tbs_files dbms_streams_tablespace_adm.file_set;
cvt_files dbms_streams_tablespace_adm.file_set;
-- the dumpfile to import
dump_file dbms_streams_tablespace_adm.file;
dp_job_name VARCHAR2(30) := NULL;
-- names of tablespaces that were imported
ts_names dbms_streams_tablespace_adm.tablespace_set;
BEGIN
-- dump file name and location
dump_file.file_name := 'dmpfile.dmp';
dump_file.directory_object := 'STREAMS$DIROBJ$DPDIR';
-- forming list of datafiles for import
tbs_files( 1).file_name := 'tea01.dbf';
tbs_files( 1).directory_object := 'STREAMS$DIROBJ$1';
-- import tablespaces
dbms_streams_tablespace_adm.attach_tablespaces(
datapump_job_name => dp_job_name,
dump_file => dump_file,
tablespace_files => tbs_files,
converted_files => cvt_files,
tablespace_names => ts_names);
-- output names of imported tablespaces
IF ts_names IS NOT NULL AND ts_names.first IS NOT NULL THEN
FOR i IN ts_names.first .. ts_names.last LOOP
dbms_output.put_line('imported tablespace '|| ts_names(i));
END LOOP;
END IF;
END;
/
-- dropping directory objects
DROP DIRECTORY STREAMS$DIROBJ$1;
DROP DIRECTORY STREAMS$DIROBJ$DPDIR;
--------------------------------------------------------------
-- End of sample PL/SQL script
--------------------------------------------------------------
Removing automatic instance
shutting down automatic instance
database closed
database dismounted
Oracle instance shut down
Automatic instance removed
auxiliary instance file /home/oracle/aux1/BOOK/datafile/o1_mf_temp_dnsjlx0l_.tmp deleted
auxiliary instance file /home/oracle/aux1/BOOK/onlinelog/o1_mf_3_dnsjlwnd_.log deleted
auxiliary instance file /home/oracle/aux1/BOOK/onlinelog/o1_mf_2_dnsjlwj5_.log deleted
auxiliary instance file /home/oracle/aux1/BOOK/onlinelog/o1_mf_1_dnsjlw9h_.log deleted
auxiliary instance file /home/oracle/aux1/BOOK/datafile/o1_mf_sysaux_dnsjl8dc_.dbf deleted
auxiliary instance file /home/oracle/aux1/BOOK/datafile/o1_mf_undotbs1_dnsjl8cp_.dbf deleted
auxiliary instance file /home/oracle/aux1/BOOK/datafile/o1_mf_system_dnsjl8cy_.dbf deleted
auxiliary instance file /home/oracle/aux1/BOOK/controlfile/o1_mf_dnsjl28h_.ctl deleted
--//OK,没有问题,上午不知道第一次问题在那里.
$ ls -l //u01/app/oracle/archivelog/book
total 215340
-rw-r----- 1 oracle oinstall 79360 2017-06-23 09:54:41 1_695_896605872.dbf
-rw-r----- 1 oracle oinstall 11775488 2017-06-23 09:59:36 1_696_896605872.dbf
-rw-r----- 1 oracle oinstall 101888 2017-06-23 10:01:06 1_697_896605872.dbf
-rw-r----- 1 oracle oinstall 7680 2017-06-23 10:01:18 1_698_896605872.dbf
-rw-r----- 1 oracle oinstall 13824 2017-06-23 10:01:43 1_699_896605872.dbf
-rw-r----- 1 oracle oinstall 11830272 2017-06-23 10:07:44 1_700_896605872.dbf
-rw-r----- 1 oracle oinstall 298496 2017-06-23 10:10:11 1_701_896605872.dbf
-rw-r----- 1 oracle oinstall 99328 2017-06-23 10:12:26 1_702_896605872.dbf
-rw-r----- 1 oracle oinstall 745984 2017-06-23 10:15:53 1_703_896605872.dbf
-rw-r----- 1 oracle oinstall 50181632 2017-06-23 10:24:41 1_704_896605872.dbf
-rw-r----- 1 oracle oinstall 50181632 2017-06-23 10:24:42 1_705_896605872.dbf
-rw-r----- 1 oracle oinstall 50181632 2017-06-23 10:24:44 1_706_896605872.dbf
-rw-r----- 1 oracle oinstall 38688768 2017-06-23 13:55:30 1_707_896605872.dbf
-rw-r----- 1 oracle oinstall 5877760 2017-06-23 15:21:37 1_708_896605872.dbf
-rw-r----- 1 oracle oinstall 141824 2017-06-23 15:24:55 1_709_896605872.dbf
--//从时间看,在做传输时自动执行了一次日志切换.从alert中也可以看出来:
Fri Jun 23 15:21:37 2017
ALTER SYSTEM ARCHIVE LOG
Fri Jun 23 15:21:37 2017
Beginning log switch checkpoint up to RBA [0x2c5.2.10], SCN: 13276962295
Thread 1 advanced to log sequence 709 (LGWR switch)
Current log# 3 seq# 709 mem# 0: /mnt/ramdisk/book/redo03.log
Archived Log entry 1248 added for thread 1 sequence 708 ID 0x4fb7d86e dest 1:
Fri Jun 23 15:21:38 2017
Completed checkpoint up to RBA [0x2c5.2.10], SCN: 13276962295
Fri Jun 23 15:24:55 2017
ALTER SYSTEM ARCHIVE LOG
Fri Jun 23 15:24:55 2017
Beginning log switch checkpoint up to RBA [0x2c6.2.10], SCN: 13276962601
Thread 1 advanced to log sequence 710 (LGWR switch)
Current log# 1 seq# 710 mem# 0: /mnt/ramdisk/book/redo01.log
Archived Log entry 1249 added for thread 1 sequence 709 ID 0x4fb7d86e dest 1:
Fri Jun 23 15:25:04 2017
Incremental checkpoint up to RBA [0x2c5.2.0], current log tail at RBA [0x2c6.a.0]
Fri Jun 23 15:29:53 2017
Completed checkpoint up to RBA [0x2c6.2.10], SCN: 13276962601
3.导入数据:
SCOTT@book> grant dba to ttt IDENTIFIED BY ttt;
Grant succeeded.
$ cp /home/oracle/aux1/dmpfile.dmp /u01/app/oracle/admin/book/dpdump/
impdp system/oracle dumpfile=dmpfile.dmp transport_datafiles=/home/oracle/aux1/tea01.dbf REMAP_TABLESPACE=TEA:MILK
REMAP_SCHEMA=scott:ttt logfile=impdp.log
$ impdp system/oracle dumpfile=dmpfile.dmp transport_datafiles=/home/oracle/aux1/tea01.dbf REMAP_TABLESPACE=TEA:MILK
REMAP_SCHEMA=scott:ttt logfile=impdp.log
Import: Release 11.2.0.4.0 - Production on Fri Jun 23 15:36:59 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates. 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
Master table "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01": system/a****** dumpfile=dmpfile.dmp
transport_datafiles=/home/oracle/aux1/tea01.dbf REMAP_TABLESPACE=TEA:MILK REMAP_SCHEMA=scott:ttt logfile=impdp.log
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing object type TRANSPORTABLE_EXPORT/TABLE
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
Job "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully completed at Fri Jun 23 15:37:03 2017 elapsed 0 00:00:03
--//ok,成功!!
4.测试:
SCOTT@book> select count(*) from scott.t;
COUNT(*)
------------
0
SCOTT@book> select count(*) from ttt.t;
COUNT(*)
------------
84192
--//可以发现测试ok.可以发现rman的transport tablespace还是很简单的,封装的复杂的命令.
--//至于上午第一次失败,无法在重新再现了,放弃探究.
[20170623]利用传输表空间恢复数据库2.txt的更多相关文章
- [20170623]利用传输表空间恢复部分数据.txt
[20170623]利用传输表空间恢复部分数据.txt --//昨天我测试使用传输表空间+dblink,上午补充测试发现表空间设置只读才能执行impdp导入原数据,这个也很好理解.--//这样的操作模 ...
- 转://RMAN跨平台可传输表空间和数据库
参考链接: http://blog.itpub.net/23135684/viewspace-776048/ http://blog.sina.com.cn/s/blog_69e7b8d7010164 ...
- 如何通过RMAN使用传输表空间迁移到不同的Endian平台 (Doc ID 371556.1)
How to Migrate to different Endian Platform Using Transportable Tablespaces With RMAN (Doc ID 371556 ...
- mysql5.6之 传输表空间迁移表或恢复误删除的表
一,简单说明: 1),传输表空间的限制: 1,mysql 版本 5.6.6 及其以上,并且版本建议源和目标版本建议都是GA版并且大版本一样 2,表引擎为innodb并且开启独立表空间 innod ...
- 转 Oracle Transportable TableSpace(TTS) 传输表空间 说明
############1 迁移数据库的集中方法 三.相关技术 迁移方式 优势 不足1 Export and import • 对数据库版本,以及系统平台没有要求 • 不支持并发,速度慢• 停机时 ...
- 【TTS】传输表空间AIX asm -> linux asm
[TTS]传输表空间AIX asm -> linux asm 一.1 BLOG文档结构图 一.2 前言部分 一.2.1 导读和注意事项 各位技术爱好者,看完本文后,你可以掌 ...
- 【TTS】传输表空间Linux asm -> AIX asm
[TTS]传输表空间Linux asm -> AIX asm 一.1 BLOG文档结构图 一.2 前言部分 一.2.1 导读和注意事项 各位技术爱好者,看完本文后,你可以掌 ...
- oracle expdp/impdp/可传输表空间
oracle expdp/impdp/可传输表空间/及一些参数 Oracle data pump 导出操作能够将表.索引.约束.权限.PLSQL包.同义词等对象从数据库导出,并将它们保存在一种非文本格 ...
- oracle操作之传输表空间
一.传输表空间概述 什么是传输表空间,传输表空间技术始于oracle9i,不论是数据字典管理的表空间还是本地管理的表空间,都可以使用传输表空间技术:传输表空间不需要在源数据库和目标数据库之间具有同样的 ...
随机推荐
- 测试工具之Jmeter(使用badboy录制脚本)
前面使用badboy工具时说过,badboy是可以录制Jmeter的测试脚本,这样省去了自己设计测试用例的麻烦 Jmeter主要是一个性能测试工具,不光在web和http,现在扩展很多功能都可以在Jm ...
- app自动化测试中的相关api
这个说的api即python自动化测试中经常会使用到的一些api,具体如下: 1.find_element_by_id/find_elements_by_id 定位元素api,使用方法如下: driv ...
- 一些java多线程的经验
多线程的时候,可以try--catch后再catch中加continue让程序继续运行(当然,前提是这个异常的数据不影响后续的操作)
- hashcode和equals方法的区别和联系
说到 hashcode就要和Java中的集合,HashSet,HashMap 关系最为密切. 首先附录两张Java的集合结构图: 图二:(上图的简化版) 从Set集合的特点说起 & Set是如 ...
- Web渗透:PHP字符编码绕过漏洞总结
其实这东西国内少数黑客早已知道,只不过没有共享公布而已.有些人是不愿共享,宁愿烂在地里,另外的一些则是用来牟利. 该漏洞最早2006年被国外用来讨论数据库字符集设为GBK时,0xbf27本身不是一个有 ...
- centos下如何使用sendmail发送邮件
最近在实施服务端日志监控脚本,需要对异常情况发送邮件通知相关责任人,记录下centos通过sendmail发送邮件的配置过程. 一.安装sendmail与mail 1.安装sendmail: 1) ...
- 基于 zepto 的触摸函数封装
移动端使用 zepto 做一些基于触摸的动画的时候,需要开发一个函数库. 功能:实例化对象以后能够,触发相应的事件,能够返回给我,当前的移动方向和 X 轴 或者 Y 轴 的移动位移. var Touc ...
- Kafka实战-KafkaOffsetMonitor
1.概述 前面给大家介绍了Kafka的背景以及一些应用场景,并附带上演示了Kafka的简单示例.然后,在开发的过程当中,我们会发现一些问题,那就是消息的监控情况.虽然,在启动Kafka的相关服务后,我 ...
- Vue笔记:生命周期和钩子函数
前言 在使用vue一个多礼拜后,感觉现在还停留在初级阶段,虽然知道怎么和后端做数据交互,但是对于mounted这个挂载还不是很清楚的.放大之,对vue的生命周期不甚了解.只知道简单的使用,而不知道为什 ...
- Java并发编程笔记之CyclicBarrier源码分析
JUC 中 回环屏障 CyclicBarrier 的使用与分析,它也可以实现像 CountDownLatch 一样让一组线程全部到达一个状态后再全部同时执行,但是 CyclicBarrier 可以被复 ...