ADRCI工具是Oracle11g才推出的新工具,主要用来管理alert文件、trace文件、dump文件、健康监事报告等。

这一篇简单介绍ADRCI工具。

用过11g的人都会发现,11g中alert文件以及trace文件的存放位置都发生了变化。从原来的ORACLE_BASE/admin/INSTANCE_NAME目录变成了ORACLE_BASE/diag/rdbms/DBNAME/INSTANCE_NAME目录。

Oracle之所以修改了这个跨越多个版本都没有修改过的参数设置,就是因为Oracle在11g中推出了ADRCI。这个工具可以统一管理ASM实例和多个数据库实例的alert文件、后台trace文件、用户trace文件,dump文件等等。

而且这个工具可以快速查询错误相关的所有trace文件,并将这些文件打包到一个zip文件,以便将问题相关的信息提供给Oracle的技术支持。

看一下ADRCI工具的简单命令:

C:Documents and Settingsytk>adrci

ADRCI: Release 11.1.0.6.0 - Beta on 星期日 3月 29 21:23:57 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

ADR base = "e:oracle"
adrci> help

HELP [topic]
Available Topics:
CREATE REPORT
ECHO
EXIT
HELP
HOST
IPS
PURGE
RUN
SET BASE
SET BROWSER
SET CONTROL
SET ECHO
SET EDITOR
SET HOMES | HOME | HOMEPATH
SET TERMOUT
SHOW ALERT
SHOW BASE
SHOW CONTROL
SHOW HM_RUN
SHOW HOMES | HOME | HOMEPATH
SHOW INCDIR
SHOW INCIDENT
SHOW PROBLEM
SHOW REPORT
SHOW TRACEFILE
SPOOL

There are other commands intended to be used directly by Oracle, type
"HELP EXTENDED" to see the list

HELP列出了ADRCI工具的所有命令,还可以通过HELP加个别命令的方式来列出这个命令的具体语法,比如:

adrci> HELP IPS

HELP IPS [topic]
Available Topics:
ADD
ADD FILE
ADD NEW INCIDENTS
CHECK REMOTE KEYS
COPY IN FILE
COPY OUT FILE
CREATE PACKAGE
DELETE PACKAGE
FINALIZE PACKAGE
GENERATE PACKAGE
GET MANIFEST
GET METADATA
GET REMOTE KEYS
PACK
REMOVE
REMOVE FILE
SET CONFIGURATION
SHOW CONFIGURATION
SHOW FILES
SHOW INCIDENTS
UNPACK FILE
USE REMOTE KEYS
adrci> HELP IPS ADD

Usage: IPS ADD
[INCIDENT <incid> | PROBLEM <prob_id> | PROBLEMKEY <prob_key> |
SECONDS <seconds> | TIME <start_time> TO <end_time>]
PACKAGE <package_id>

Purpose: Add incidents to an existing package.

Arguments:
<incid>: ID of incident to add to package contents.
<prob_id>: ID of problem to add to package contents.
<prob_key>: Problem key to add to package contents.
<seconds>: Number of seconds before now for adding package contents .
<start_time>: Start of time range to look for incidents in.
<end_time>: End of time range to look for incidents in.
Example:
ips add incident 22 package 12

adrci> HELP SHOW PROBLEM

Usage: SHOW PROBLEM [-p <predicate_string>]
[-last <num> | -all]
[-orderby (field1, field2, ...) [ASC|DSC]]

Purpose: Show the problem information. By default, this command will
only show the last 50 problems.

Options:
[-p <predicate_string>]: The predicate string must be double-quoted.
The field names that users can specify in the predicate are:
PROBLEM_ID number
PROBLEM_KEY text(550)
FIRST_INCIDENT number
FIRSTINC_TIME timestamp
LAST_INCIDENT number
LASTINC_TIME timestamp
IMPACT1 number
IMPACT2 number
IMPACT3 number
IMPACT4 number
SERVICE_REQUEST text(64)
BUG_NUMBER text(64)

[-last <num> | -all]: This option allows users to either select
the last <num> of qualified problems to show or to show all the
qualified problems. If this option is not specified, this command
will only show 50 incidents.

[-orderby (field1, field2, ...) [ASC|DSC]]: If specified, the results
will be ordered by the specified fields' values. By default, it will be
in the ascending order unless "DSC" is specified. Note that the field
names that can be specified here are from the "PROBLEM" relation.

Examples:
show problem
show problem -p "problem_id>123"

下面是查询数据库中错误的几个小例子:

adrci> show base
ADR base is "e:oracle"
adrci> show home
ADR Homes:
diagclientsuser_systemhost_3414944083_11
diagclientsuser_unknownhost_3414944083_11
diagclientsuser_unknownhost_411310321_11
diagclientsuser_ytkhost_3414944083_11
diagrdbmsytk1110ytk1110
diagtnslsnrytk-thinkpadlistener
adrci> set home diagrdbmsytk1110ytk1110
adrci> show alert -tail 5
2009-02-25 22:51:17.640000 +08:00
Completed: alter database open
2009-02-25 22:55:26.171000 +08:00
Starting background process CJQ0
CJQ0 started with pid=7, OS id=14428
2009-02-25 22:55:49.796000 +08:00
Errors in file e:oraclediagrdbmsytk1110ytk1110traceytk1110_j008_15220.trc
:
ORA-12012: 自动执行作业 11689 出错
ORA-01403: 未找到任何数据
2009-02-25 23:20:39.828000 +08:00
Thread 1 advanced to log sequence 75
Current log# 3 seq# 75 mem# 0: E:ORACLEORADATAYTK111REDO03.LOG
2009-02-26 08:31:51.296000 +08:00

***********************************************************************

Fatal NI connect error 12638, connecting to:
(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))

VERSION INFORMATION:
TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 11.1.0.6.0 - Pro
duction
Time: 26-2月 -2009 08:31:51
Tracing not turned on.
Tns error struct:
ns main err code: 12638

TNS-12638: 身份证明检索失败
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0

除了上面交互式的方式外,还可以调用脚本,或者指定一系列命令来批量执行命令:

C:Documents and Settingsytk>adrci -help
Syntax:
adrci [-help] [script=script_filename]
[exec = "one_command [;one_command;...]"]

Options Description (Default)
-----------------------------------------------------------------
script script file name (None)
help help on the command options (None)
exec exec a set of commands (None)
-----------------------------------------------------------------

比如:

C:Documents and Settingsytk>adrci exec="show base;show home;set home diagrdb
msytk1110ytk1110;show home"
ADR base is "e:oracle"
ADR Homes:
diagclientsuser_systemhost_3414944083_11
diagclientsuser_unknownhost_3414944083_11
diagclientsuser_unknownhost_411310321_11
diagclientsuser_ytkhost_3414944083_11
diagrdbmsytk1110ytk1110
diagtnslsnrytk-thinkpadlistener
ADR Homes:
diagrdbmsytk1110ytk1110

在ADRCI众多命令中,比较常用的命令包括SHOW INCIDENT和SHOW PROBLEM。

看看这两个命令的使用:

[oracle@yangtk ~]$ adrci

ADRCI: Release 11.1.0.6.0 - Beta on Sat Feb 14 07:40:14 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

ADR base = "/data/oracle"
adrci> show home
ADR Homes: 
diag/tnslsnr/yangtk/listener
diag/clients/user_oracle/host_1761010651_11
diag/rdbms/ora11g_p/ora11g
diag/rdbms/ora11g/ora11g
adrci> set home diag/rdbms/ora11g_p/ora11g
adrci> show incident

ADR Home = /data/oracle/diag/rdbms/ora11g_p/ora11g:
*************************************************************************
INCIDENT_ID PROBLEM_KEY CREATE_TIME 
------------ ----------------------------- ---------------------------------- 
178263 ORA 4031 2008-08-06 07:18:22.545029 +08:00 
178247 ORA 4031 2008-08-06 07:18:34.820273 +08:00 
178239 ORA 4031 2008-08-06 07:18:22.504526 +08:00 
178223 ORA 4031 2008-08-06 07:18:24.815544 +08:00 
178143 ORA 4031 2008-08-06 07:18:35.246630 +08:00 
177075 ORA 4031 2008-08-05 14:58:35.377256 +08:00 
177067 ORA 4031 2008-08-05 14:58:58.782595 +08:00 
177051 ORA 4031 2008-08-05 14:58:35.422671 +08:00 
177043 ORA 4031 2008-08-05 14:58:35.402265 +08:00 
176939 ORA 4031 2008-08-05 14:58:54.864399 +08:00 
175859 ORA 4031 2008-08-05 13:58:50.980910 +08:00 
175858 ORA 4031 2008-08-05 13:58:41.125870 +08:00 
175826 ORA 4031 2008-08-05 13:58:42.802084 +08:00 
175738 ORA 4031 2008-08-05 13:58:44.351160 +08:00 
174657 ORA 4031 2008-08-05 13:46:41.399981 +08:00 
174656 ORA 4031 2008-08-05 13:46:38.378564 +08:00 
172231 ORA 7445 [ksldclt_cln()+264] 2008-08-04 22:07:06.387781 +08:00 
172212 ORA 4031 2008-08-04 22:03:46.338443 +08:00 
172211 ORA 4031 2008-08-04 22:03:40.771874 +08:00 
172204 ORA 4031 2008-08-04 22:03:46.546782 +08:00 
172203 ORA 4031 2008-08-04 22:03:38.053562 +08:00 
172187 ORA 4031 2008-08-04 22:03:42.360428 +08:00 
169786 ORA 4031 2008-07-30 02:36:18.482753 +08:00 
169785 ORA 4031 2008-07-30 02:36:15.666044 +08:00 
166151 ORA 603 2008-07-27 17:21:42.556972 +08:00 
166129 ORA 603 2008-07-27 15:35:11.931255 +08:00 
166039 ORA 4031 2008-07-27 15:21:42.574517 +08:00 
166011 ORA 600 [kebm_mmon_main_1] 2008-07-27 17:52:24.860044 +08:00 
166009 ORA 4031 2008-07-27 15:21:51.290947 +08:00 
166008 ORA 4031 2008-07-27 15:21:45.393293 +08:00 
166007 ORA 4031 2008-07-27 15:21:42.666587 +08:00 
165999 ORA 4031 2008-07-27 15:21:52.049840 +08:00 
161323 ORA 4031 2008-07-01 15:20:51.038193 +08:00 
161322 ORA 4031 2008-07-01 15:20:50.132755 +08:00 
161321 ORA 4031 2008-07-01 15:20:44.286697 +08:00 
161257 ORA 4031 2008-07-01 15:20:48.717581 +08:00 
161185 ORA 4031 2008-07-01 15:20:44.285834 +08:00 
160110 ORA 4031 2008-06-26 04:15:27.704828 +08:00 
160102 ORA 4031 2008-06-26 04:15:25.346548 +08:00 
160086 ORA 4031 2008-06-26 04:15:28.601534 +08:00 
160070 ORA 4031 2008-06-26 04:15:26.756150 +08:00 
159974 ORA 4031 2008-06-26 04:15:24.147550 +08:00 
156469 ORA 4031 2008-05-17 05:55:11.601467 +08:00 
156453 ORA 4031 2008-05-17 05:55:21.028975 +08:00 
156366 ORA 600 [qerghFetch:inc] 2008-05-17 08:10:01.178942 +08:00 
156365 ORA 600 [qerghFetch:inc] 2008-05-17 05:02:50.616159 +08:00 
156334 ORA 4031 2008-05-17 05:55:15.819541 +08:00 
156333 ORA 4031 2008-05-17 05:55:14.628802 +08:00 
156317 ORA 4031 2008-05-17 05:55:11.642549 +08:00 
153748 ORA 7445 [kokacau()+683] 2008-02-28 05:10:44.389655 +08:00 
50 rows fetched

adrci> show problem

ADR Home = /data/oracle/diag/rdbms/ora11g_p/ora11g:
*************************************************************************
PROBLEM_ID PROBLEM_KEY LAST_INCIDENT LASTINC_TIME 
----------- ----------------------------- -------------- ---------------------------------- 
7 ORA 4031 178240 2008-08-06 07:18:43.590263 +08:00 
12 ORA 7445 [ksldclt_cln()+264] 172231 2008-08-04 22:07:06.387781 +08:00 
11 ORA 600 [kebm_mmon_main_1] 166011 2008-07-27 17:52:24.860044 +08:00 
5 ORA 603 166151 2008-07-27 17:21:42.556972 +08:00 
10 ORA 600 [qerghFetch:inc] 156366 2008-05-17 08:10:01.178942 +08:00 
9 ORA 600 [qmxiUnpPacked2] 152793 2008-02-28 06:08:31.659320 +08:00 
8 ORA 7445 [kokacau()+683] 153748 2008-02-28 05:10:44.389655 +08:00 
6 ORA 1578 123833 2007-11-24 02:49:43.837675 +08:00 
4 ORA 600 [krhpfh_03-1208] 117944 2007-11-09 00:48:49.678494 +08:00 
3 ORA 600 [prssptoa2] 96380 2007-10-18 00:53:25.480274 +08:00 
2 ORA 600 [kkdcacr: ptn_kxcp] 85602 2007-10-11 22:01:08.539854 +08:00 
1 ORA 7445 [koioapm()+254] 14503 2007-09-06 02:50:52.122404 +08:00 
12 rows fetched

Oracle将每次错误信息作为一个INCIDENT,通过SHOW INCIDENT可以很方便的了解alert文件中包含所有的错误信息,以及发生的时间点。

而SHOW PROBLEM的结果更加清晰,它会根据Oracle的错误号,将相同的错误信息合并到一起。通过这个结果,可以了解数据库出现了哪些不同的错误信息。

无论是SHOW PROBLEM、SHOW INCIDENT还是SHOW ALERT命令,Oracle都支持定制查询结果,比如只返回ORA-600错误的PROBLEM:

adrci> show problem -p "problem_key like '%600%'"

ADR Home = /data/oracle/diag/rdbms/ora11g_p/ora11g:
*************************************************************************
PROBLEM_ID PROBLEM_KEY LAST_INCIDENT LASTINC_TIME 
----------- ---------------------------- -------------- ---------------------------------- 
11 ORA 600 [kebm_mmon_main_1] 166011 2008-07-27 17:52:24.860044 +08:00 
10 ORA 600 [qerghFetch:inc] 156366 2008-05-17 08:10:01.178942 +08:00 
9 ORA 600 [qmxiUnpPacked2] 152793 2008-02-28 06:08:31.659320 +08:00 
4 ORA 600 [krhpfh_03-1208] 117944 2007-11-09 00:48:49.678494 +08:00 
3 ORA 600 [prssptoa2] 96380 2007-10-18 00:53:25.480274 +08:00 
2 ORA 600 [kkdcacr: ptn_kxcp] 85602 2007-10-11 22:01:08.539854 +08:00 
6 rows fetched

而SHOW INCIDENT还支持更详细的显示,比如:

adrci> show incident -mode detail -p "incident_id=166011"

ADR Home = /data/oracle/diag/rdbms/ora11g_p/ora11g:
*************************************************************************

**********************************************************
INCIDENT INFO RECORD 1
**********************************************************
INCIDENT_ID 166011
STATUS ready
CREATE_TIME 2008-07-27 17:52:24.860044 +08:00
PROBLEM_ID 11
CLOSE_TIME <NULL>
FLOOD_CONTROLLED none
ERROR_FACILITY ORA
ERROR_NUMBER 600
ERROR_ARG1 kebm_mmon_main_1
ERROR_ARG2 36
ERROR_ARG3 <NULL>
ERROR_ARG4 <NULL>
ERROR_ARG5 <NULL>
ERROR_ARG6 <NULL>
ERROR_ARG7 <NULL>
ERROR_ARG8 <NULL>
SIGNALLING_COMPONENT <NULL>
SIGNALLING_SUBCOMPONENT <NULL>
SUSPECT_COMPONENT <NULL>
SUSPECT_SUBCOMPONENT <NULL>
ECID <NULL>
IMPACTS 0
PROBLEM_KEY ORA 600 [kebm_mmon_main_1]
FIRST_INCIDENT 166011
FIRSTINC_TIME 2008-07-27 17:52:24.860044 +08:00
LAST_INCIDENT 166011
LASTINC_TIME 2008-07-27 17:52:24.860044 +08:00
IMPACT1 0
IMPACT2 0
IMPACT3 0
IMPACT4 0
KEY_NAME SID
KEY_VALUE 157.1
KEY_NAME Client ProcId
KEY_VALUE oracle@yangtk.ytk-thinkpad (MMON).2774_13056208
KEY_NAME ProcId
KEY_VALUE 14.1
OWNER_ID 1
INCIDENT_FILE /data/oracle/diag/rdbms/ora11g_p/ora11g/trace/ora11g_mmon_2774.trc
OWNER_ID 1
INCIDENT_FILE /data/oracle/diag/rdbms/ora11g_p/ora11g/incident/incdir_166011/ora11g_mmon_2774_i166011.trc
1 rows fetched

利用ADRCI的IPS命令,可以将问题相关的trace文件,打包为一个zip文件,以提供给Oracle的支持人员。

adrci> help ips

HELP IPS [topic]
   Available Topics:
        ADD
        ADD FILE
        ADD NEW INCIDENTS
        CHECK REMOTE KEYS
        COPY IN FILE
        COPY OUT FILE
        CREATE PACKAGE
        DELETE PACKAGE
        FINALIZE PACKAGE
        GENERATE PACKAGE
        GET MANIFEST
        GET METADATA
        GET REMOTE KEYS
        PACK
        REMOVE
        REMOVE FILE
        SET CONFIGURATION
        SHOW CONFIGURATION
        SHOW FILES
        SHOW INCIDENTS
        UNPACK FILE
        USE REMOTE KEYS

IPS包括的命令很多,介绍两种常用的打包方法。

最简单的方法莫过于直接使用PACK命令:

adrci> set home diag/rdbms/ora11g_p/ora11g
adrci> show problem -p "problem_id = 1"

ADR Home = /data/oracle/diag/rdbms/ora11g_p/ora11g:
*************************************************************************
PROBLEM_ID PROBLEM_KEY                LAST_INCIDENT LASTINC_TIME                      
---------- -------------------------- ------------- ----------------------------------
1          ORA 7445 [koioapm()+254]   14503         2007-09-06 02:50:52.122404 +08:00 
1 rows fetched

adrci> ips pack problem 1
Generated package1 infile /home/oracle/IPSPKG_20090215012523_COM_1.zip, mode complete

另一种方法是利用CREATE PACKAGE命令,然后添加相关的INCIDENT,最后通过GENERATE PACKAGE命令来生成PACKAGE。

adrci> ips create package
Created package 2 without any contents, correlation level typical
adrci> ips create package problemkey "ORA 7445 [koioapm()+254]"
Created package 3 based on problem key ORA 7445 [koioapm()+254], correlation level typical
adrci> ips add incident 172231 package 3
Added incident 172231 to package 3
adrci> ips add file <ADR_HOME>/trace/ora11g_ora_4582.trc package 3
Added file <ADR_HOME>/trace/ora11g_ora_4582.trc to package 3
adrci> ips generate package 3
Generated package3 infile /home/oracle/IPSPKG_20090215013006_COM_1.zip, mode complete

还可以追加文件到PACKAGE 3:

adrci> ips add new incidents package 3
Added new incidents to package 3
adrci> ips add problem 12 package 3
Added problem 12 to package 3
adrci> ips generate package 3
Generated package3 infile /home/oracle/IPSPKG_20090215013006_COM_2.zip, mode complete

最后简单介绍一下UNPACK命令,这个命令可以将得到的zip文件解压到指定目录:

adrci> ips get metadata from file /home/oracle/IPSPKG_20090215012523_COM_1.zip
IPS metadata from file /home/oracle/IPSPKG_20090215012523_COM_1.zip:
----------------------------------------------------------
<?xml version="1.0" encoding="US-ASCII"?>
<PACKAGE>
    <PACKAGE_ID>1</PACKAGE_ID>
    <PACKAGE_NAME>IPSPKG_20090215012523</PACKAGE_NAME>
    <MODE>Complete</MODE>
    <SEQUENCE>1</SEQUENCE>
    <LAST_COMPLETE>1</LAST_COMPLETE>
    <DATE>2009-02-15 01:25:27.179103 +08:00</DATE>
    <ADR_BASE>/data/oracle</ADR_BASE>
    <ADR_HOME>/data/oracle/diag/rdbms/ora11g_p/ora11g</ADR_HOME>
    <PROD_NAME>rdbms</PROD_NAME>
    <PROD_ID>ora11g_p</PROD_ID>
    <INST_ID>ora11g</INST_ID>
    <OCM_GUID/>
</PACKAGE>

----------------------------------------------------------
adrci> ips unpack file /home/oracle/IPSPKG_20090215012523_COM_1.zip into /home/oracle
Unpacking file /home/oracle/IPSPKG_20090215012523_COM_1.zip into target /home/oracle
adrci> host
[oracle@yangtk ~]$ cd /home/oracle/diag/rdbms/ora11g_p/ora11g/
[oracle@yangtk ora11g]$ ls -l
total 44
drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 alert
drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 cdump
drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 hm
drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 incident
drwxr-xr-x 3 oracle oinstall 4096 Feb 15 02:21 incpkg
drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 ir
drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 lck
drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 metadata
drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 stage
drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 sweep
drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 trace
[oracle@yangtk ora11g]$ ls trace/
alert_ora11g.log
[oracle@yangtk ora11g]$ ls alert
log.xml

Oracle工具——ADRCI的更多相关文章

  1. 使用Navicat for Oracle工具连接oracle的图文教程

    点评:今天上网的时候偶然发现了一款oracle的客户端的图形化管理和开发工具,当看到这个界面的时候,感觉很舒服,便上网搜了一下这个工具,看百度百科之后感觉很出乎我的意料,这个产品对于许多的数据库竟都有 ...

  2. [转]使用Navicat for Oracle工具连接oracle的

    使用Navicat for Oracle工具连接oracle的 这是一款oracle的客户端的图形化管理和开发工具,对于许多的数据库都有支持.之前用过 Navicat for sqlserver,感觉 ...

  3. oracle删除dbf导致的oracle工具不能正常使用

    1.使用cmd命令登录Oracle:sqlplus / as sysdba;就可以,中间两个空格.2.删除了dbf导致Oracle工具不能正常使用解决办法(oracle initialization ...

  4. 使用Navicat for Oracle工具连接oracle

    使用Navicat for Oracle工具连接oracle的 这是一款oracle的客户端的图形化管理和开发工具,对于许多的数据库都有支持.之前用过 Navicat for sqlserver,感觉 ...

  5. 使用Navicat for Oracle工具连接oracle出错:ORA-12737

    今天上网的时候偶然发现了一款oracle的客户端的图形化管理和开发工具,当看到这个界面的时候,感觉很舒服,便上网搜了一下这个工具,看百度百科之后感觉很出乎我的意料,这个产品对于许多的数据库竟都有支持, ...

  6. Oracle工具之DBNEWID

    DBNEWID是Oracle提供的一个用于修改数据库DBID和DBNAME的工具. 在引进该工具之前,如果我们想修改数据库的数据库名,必须重建控制文件.但即便如此,也无法修改该数据库的DBID.众所周 ...

  7. oracle工具 sqlplus 用户管理

    可以通过system用户对普通用户解锁.alter user scott account unlock; 工具:1/ sqlplusw sqlplus 自带.调用oracle安装目录下bin目录下的e ...

  8. Oracle 12C -- ADRCI查看DDL日志

    $ adrci ADRCI: Release - Production on Tue Nov :: Copyright (c) , , Oracle and/or its affiliates. Al ...

  9. JDBC连接Oracle工具类

    import java.sql.*;import java.util.ResourceBundle; /** * jdbc工具类,负责: * 1. 加载/注册数据库驱动程序 * 2. 获取数据库连接 ...

随机推荐

  1. PyCharm使用Anaconda新建的环境

    首先,创建一个环境用来安装Tensorflow: conda create -n tensorflow python=3.5.6 安装以后,在Anaconda Navigator可以看到已经增加了一个 ...

  2. mybatis插入一个对象后获取表中自增的主键Id并且传入到插入的的对象中,方便将对象中其他属性赋值给其他以前表主键Id作为非空字段的表

    原本的sql语句为: <insert id="xx" parameterType="com.hrt.partner.model.ShopInsert"&g ...

  3. 对 IIC 总线的理解、调用函数以及常见面试问题

    一.IIC 总线概述: IIC 即Inter-Integrated Circuit(集成电路总线) I2C总线是PHLIPS公司推出的一种串行总线, I2C总线只有两根双向信号线.一根是数据线SDA, ...

  4. Apigee 简介与简单试用

     Apigee (国内访问需要***)是一家成立于2004年的API管理公司,于2016年9月被Google收购,作为Google云的服务之一.Apigee提供从API设计.开发.管理.门户.网关等 ...

  5. go语言字符串的连接和截取

    字符串的连接: https://studygolang.com/articles/12281?fr=sidebar 字符串的截取: https://studygolang.com/articles/9 ...

  6. [转]git commit --amend用法

    适用场景: 比方说,你的代码已经提交到git库,leader审核的时候发现有个Java文件代码有点问题,于是让你修改,通常有2种方法: 方法1:leader 将你提交的所有代码 abandon掉,然后 ...

  7. SecureCRT自动上传文件python脚本

    本人在ubuntu下使用SecureCRT,上传文件习惯用rz命令.每次上传都弹对话框选择文件按确定后才上传,感觉很费力.最后自己摸索整理出一个脚本. 使用方法是,在[Script]菜单点[Run.. ...

  8. python一个简单的websocket测试客户端

    朋友发的,之前在网上一直没找着,先记着 #!/usr/bin/env python import asyncio import websockets import json async def tes ...

  9. 将RAC软件转换为单实例软件

    将RAC软件转换为单实例软件 http://blog.itpub.net/26736162/viewspace-2155632/ 1. Stop database and CRS on both no ...

  10. 外部访问docker容器(docker run -p/-P 指令)

    容器中可以运行一些网络应用,要让外部也可以访问这些应用,可以通过 -P(大写) 或 -p (小写) 参数来指定端口映射. (1)当使用 -P 标记时,Docker 会随机映射一个 49000~4990 ...