Dataguard常用命令汇总
----标准DataGuard参数设置------------------------------
alter system set log_archive_dest_2='SERVICE=ta_std REOPEN=300 VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLES) db_unique_name=ta_std';
alter system set fal_server='ta_std';
alter system set fal_client='ta';
alter system set fal_server='ta';
alter system set fal_client='ta_std';
----利用ssh tunnel的DataGuard参数设置------------------------------
alter system set log_archive_dest_2 = 'SERVICE=ta_ssh NOREOPEN VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLES) db_unique_name=ta_std alternate=log_archive_dest_3';
alter system set log_archive_dest_state_2= enable;
--注意:log_archive_dest_2需要设置noreopen或者reopen=0属性,否则无法迅速切换到备用路径。
alter system set log_archive_dest_3 = 'SERVICE=ta_std REOPEN=300 VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLES) db_unique_name=ta_std';
alter system set log_archive_dest_state_3=alternate;
--注意:当归档目标log_archive_dest_2不能正常归档时,数据库切换归档目标到log_archive_dest_3,即使log_archive_dest_2归档目标恢复正常,也不会再自动切换回去,需要手工重新修改路径状态参数:
--alter system set log_archive_dest_state_2= enable;
--alter system set log_archive_dest_state_3= alternate;
alter system set fal_server = 'ta_ssh';
alter system set fal_client = 'ta';
测试
tnsping ta tnsing ta_std tnsing ta_ssh
------------------------------------------------------
p170a: ssh -L 15210:p170b:1521 -C -N p170b
p170b: ssh -L 15210:p170a:1521 -C -N p170a
redhat1: ssh -L 15210:redhat2:1521 -C -N redhat2
redhat2: ssh -L 15210:redhat1:1521 -C -N redhat1
----DataGuard 中注册日志文件------------------------------
alter database register OR replace logfile '/data/arch_ta/1_515_673519034.dbf';
注册日志文件
catalog archivelog '....';
ALTER SESSION SET nls_date_format = 'YYYY-MM-DD HH24:MI:SS';
SELECT TIMESTAMP,MESSAGE FROM V$DATAGUARD_STATUS;
SELECT * FROM (SELECT THREAD#,SEQUENCE#,FIRST_CHANGE#,NEXT_CHANGE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY FIRST_CHANGE# DESC) WHERE ROWNUM<20;
一、PRIMARY DATABASE
1、设置DB FORCE_LOGGING为YES
SELECT FORCE_LOGGING FROM V$DATABASE;
ALTER DATABASE FORCE LOGGING;
ALTER DATABASE NO FORCE LOGGING;
2、设置保护模式
SELECT OPEN_MODE,DATABASE_ROLE,SWITCHOVER_STATUS,PROTECTION_MODE, PROTECTION_LEVEL FROM V$DATABASE;
ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PROTECTION;
ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE AVAILABILITY;
ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE;
3、设置归档目标
ALTER SYSTEM SET log_archive_dest_1='location=/app/oracle/arch';
ALTER SYSTEM set LOG_ARCHIVE_DEST_2='SERVICE=ta_std REOPEN=300 VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLES)';
ALTER SYSTEM SET log_archive_dest_state_1=enable;
ALTER SYSTEM SET log_archive_dest_state_2=defer;
ALTER SYSTEM SET fal_server=ta_std;
ALTER SYSTEM SET fal_client=fmp;
ALTER SYSTEM set DB_FILE_NAME_CONVERT='fmpdb','fmpdb' SCOPE=SPFILE;
ALTER SYSTEM set LOG_FILE_NAME_CONVERT='fmpdb','fmpdb' SCOPE=SPFILE;
ALTER SYSTEM SET standby_file_management=auto;
二、STANDBY DATABASE
1、建目录结构
D:\oracle\product\10.2.0\admin
D:\oracle\product\10.2.0\flash_recovery_area
D:\oracle\product\10.2.0\oradata\fmpdb
D:\oracle\product\10.2.0\oradata\fmpdbarch
2、copy
D:\oracle\product\10.2.0\db_1\database\PWDfmpdb.ora
D:\oracle\product\10.2.0\db_1\database\SPFILEFMPDB.ORA
D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\listener.ora 需修改IP
D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\tnsnames.ora
C:\> ORADIM -NEW -sid fmpdb
C:\> orapwd file=D:\oracle\product\10.2.0\db_1\database\PWDfmpdb.ora password=oracle force=y
--password必须与PRIMARY保持一致
starup nomount
ALTER SYSTEM SET log_archive_dest_1='location=D:\oracle\product\10.2.0\oradata\fmpdbarch';
ALTER SYSTEM set LOG_ARCHIVE_DEST_2='SERVICE= REOPEN=300 VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLES)';
--ALTER SYSTEM reset LOG_ARCHIVE_DEST_2 scope=spfile sid='*';
ALTER SYSTEM SET log_archive_dest_state_1=enable;
ALTER SYSTEM SET log_archive_dest_state_1=defer;
ALTER SYSTEM SET fal_server=fmp;
ALTER SYSTEM SET fal_client=fmp_std;
三、PRIMARY DATABASE
RMAN 备份:
rman target /
crosscheck backup;
delete noprompt expired backup;
crosscheck archivelog all;
delete noprompt expired archivelog all;
BACKUP format 'D:\oracle\product\10.2.0\oradata\backup\%d_STBY_%T_%s_%p' current controlfile for standby;
BACKUP format 'D:\oracle\product\10.2.0\oradata\backup\%d_FULL_%T_%s_%p' database MAXSETSIZE 2G;
SQL 'alter system archive log current';
BACKUP format 'D:\oracle\product\10.2.0\oradata\backup\%d_ARCH_%T_%s_%p' archivelog all MAXSETSIZE 2G;
exit;
四、STANDBY DATABASE
1、copy 主D:\oracle\product\10.2.0\oradata\backup\*.*至备
2、
RMAN target sys/oracle@fmp
connect auxiliary sys/oracle@fmp_std
duplicate target database for standby nofilenamecheck;
[dorecover];
五、PRIMARY DATABASE
ALTER SYSTEM SET log_archive_dest_state_2=enable;
六、STANDBY DATABASE
startup mount
ALTER SYSTEM SET log_archive_dest_state_2=enable;
--启动了MRP0进程(Managed Standby Recovery)
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
ALTER DATABASE OPEN;
七、检查
--查询尚未APPLIED的archived log(STANDBY端)
SELECT * FROM (SELECT THREAD#,SEQUENCE#,FIRST_CHANGE#,NEXT_CHANGE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY FIRST_CHANGE# DESC) WHERE ROWNUM<20;
--察看从数据库已经归档的redo
SELECT REGISTRAR,CREATOR,THREAD#,SEQUENCE#,APPLIED,FIRST_CHANGE#,NEXT_CHANGE# FROM V$ARCHIVED_LOG;
--察看从数据库已经应用的redo
SELECT THREAD#, SEQUENCE#, FIRST_CHANGE#, NEXT_CHANGE# FROM V$LOG_HISTORY;
--DATAGUARD 状态
ALTER SESSION SET nls_date_format = 'YYYY-MM-DD HH24:MI:SS';
SELECT TIMESTAMP,MESSAGE FROM V$DATAGUARD_STATUS;
--从数据库端察看RFS(Remote File Service)接收日志情况和MRP应用日志同步主数据库情况
COL STATUS FORMAT A15
SELECT PROCESS,STATUS,THREAD#,SEQUENCE#,BLOCK#,BLOCKS FROM V$MANAGED_STANDBY;
--察看从数据库是否和主数据库同步
COL DEST_NAME FORMAT A20
SELECT DEST_NAME,ARCHIVED_THREAD#, ARCHIVED_SEQ#, APPLIED_THREAD#, APPLIED_SEQ# FROM V$ARCHIVE_DEST_STATUS;
col DESTINATION format a50
SELECT DEST_NAME,DESTINATION, STATUS, ARCHIVED_THREAD#, ARCHIVED_SEQ# FROM V$ARCHIVE_DEST_STATUS WHERE STATUS <> 'DEFERRED' AND STATUS <> 'INACTIVE';
--GAP
SELECT * FROM V$ARCHIVE_GAP;
第二部分 主数据库正常切换
一 人工干预主数据库正常切换
1 在主数据库端检验数据库可切换状态
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
SWITCHOVER_STATUS
-----------------
TO STANDBY
1 row selected
SWITCHOVER_STATUS:TO STANDBY表示可以正常切换.
如果SWITCHOVER_STATUS的值为SESSIONS ACTIVE,表示当前有会话处于ACTIVE状态
2 开始主数据库正常切换 IP:172.16.75.35
如果SWITCHOVER_STATUS的值为TO STANDBY 则:
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY;
如果SWITCHOVER_STATUS的值为SESSIONS ACTIVE 则:
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN;
成功运行这个命令后,主数据库被修改为从数据库
3 重启先前的主数据库
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP MOUNT;
4 在从数据库端验证可切换状态 IP:172.16.75.30
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
SWITCHOVER_STATUS
-----------------
TO_PRIMARY
1 row selected
5 将目标从数据库转换为主数据库 IP:172.16.75.30
如果SWITCHOVER_STATUS的值为TO STANDBY 则:
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
如果SWITCHOVER_STATUS的值为SESSIONS ACTIVE 则:
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN;
成功运行这个命令后,从数据库被修改为主数据库
6 重启目标从数据库
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP;
7 先前主数据库启动日志传送进程
SQL> alter database recover managed standby database disconnect;
============================================================================
--ALTER SYSTEM set log_archive_config='DG_CONFIG=(testdb,testdb2)';
ALTER DATABASE CREATE STANDBY CONTROLFILE AS 'D:\oracle\product\10.2.0\oradata\boston\CONTROL01.CTL';
--启动了MRP0进程(Managed Standby Recovery)
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
ALTER DATABASE OPEN;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
SET PAGESIZE 200
SELECT * FROM V$PROCESS;
SELECT * FROM V$BGPROCESS WHERE PADDR<>'00';
SELECT USERNAME,TERMINAL,PROGRAM FROM V$PROCESS;
SELECT * FROM V$BGPROCESS WHERE PADDR<>'00';
COL USERNAME FORMAT A15
COL MACHINE FORMAT A30
SELECT USERNAME,MACHINE,TERMINAL,PROGRAM FROM V$SESSION;
-------
rman nocatalog target sys/oracle@ta
run {
ALLOCATE CHANNEL c1 DEVICE TYPE DISK CONNECT 'sys/oracle@ta1' format '/app/oracle/backup/rac1_%U';
ALLOCATE CHANNEL c2 DEVICE TYPE DISK CONNECT 'sys/oracle@ta2' format '/app/oracle/backup/rac2_%U';
sql 'alter system archive log current';
backup filesperset 3 archivelog all delete all input;
release channel c1;
release channel c2;
}
rman nocatalog target sys/oracle@ta
run {
ALLOCATE CHANNEL c1 DEVICE TYPE DISK CONNECT 'sys/oracle@ta1';
ALLOCATE CHANNEL c2 DEVICE TYPE DISK CONNECT 'sys/oracle@ta2';
BACKUP FORMAT '/app/oracle/backup/%t_%U' DATABASE PLUS ARCHIVELOG;
BACKUP FORMAT '/app/oracle/backup/%t_%U' CURRENT CONTROLFILE FOR STANDBY;
release channel c1;
release channel c2;
}
-----RAC环境下,交叉验证-----------------------------------------
allocate channel for maintenance device type DISK connect 'sys/oracle@ora921';
allocate channel for maintenance device type DISK connect 'sys/oracle@ora922';
crosscheck archivelog all;
delete noprompt expired archivelog all;
release channel;
crosscheck backup;
delete noprompt expired backup;
delete noprompt obsolete;
release channel;
-------------------------------------------------------------------------
RMAN>
catalog archivelog '/arch/ora92/2_1.dbf';
list archivelog all;
scp -p -r oracle@192.168.192.71:/app/oracle/backup /app/oracle
scp -p -r oracle@192.168.192.72:/app/oracle/backup /app/oracle
orapwd file=/app/oracle/product/10.2.0/db_1/dbs/orapwta password=oracle force=y
ALTER SYSTEM set DB_FILE_NAME_CONVERT='ta','ta' SCOPE=SPFILE;
ALTER SYSTEM set LOG_FILE_NAME_CONVERT='ta','ta' SCOPE=SPFILE;
rman target sys/oracle@ta
connect auxiliary sys/oracle@ta_std
duplicate target database for standby nofilenamecheck;
--primary
ALTER SYSTEM SET log_archive_config='dg_config=(ta,ta_std)' sid='*';
ALTER SYSTEM SET log_archive_dest_1='location=/app/oracle/arch' sid='*';
ALTER SYSTEM set LOG_ARCHIVE_DEST_2='SERVICE=ta_std REOPEN=300 VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLES) db_unique_name=ta_std' sid='*';
ALTER SYSTEM SET log_archive_dest_state_1=enable sid='*';
ALTER SYSTEM SET log_archive_dest_state_2=defer sid='*';
ALTER SYSTEM SET standby_file_management=auto sid='*'
--standby
ALTER SYSTEM SET log_archive_config='dg_config=(ta,ta_std)';
ALTER SYSTEM SET standby_file_management=auto;
ALTER SYSTEM SET fal_server='ta1','ta2';
ALTER SYSTEM SET fal_client='ta_std';
ALTER SYSTEM SET log_archive_dest_state_2=enable sid='*';
ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN;
recover managed standby database finish;
通过故障切换实现角色转换
1、查询备用数据中v$archive_gap视图来定位备用数据库中的日志缺失。
2、在备用数据库中通过下面的命令对归档日志进行注册
alter database register physical logfile '......';
3、alter database recover managed standby database finish;
alter database recover managed standby database finish skip standby logfile;
4、alter database commit to switchover to primary;
5、shutdown immediate;
startup;
fmpdb =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.2)(PORT = 1521))
(LOAD_BALANCE = yes)
)
(CONNECT_DAfmpdb =
(SERVICE_NAME = fmpdb)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 5)
)
)
)
fmpdb1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.1)(PORT = 1521))
)
(CONNECT_DAfmpdb =
(SERVICE_NAME = fmpdb)
)
)
fmpdb2 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.2)(PORT = 1521))
)
(CONNECT_DAfmpdb =
(SERVICE_NAME = fmpdb)
)
)
fmpdb_std =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.18.0.11)(PORT = 1521))
(CONNECT_DAfmpdb =
(SERVER = DEDICATED)
(SERVICE_NAME = fmpdb)
)
)
-------------------------------------------------------------------------------
http://hi.baidu.com/dbaeyes/blog/item/740c3bfb3e0d5361034f568e.html
standby 管理和维护2008年07月13日 星期日 00:31管理:
查询库状态:
SQL> select name,SWITCHOVER_STATUS,open_mode,PROTECTION_MODE,DATABASE_ROLE
from v$database;
验证archive log是否接收和 applied.
SQL> alter session set nls_datE_format='YYYY-MM-DD HH24:MI:SS';
select SEQUENCE#,DEST_ID,ARCHIVED,APPLIED,DELETED,
STATUS,FIRST_TIME from v$archived_log order by SEQUENCE#;
启动到管理模式:
SQL> shutdown immediate;
SQL> startup nomount
SQL> alter database mount standby database
SQL> recover managed standby database disconnect from session;
----------
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
10g以后,采用联机日志的传递传递方式,
SQL> recover managed standby database using current logfile disconnect from session;
启动到只读模式:
SQL> shutdown immediate;
SQL> startup nomount
SQL> alter database mount standby database
SQL> alter databae open read only;
在管理模式恢复到只读模式:
SQL> recover managed standby database cancel;
SQL> alter database open read only
在只读模式可以给数据库添加临时数据文件(在rman备份是没有备份的),想让standby提供只读服务或者切换成主库,最好先增加链式文件
SQL> alter tablespace temp add tempfile 'C:\oracle\product\10.2.0\oradata\dgtest\temp02.dbf' size 100m;
只读模式到管理模式
SQL> recover managed standby database disconnect from session;
在备库进行备份
1.停止应用程序,跳转到 read only模式,同坐backup database命令来备份数据库,这样数据库处于一致性模式
2. 备份完成后,备份控制文件
SQL> ALTER DATABASE BACKUP CONTROLFILE TO 'FILE NAME';
主备切换
正常切换 (switchover)
切换准备: 准备参数文件,平时应该备好,注意参数 fal_server,fal_client
先确认能否转换:
SELECT SWITCHOVER_STATUS FROM V$DATABASE;
主 -> 备
$lsnrclt stop
杀光进程或者重启数据库
SQL> alter database commit to switchover to physical standby with session shutdown;
SQL> shutdown immediate;
SQL> startup nomount pfile ='';
SQL> alter database mount standby database;
SQL> recover managed standby database disconnect;
备 -> 主
SQL> alter database commit to switchover to primary with session shutdown;
SQL> shutdown immediate
SQL> startup pfile =''
如果考虑在主备库来回切换,要保证数据库版本一致,参数compatible一致
失败切换 (Failover)
主服务器不能使用情况下
在备库
SQL> recover managed standby database cancel;
--如果在备用库上有备用库日志文件,参考命令
SQL> alter database recover managed standby database finish; -- [force|wait|nowait] 10g or later
--没有备库日志文件[10gR2之前]
SQL> alter database recover managed standby database finish skip standby logfile;
--切换备库到主库
SQL> alter database commit to switchover to primary;
-- open
SQL> shutdown immediate;
SQL> startup pfile=''
如果还有为传递的归档日志或者主库的联机日志
SQL>alter database register logfile 'c:\...'
SQL>recover standby database;
强行切换(激活)
激活备用服务器,在重启数据库时,备库会resetlog。
SQL>alter system archive log current;
SQL>recover managed standby database cancel;
SQL>alter database activate standby database;
SQL>shutdown immediate;
SQL>startup pfile=''
-----
apply 主库redolog并强制切换
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
--选定redolog恢复
SQL> recover standby database until cancel;
Specify log: { =suggested | filename | AUTO | CANCEL}
/u01/oradata/dgtest/redo02.log
Log applied.
Media recovery complete.
recovery 完成之后就要failover了。
SQL>alter database activate standby database;
SQL>shutdown immediate;
SQL>startup pfile=''
-- http://hi.baidu.com/wa0362/blog/item/33e52912a91eadcbc2fd78b9.html
-- http://zf_wu.itpub.net/
-- 参考来源: 《oracle高可用环境》
--http://www.oracleblog.cn/study-note/reduce-the-data-loss-of-data-guard-when-failover/
相关视图
v$archive_dest
v$archive_dest_status
v$log_history
v$archvied_log
v$managed_standby
v$archive_gap
-- EOF --
http://oracle.chinaitlab.com/serial/740174.html
激活备库到read/write状态
SQL> alter database activate standby database;
数据库已更改。
SQL> alter database open;
数据库已更改。
转换成备库
SQL> alter database convert to physical standby;
数据库已更改。
-- EOF --
Dataguard常用命令汇总的更多相关文章
- 20145222《信息安全系统设计基础》Linux常用命令汇总
学习Linux时常用命令汇总 通过Ctrl+f键可在该网页搜索到你想要的命令. Linux中命令格式为:command [options] [arguments] //中括号代表是可选的,即有些命令不 ...
- Oozie命令行常用命令汇总[转]
Oozie命令行常用命令汇总 有时候脚本跑多了就不愿意在OozieWeb端去看脚本的运行情况了.还好Oozie提供了很多命令行命令.能通过命令行直接检索自己想看到的脚本信息.在这里简单进行一下总结.一 ...
- vim常用命令汇总
vim常用命令汇总: http://www.cnblogs.com/softwaretesting/archive/2011/07/12/2104435.html 定位 本行第一个字符 ctrl+$ ...
- 【Linux】Linux 常用命令汇总
查看软件xxx安装内容:dpkg -L xxx 查找软件库中的软件:apt-cache search 正则表达式 查找软件库中的软件:aptitude search 软件包 查找文件属于哪个包:dpk ...
- Docker笔记:常用命令汇总
Docker常用命令汇总 启动服务 [root@localhost ~]# service docker start Redirecting to /bin/systemctl start docke ...
- [svc][op]vim常用命令汇总
vim常用命令汇总: 定位 本行第一个字符 ctrl+$ 本行最后一个字符 0gg 文章首行 ctrl+G 文章行尾 u 撤销(Undo) 删除 D 从当前位置删除到行尾 ("d$" ...
- 【Ubuntu】常用命令汇总,整理ing
Ubuntu 常用命令(在此页面中Ctrl+F即可快速查找) 在Ubuntu系统使用过程中,会不断地接触到命令行操作,下面对一些常用的命令进行汇总,方便查找. 1.文件操作 1.1 文件复制拷贝 cp ...
- Linux常用命令汇总及使用方法(二)之文本编辑器VI
VI可能是在Linux中使用比较频繁的文本编辑器,如果不能熟练使用VI,在一定程度上会影响工作效率,所以在这里记录一下VI的常用命令及操作方式 在[root@test ~]# vi carrie.tx ...
- linux系统中日常运维常用命令汇总一
一.查看日志和机器相关信息常用命令 1.cat cat 命令连接文件并打印到标准输出设备上,cat经常用来显示文件的内容,类似于下的type命令注意:当文件较大时,文本在屏幕上迅速闪过(滚屏),用户往 ...
随机推荐
- linux查找有用日志常用技巧
对于高级测试人员来说.需要有快速定位问题的能力,而查看有效的日志就是其中有效的方法之一,然而服务器上的日志多如牛毛,如何快速从中找出所需信息非常重要,以下是我在工作中用到的查找日志的简单命令,希望对大 ...
- Java:内部类
1.内部类的定义: 一个内部类可以定义在另一个类里,可以定义在函数里,甚至可以作为一个表达式的一部分. 2.内部类的分类: Java中的内部类共分为四种: 成员内部类member inner clas ...
- Girls: different perspectives to consider
Girls: different perspectives to consider成为极品女人的十大要素The point of articles such as these isn't to dic ...
- java基本数据类型存储范围
数据类型可以分为两大类: 1)基本类型: 2)扩展类型. 先来看一下Java语言的基本数据类型.它包括 类型 描述 取值范围 Boolean 布尔型 只有两个值true.false Char ...
- Java-马士兵设计模式学习笔记-责任链模式-模拟处理Reques Response
一.目标 1.用Filter模拟处理Request.Response 2.思路细节技巧: (1)Filter的doFilter方法改为doFilter(Request,Resopnse,FilterC ...
- [转]应聘Java,jsp,j2ee软件工程师笔试中可能出现的问题
相信大家应聘的时候第一关就是笔试,即使是一位很有经验的工程师也不一定能够顺利通过,笔试不好,可能就无法进行面试,即使能够进行面试,考官对你的印象也不会很好,问的问题也会很多,估计很难吃的消,当然如果你 ...
- CentOS禁用root本地或远程ssh登录
有些特殊的情况我们需要禁止root在本地或远程使用ssh登录,以增加安全性. 禁止root本地登录 修改/etc/pam.d/login文件增加下面一行auth required pam_succee ...
- SPOJ 1811 Longest Common Substring 后缀自动机
模板来源:http://www.neroysq.com/?p=76 思路:http://blog.sina.com.cn/s/blog_7812e98601012dfv.html 题意就是求两个字符串 ...
- C# 读取指定URL的内容
#region 读取指定URL的内容 /// <summary> /// 读取指定URL的内容 /// </summary> /// <param name=" ...
- python 中的map 详解
python中的map函数应用于每一个可迭代的项,返回的是一个结果list.如果有其他的可迭代参数传进来,map函数则会把每一个参数都以相应的处理函数进行迭代处理.map()函数接收两个参数,一个是函 ...