1、查询碎片程度高的表

条件为什么block>100,因为一些很小的表,只有几行数据实际大小很小,但是block一次性分配就是5个(11g开始默认一次性分配1M的block大小了,见create table storged的NEXT参数),5个block相对于几行小表数据来说就相差太大了。

算法中/0.9是因为块的pfree一般为10%,所以一个块最多只用了90%,而且一行数据大于8KB时容易产生行链接,把一行分片存储,一样的一个块连90%都用不满、

AVG_ROW_LEN还是比较准的,比如个人实验情况一表6个字段,一个number,其他5个都是char(100)但是实际数据都是’1111111’7位,AVG_ROW_LEN显示依然为513

SELECT TABLE_NAME,(BLOCKS*8192/1024/1024)"理论大小M",

(NUM_ROWS*AVG_ROW_LEN/1024/1024/0.9)"实际大小M",

round((NUM_ROWS*AVG_ROW_LEN/1024/1024/0.9)/(BLOCKS*8192/1024/1024),3)*100||'%' "实际使用率%"

FROM USER_TABLES where blocks>100 and (NUM_ROWS*AVG_ROW_LEN/1024/1024/0.9)/(BLOCKS*8192/1024/1024)<0.3

order by (NUM_ROWS*AVG_ROW_LEN/1024/1024/0.9)/(BLOCKS*8192/1024/1024) desc

2、查询索引碎片的比例

select name,del_lf_rows,lf_rows, round(del_lf_rows/decode(lf_rows,0,1,lf_rows)*100,0)||'%' frag_pct from index_stats where round(del_lf_rows/decode(lf_rows,0,1,lf_rows)*100,0)>30;

3、集群因子clustering_factor高的表

集群因子越接近块数越好,接近行数则说明索引列的列值相等的行分布极度散列,可能不走索引扫描而走全表扫描

select tab.table_name,tab.blocks,tab.num_rows,ind.index_name,ind.clustering_factor,

round(nvl(ind.clustering_factor,1)/decode(tab.num_rows,0,1,tab.num_rows),3)*100||'%' "集群因子接近行数"

from user_tables tab, user_indexes ind where tab.table_name=ind.table_name

and tab.blocks>100

and nvl(ind.clustering_factor,1)/decode(tab.num_rows,0,1,tab.num_rows) between 0.35 and 3

4、根据sid查spid或根据spid查sid

select s.sid,s.serial#,s.LOGON_TIME,s.machine,p.spid,p.terminal from v$session s,v$process p where s.paddr=p.addr and s.sid=XX or p.spid=YY

5、根据sid查看具体的sql语句

select username,sql_text,machine,osuser from v$session a,v$sqltext_with_newlines b

where DECODE(a.sql_hash_value, 0, prev_hash_value, sql_hash_value)=b.hash_value and a.sid=&sid order by piece;

6、根据spid查询具体的sql语句

select ss.SID, pr.SPID, ss.action, sa.SQL_FULLTEXT, ss.TERMINAL, ss.PROGRAM, ss.SERIAL#, ss.USERNAME, ss.STATUS, ss.OSUSER, ss.last_call_et

from v$process pr, v$session ss, v$sqlarea sa

where ss.status='ACTIVE' and ss.username is not null and pr.ADDR = ss.PADDR

and ss.SQL_ADDRESS = sa.ADDRESS and ss.SQL_HASH_VALUE = sa.HASH_VALUE

and pr.spid = XX

7、查看历史session_id的SQL来自哪个IP

(当然这是个误解,都是历史的了,怎么可能还查到spid,其实查看trace文件名就可以知道spid,trace文件里面有sid和具体sql,如果trace存在incident,那trace就看不到具体sql,但是可以在incident文件中看到具体的sql,如DW_ora_17751.trc中17751就是spid,里面有这样的内容Incident 115 created, dump file: /XX/incident/incdir_115/DW_ora_17751_i115.trc,那么在DW_ora_17751_i115.trc就可以看到具体的sql语句)

DB_ora_29349.trc中出现如下

*** SESSION ID:(5057.12807) 2016-10-26 14:45:52.726

通过表V$ACTIVE_SESSION_HISTORY来查,如下

select a.sql_id,a.machine,a.* from V$ACTIVE_SESSION_HISTORY a where a.session_id=5057 and a.SESSION_SERIAL#=12807

查询上面的machine的IP是多少

select s.sid,s.serial#,s.LOGON_TIME,s.machine,p.spid,p.terminal from v$session s,v$process p where s.paddr=p.addr and s.machine='localhost'

通过上面的spid在oracle服务器上执行netstat -anp |grep spid即可

[oracle@dwdb trace]$ netstat -anp |grep 17630

tcp 210 0 192.168.64.228:11095 192.168.21.16:1521 ESTABLISHED 17630/oracleDB

tcp 0 0 ::ffff:192.168.64.228:1521 ::ffff:192.168.64.220:59848 ESTABLISHED 17630/oracleDB

出现两个,说明来自220,连接了228数据库服务器,但是又通过228服务器的dblink去连接了16服务器

8、查询DML死锁会话sid,及引起死锁的堵塞者会话blocking_session

select sid, blocking_session, LOGON_TIME,sql_id,status,event,seconds_in_wait,state, BLOCKING_SESSION_STATUS from v$session where event like 'enq%' and state='WAITING' and BLOCKING_SESSION_STATUS='VALID'

BLOCKING_SESSION:Session identifier of the blocking session. This column is valid only if BLOCKING_SESSION_STATUS has the value VALID.

可以在v$session.LOGON_TIME上看到引起死锁的堵塞者会话比等待者要早

如果遇到RAC环境,一定要用gv$来查,并且执行alter system kill session 'sid,serial#'要到RAC对应的实例上去执行

或如下也可以

select

(select username from v$session where sid=a.sid) blocker,

a.sid,

a.id1,

a.id2,

' is blocking ' "IS BLOCKING",

(select username from v$session where sid=b.sid) blockee,

b.sid

from v$lock a, v$lock b

where a.block = 1

and b.request > 0

and a.id1 = b.id1

and a.id2 = b.id2;

9、查询DDL锁的sql

SELECT sid, event, p1raw, seconds_in_wait, wait_time

FROM sys.v_$session_wait

WHERE event like 'library cache %'

p1raw结果为'0000000453992440'

SELECT s.sid, kglpnmod "Mode", kglpnreq "Req", s.LOGON_TIME

FROM x$kglpn p, v$session s

WHERE p.kglpnuse=s.saddr

AND kglpnhdl='0000000453992440';

结果为671 0 3 2011-11-1 12:00:00

525 2 0 2011-11-4 12:00:00

10、查询锁住的DDL对象

select d.session_id,s.SERIAL#,d.name from dba_ddl_locks d,v$session s where d.owner='MKLMIGEM' and d.SESSION_ID=s.sid

11、查询当前正在执行的sql

SELECT s.sid,s.serial#,s.username,spid,v$sql.sql_id,machine,s.terminal,s.program,sql_text

FROM v$process,v$session s,v$sql

WHERE addr=paddr and s.sql_id=v$sql.sql_id AND sql_hash_value=hash_value

12、查询正在执行的SCHEDULER_JOB

select owner,job_name,sid,b.SERIAL#,b.username,spid from ALL_SCHEDULER_RUNNING_JOBS,v$session b,v$process where session_id=sid and paddr=addr

13、查询正在执行的dbms_job

select job,b.sid,b.SERIAL#,b.username,spid from DBA_JOBS_RUNNING a ,v$session b,v$process where a.sid=b.sid and paddr=addr

14、查询一个会话session、process平均消耗多少内存,查看下面avg_used_M值

select round(sum(pga_used_mem)/1024/1024,0) total_used_M, round(sum(pga_used_mem)/count(1)/1024/1024,0) avg_used_M,

round(sum(pga_alloc_mem)/1024/1024,0) total_alloc_M, round(sum(pga_alloc_mem)/count(1)/1024/1024,0) avg_alloc_M from v$process;

15、TOP 10 执行次数排序

select *

from (select executions,username,PARSING_USER_ID,sql_id,sql_text

from v$sql,dba_users where user_id=PARSING_USER_ID order by executions desc)

where rownum <=5;

16、TOP 10 物理读排序

select *

from (select DISK_READS,username,PARSING_USER_ID,sql_id,ELAPSED_TIME/1000000,sql_text

from v$sql,dba_users where user_id=PARSING_USER_ID order by DISK_READS desc)

where rownum <=5;

(不要使用DISK_READS/ EXECUTIONS来排序,因为任何一条语句不管执行几次都会耗逻辑读和cpu,可能不会耗物理读(遇到LRU还会耗物理读,LRU规则是执行最不频繁的且最后一次执行时间距离现在最久远的就会被交互出buffer cache),是因为buffer cache存放的是数据块,去数据块里找行一定会消耗cpu和逻辑读的。Shared pool执行存放sql的解析结果,sql执行的时候只是去share pool中找hash value,如果有匹配的就是软解析。所以物理读逻辑读是在buffer cache中,软解析硬解析是在shared pool)

17、TOP 10 逻辑读排序

select *

from (select BUFFER_GETS,username,PARSING_USER_ID,sql_id,ELAPSED_TIME/1000000,sql_text

from v$sql,dba_users where user_id=PARSING_USER_ID order by BUFFER_GETS desc)

where rownum <=5;

(不要使用BUFFER_GETS/ EXECUTIONS来排序,原因同16)

18、TOP 10 CPU排序

select *

from (select CPU_TIME/1000000,username,PARSING_USER_ID,sql_id,ELAPSED_TIME/1000000,sql_text

from v$sql,dba_users where user_id=PARSING_USER_ID order by CPU_TIME/1000000 desc)

where rownum <=5;

(不要使用CPU_TIME/ EXECUTIONS来排序,原因同16)

19、查询等待事件

select event,sum(decode(wait_time,0,0,1)) "之前等待次数", sum(decode(wait_time,0,1,0)) "正在等待次数",count(*) from v$session_wait group by event order by 4 desc

20、查询当前正在消耗temp空间的sql语句

Select distinct se.username,

se.sid,

su.blocks * to_number(rtrim(p.value))/1024/1024 as space_G,

su.tablespace,

sql_text

from V$TEMPSEG_USAGE su, v$parameter p, v$session se, v$sql s

where p.name = 'db_block_size'

and su.session_addr=se.saddr

and su.sqlhash=s.hash_value

and su.sqladdr=s.address

21、查询需要使用绑定变量的sql,10G以后推荐第二种

(任何一条执行过的语句不管执行了几次在V$SQL中都只有一条记录,V$SQL中会记录执行了几次。两条一模一样的语句但是在不同的schema下执行的两种结果,如select * from t1.test在sye、system下执行则V$SQL只有一条记录(谁先执行则PARSING_SCHEMA_NAME显示谁)。如在sys和system都执行select * from test则V$SQL中有两条记录,两条记录的CHILD_NUMBER和PARSING_SCHEMA_NAME不一样。同一个用户下执行一样的语句如果大小写不一样或加了hint的话则会出现多个V$SQL记录,说明V$SQL对应的sql语句必须一模一样,如果alter system flush shared_pool(主站慎用)后再执行一样的语句,发现语句在V$SQL中的SQL_ID和HASH_VALUE与之前的一样,说明SQL_ID和HASH_VALUE应该是oracle自己的一套算法来的,只是根据sql语句内容来进行转换,sql语句不变则SQL_ID和HASH_VALUE也不变。)

第一种

select * from (

select count(*),sql_id, substr(sql_text,1,40)

from v$sql

group by sql_id, substr(sql_text,1,40) having count(*) > 10 order by count(*) desc) where rownum<10

第二种

count(1)>10表示类语句运行了10次以上

select sql_id, FORCE_MATCHING_SIGNATURE, sql_text

from v$SQL

where FORCE_MATCHING_SIGNATURE in

(select /*+ unnest */

FORCE_MATCHING_SIGNATURE

from v$sql

where FORCE_MATCHING_SIGNATURE > 0

and FORCE_MATCHING_SIGNATURE != EXACT_MATCHING_SIGNATURE

group by FORCE_MATCHING_SIGNATURE

having count(1) > 10)

22、查看数据文件可用百分比

select b.file_id,b.tablespace_name,b.file_name,b.AUTOEXTENSIBLE,

ROUND(b.bytes/1024/1024/1024,2) ||'G' "文件总容量",

ROUND((b.bytes-sum(nvl(a.bytes,0)))/1024/1024/1024,2)||'G' "文件已用容量",

ROUND(sum(nvl(a.bytes,0))/1024/1024/1024,2)||'G' "文件可用容量",

ROUND(sum(nvl(a.bytes,0))/(b.bytes),2)*100||'%' "文件可用百分比"

from dba_free_space a,dba_data_files b

where a.file_id=b.file_id

group by b.tablespace_name,b.file_name,b.file_id,b.bytes,b.AUTOEXTENSIBLE

order by b.tablespace_name;

23、查看数据文件可用百分比

select b.file_id,b.tablespace_name,b.file_name,b.AUTOEXTENSIBLE,

ROUND(b.MAXBYTES/1024/1024/1024,2) ||'G' "文件最大可用总容量",

ROUND((b.bytes-sum(nvl(a.bytes,0)))/1024/1024/1024,2)||'G' "文件已用容量",

ROUND(((b.MAXBYTES/1024/1024/1024)-((b.bytes-sum(nvl(a.bytes,0)))/1024/1024/1024))/(b.MAXBYTES/1024/1024/1024),2)*100||'%' "文件可用百分比"

from dba_free_space a,dba_data_files b

where a.file_id=b.file_id and b.file_id>4

group by b.tablespace_name,b.file_name,b.file_id,b.bytes,b.AUTOEXTENSIBLE,b.MAXBYTES

order by b.tablespace_name;

24、查看表空间可用百分比

select b.tablespace_name,a.total,b.free,round((b.free/a.total)*100) "% Free" from

(select tablespace_name, sum(bytes/(1024*1024)) total from dba_data_files group by tablespace_name) a,

(select tablespace_name, round(sum(bytes/(1024*1024))) free from dba_free_space group by tablespace_name) b

WHERE a.tablespace_name = b.tablespace_name

order by "% Free";

25、查看临时表空间使用率

SELECT temp_used.tablespace_name,total,used,

total - used as "Free",

round(nvl(total-used, 0) * 100/total,3) "Free percent"

FROM (SELECT tablespace_name, SUM(bytes_used)/1024/1024 used

FROM GV_$TEMP_SPACE_HEADER

GROUP BY tablespace_name) temp_used,

(SELECT tablespace_name, SUM(bytes)/1024/1024 total

FROM dba_temp_files

GROUP BY tablespace_name) temp_total

WHERE temp_used.tablespace_name = temp_total.tablespace_name

26、查询undo表空间使用情况

select tablespace_name,status,sum(bytes)/1024/1024 M from dba_undo_extents group by tablespace_name,status

27、查看ASM磁盘组使用率

select name,round(total_mb/1024) "总容量",round(free_mb/1024) "空闲空间",round((free_mb/total_mb)*100) "可用空间比例" from gv$asm_diskgroup

28、统计每个用户使用表空间率

SELECT c.owner "用户",

a.tablespace_name "表空间名",

total/1024/1024 "表空间大小M",

free/1024/1024 "表空间剩余大小M",

( total - free )/1024/1024 "表空间使用大小M",

Round(( total - free ) / total, 4) * 100 "表空间总计使用率 %",

c.schemas_use/1024/1024 "用户使用表空间大小M",

round((schemas_use)/total,4)*100 "用户使用表空间率 %"

FROM (SELECT tablespace_name,

Sum(bytes) free

FROM DBA_FREE_SPACE

GROUP BY tablespace_name) a,

(SELECT tablespace_name,

Sum(bytes) total

FROM DBA_DATA_FILES

GROUP BY tablespace_name) b,

(Select owner ,Tablespace_Name,

Sum(bytes) schemas_use

From Dba_Segments

Group By owner,Tablespace_Name) c

WHERE a.tablespace_name = b.tablespace_name

and a.tablespace_name =c.Tablespace_Name

order by "用户","表空间名"

29、查看闪回区\快速恢复区空间使用率

select sum(percent_space_used)||'%' "已使用空间比例" from V$RECOVERY_AREA_USAGE

30、查看僵死进程,分两种

alter system kill session一执行则session即标记为KILLED,但是如果会话产生的数据量大则这个kill可能会比较久,在这个过程中session标记为KILLED但是这个会话还在V$session中,则V$session.paddr还在,所以可以匹配到V$process.addr,所以process进程还在;当kill过程执行完毕,则这个会话即不在V$session中

会话不在的

select * from v$process where addr not in (select paddr from v$session) and pid not in (1,17,18)

会话还在的,但是会话标记为killed

select * from v$process where addr in (select paddr from v$session where status='KILLED')

再根据上述结果中的SPID通过如下命令可以查看到process的启动时间

ps auxw|head -1;ps auxw|grep SPID

31、查看行迁移或行链接的表

select * From dba_tables where nvl(chain_cnt,0)<>0

chain_cnt :Number of rows in the table that are chained from one data block to another or that have migrated to a new block, requiring a link to preserve the old rowid. This column is updated only after you analyze the table.

32、数据缓冲区命中率

LECT a.VALUE+b.VALUE logical_reads, c.VALUE phys_reads,

round(100*(1-c.value/(a.value+b.value)),2)||'%' hit_ratio

FROM v$sysstat a,v$sysstat b,v$sysstat c

WHERE a.NAME='db block gets'

AND b.NAME='consistent gets'

AND c.NAME='physical reads';

SELECT DB_BLOCK_GETS+CONSISTENT_GETS Logical_reads,PHYSICAL_READS phys_reads,

round(100*(1-(PHYSICAL_READS/(DB_BLOCK_GETS+CONSISTENT_GETS))),2)||'%' "Hit Ratio"

FROM V$BUFFER_POOL_STATISTICS WHERE NAME='DEFAULT';

33、共享池命中率

以下两者应该都可以,看个人怎么理解

select sum(pinhits)/sum(pins)*100 from v$librarycache;

select sum(pinhits-reloads)/sum(pins)*100 from v$librarycache;

34、查询归档日志切换频率

select sequence#,to_char(first_time,'yyyymmdd_hh24:mi:ss')

firsttime,round((first_time-lag(first_time) over(order by first_time))*24*60,2) minutes from

v$log_history where first_time > sysdate - 3 order by first_time,minutes;

select sequence#,to_char(first_time,'yyyy-mm-dd hh24:mi:ss') First_time,First_change#,switch_change# from

v$loghist where first_time>sysdate-3 order by 1;

35、查询lgwr进程写日志时每执行一次lgwr需要多少秒,在state是waiting的情况下,某个等待编号seq#下,seconds_in_wait达多少秒,就是lgwr进程写一次IO需要多少秒

select event,state,seq#,seconds_in_wait,program from v$session where program like '%LGWR%' and state='WAITING'

36、查询没有索引的表

Select table_name from user_tables where table_name not in (select table_name from user_indexes)

Select table_name from user_tables where table_name not in (select table_name from user_ind_columns)

37、查询7天的db time

TH sysstat AS

(select sn.begin_interval_time begin_interval_time,

sn.end_interval_time end_interval_time,

ss.stat_name stat_name,

ss.value e_value,

lag(ss.value, 1) over(order by ss.snap_id) b_value

from dba_hist_sysstat ss, dba_hist_snapshot sn

where trunc(sn.begin_interval_time) >= sysdate - 7

and ss.snap_id = sn.snap_id

and ss.dbid = sn.dbid

and ss.instance_number = sn.instance_number

and ss.dbid = (select dbid from v$database)

and ss.instance_number = (select instance_number from v$instance)

and ss.stat_name = 'DB time')

select to_char(BEGIN_INTERVAL_TIME, 'mm-dd hh24:mi') ||

to_char(END_INTERVAL_TIME, ' hh24:mi') date_time,

stat_name,

round((e_value - nvl(b_value, 0)) /

(extract(day from(end_interval_time - begin_interval_time)) * 24 * 60 * 60 +

extract(hour from(end_interval_time - begin_interval_time)) * 60 * 60 +

extract(minute from(end_interval_time - begin_interval_time)) * 60 +

extract(second from(end_interval_time - begin_interval_time))),

0) per_sec

from sysstat

where (e_value - nvl(b_value, 0)) > 0

and nvl(b_value, 0) > 0

38、查询产生热块较多的对象

x$bh .tch(Touch)表示访问次数越高,热点快竞争问题就存在

SELECT e.owner, e.segment_name, e.segment_type

FROM dba_extents e,

(SELECT *

FROM (SELECT addr,ts#,file#,dbarfil,dbablk,tch

FROM x$bh

ORDER BY tch DESC)

WHERE ROWNUM < 11) b

WHERE e.relative_fno = b.dbarfil

AND e.block_id <= b.dbablk

AND e.block_id + e.blocks > b.dbablk;

39、导出AWR报告的SQL语句

select * from dba_hist_snapshot

select * from table(dbms_workload_repository.awr_report_html(DBID, INSTANCE_NUMBER, startsnapid,endsnapid))

select * from TABLE(DBMS_WORKLOAD_REPOSITORY.awr_diff_report_html(DBID, INSTANCE_NUMBER, startsnapid,endsnapid, DBID, INSTANCE_NUMBER, startsnapid,endsnapid));

40、查询某个SQL的执行计划

select a.hash_value,a.* from v$sql a where sql_id='0n4qfzbqfsjm3'

select * from table(dbms_xplan.display_cursor(v$sql.hash_value,0,'advanced'));

含顺序的

select * from table(xplan.display_cursor('v$sql.sql_id',0,'advanced'));

不过要先创建xplan包,再执行

SQL> CREATE PUBLIC SYNONYM XPLAN FOR SYS.XPLAN;

SQL> grant execute on sys.xplan to public;

原文链接:http://mp.weixin.qq.com/s/t0vgn6GTastD8bKgrFTCfw

40个DBA日常维护的SQL脚本的更多相关文章

  1. 40个DBA日常维护的SQL脚本--1113

    from itpub --1.查询碎片程度高的表--条件为什么block>100,因为一些很小的表,只有几行数据实际大小很小,但是block一次性分配就是5个(11g开始默认一次性分配1M的bl ...

  2. Oracle 史上最全近百条Oracle DBA日常维护SQL脚本指令

    史上最全近百条Oracle DBA日常维护SQL脚本指令 https://mp.weixin.qq.com/s?__biz=MjM5MDAxOTk2MQ==&mid=2650281305&am ...

  3. MS SQL 日常维护管理常用脚本(二)

    监控数据库运行 下面是整理.收集监控数据库运行的一些常用脚本,也是MS SQL 日常维护管理常用脚本(一)的续集,欢迎大家补充.提意见. 查看数据库登录名信息   Code Snippet SELEC ...

  4. oracle 容灾库日常维护 ,健康检查脚本 以及常见问题分析

    select DEST_ID, APPLIED_SCN FROM v$archive_dest select * from v$dataguard_status; SELECT gvi.thread# ...

  5. 监控数据库运行 - MS SQL 日常维护管理常用脚本(二)

    查看数据库登录名信息 use mastergoSELECT name AS LoginName , dbname AS DefaultDB , createdate AS CreateDate, up ...

  6. MS SQL 日常维护管理常用脚本

    --[查看数据库服务器名称] --默认实例查询 SELECT @@SERVERNAME AS SERVERNAME; SELECT SERVERPROPERTY('servername') AS Se ...

  7. CentOS日常维护及常用脚本

    [root@-.x.x xiewenming]# curl myip.ipip.net 当前 IP:42.62.x.x 来自于:中国 北京 北京 联通/电信 www.17ce.com  cdn解析网站 ...

  8. SQL Server 日常维护经典应用

    SQL Server日常维护常用的一些脚本整理. 1.sql server开启clr权限: GO RECONFIGURE GO ALTER DATABASE HWMESTC SET TRUSTWORT ...

  9. 第三篇——第二部分——第五文 配置SQL Server镜像——域环境SQL Server镜像日常维护

    本文接上面两篇搭建镜像的文章: 第三篇--第二部分--第三文 配置SQL Server镜像--域环境:http://blog.csdn.net/dba_huangzj/article/details/ ...

随机推荐

  1. 帝国CMS“建立目录不成功!请检查目录权限”的解决办法

    初次安装帝国CMS就遇到了一个问题,在提交或者修改信息的时候提示“建立目录不成功!请检查目录权限”,无法生成页面.检查了文件夹的读写权限和用户访问权限,发现都一切正常.那么到底是哪里出错了呢? 其实是 ...

  2. CommonJS初识

    CommonJS是什么 CommonJS是一个标准库,或者说是一组规范.因为官方并没有给出真正的代码实现,而是给出一些代码组织规范.常用模块的api.包(Package)的命名规范和具体格式. Com ...

  3. SimplifiedHibernate:简化了的Hibernate

    我的目的是实现下Hibernate中增删改查.缓存的核心功能.虽然基本功能实现了,但可能还有好多Bug,欢迎点评拍砖,没准能在一片谩骂声中取得意想不到的进步,:) // DatabaseAccess. ...

  4. Oracle 12c安装详细步骤,带截图

    1,在官网上下载oracle的压缩文件,两个都要下载. 并两个同时选中解压在一个文件夹里面. 2,解压之后,如下图,点击setup.exe稍等一会儿 ,3,开始安装: 不选点击下一步,或者直接点击下一 ...

  5. 【Java面试题】12 内部类可以引用它的包含类的成员吗?有没有什么限制?

    完全可以.如果不是静态内部类,那没有什么限制! 如果你把静态嵌套类当作内部类的一种特例,那在这种情况下不可以访问外部类的普通成员变量,而只能访问外部类中的静态成员,例如,下面的代码: class Ou ...

  6. rdesktop连接远程windows

    $ info rdesktop   //看一下帮助信息吧$rdesktop 192.168.1.1 //打开了一个8位色彩的,$rdesktop -a 16 192.168.1.1 //这个是16位色 ...

  7. C++ string char[] 转化

    可见到string转char[]相当简单,只要呼叫string class的成员函式c_str(),即可将string转为char[].那么char[]转string呢?有两种方法,第一种是初始str ...

  8. c++ vs 快捷方式

    强迫智能感知:Ctrl+J: 强迫智能感知显示参数信息:Ctrl-Shift-空格: Ctrl+E,D ----格式化全部代码 Ctrl+A+K+F Ctrl+E,F ----格式化选中的代码 Ctr ...

  9. js中数组作为参数传递的定义

    下面的函数实现了一个我们想要的最基本的图片预加载效果 function preloadimages(arr){    var newimages=[]    var arr=(typeof arr!= ...

  10. 记录下一个自己不常用的关键字-yield

    yield 这个关键字 一直很少用,也不知道具体用途.按照习惯就查询了下MSDN. 意思大致是这样的:在迭代器块中用于向枚举数对象提供值或发出迭代结束信号 表现形式:1. yield return & ...