DB2常用命令集合

Python爬虫实战:爬取小红书数据做爆款分析,我破解了签名加密+移动端反爬(附完整代码) 爬取小红书数据的核心,不是“简单的HTTP请求”,而是“理解移动端接口的加密逻辑和反爬规则”——从x-s/x-t签名破解到移动端UA伪装,再到行为模拟,每一步都是对移动端爬虫的深度理解。这套方案的价值在于,不仅能稳定抓取小红书数据,还能从数据中拆解出有价值的爆款特征,真正把“数据”变成“洞察”。对程序员来说,小红书爬虫不仅是技术练手,更是了解新媒体平台数据逻辑的窗口。希望这篇分享能帮到做新媒体分析或爬虫进阶的小伙伴,也欢迎在评论区交流小红书反爬和爆款分析的更多技巧! 阅读详情

目录

前言

查看系统RUNSTATS状态

查找需要RUNSTATS的表和索引

db2dialog

监控执行时间最长的SQL语句

db2expln

查看DB2特定参数值

查看DB2特定表空间信息

重启DB2数据库

快速删除大量数据

db2batch

说明

示例

注意

参考资料

db2expln

说明

示例

 

导出表数据

导出表结构

GET SNAPSHOT

说明

REORGCHK

说明

举例

rebind

说明

举例

reorg

说明

举例

AIX-查看磁盘空间

AIX-查看目录下各个文件夹大小

AIX-查看特定文件大小


前言

由于最近一直在忙着做DB2数据库方面的性能测试,总是遇到各种奇葩问题,然后各种百度,后来一想,还不如把常用命令都记下来,方便后续用的时候节省时间。

对了,公司的DB2是安装在AIX操作系统上的。

查看系统RUNSTATS状态

select tabname,colnames,create_time,stats_time,nleaf,nlevels

from syscat.indexes

where tabname = 'XXXXX' and tabschema = 'XXXXXX';

 

 

select tabname,alter_time,stats_time,last_regen_time  

from syscat.tables

where tabname = 'XXXXX' and tabschema = 'XXXXXX';

 

查找需要RUNSTATS的表和索引

①select tabname,INDNAME

from syscat.indexes

where stats_time is null;

②select tabname

from syscat.tables

where stats_time is null;

为了捕捉表及其索引的统计信息,使用如下命令:

runstats on table schema.tabname with distribution and detailed indexes all;

 

 

db2dialog

查询某个时间点之后的db2dialog日志信息:

db2diag -time 2021-04-09-11.00.00.000000

 

模糊查询规则:

-g: 搜索符合搜索一系列“<列标志>=<列值>”条件的诊断日志记录,条件中间使用逗号分开。搜索区分大小写。

-gi: 功能等同于-g,搜索不区分大小写。

-gv: 搜索不符合一系列“<列标志>=<列值>”条件的诊断日志记录,条件中间使用逗号分开。搜索区分大小写。

-gvi:功能等同于-gv,搜索不区分大小写。

 

= 全字精确匹配查询

:= 部分匹配模糊查询

!= 查找不符合全字精确匹配查询条件的记录

!:= 查找不符合部分匹配模糊查询条件的记录

^= 选择查找列中以后面的查找条件开头的记录

!^= 选择查找列中不以后面的查找条件开头的记录

db2diag -time 2021-04-09-11.00.00.000000 -gi MESSAGE:=indexes

db2diag -time 2021-04-09-11.00.00.000000 -gi MESSAGE:=XXXX

db2diag -time 2021-04-09-11.00.00.000000 -gi MESSAGE:=syscat.indexes

db2diag -time 2021-04-09-11.00.00.000000 -gi MESSAGE:=syscat

 

监控执行时间最长的SQL语句

select *

from sysibmadm.TOP_DYNAMIC_SQL

order by AVERAGE_EXECUTION_TIME_S desc

fetch first 5 rows only;

 

 

db2expln

db2expln -d picpodb -q "SQL语句" -t

 

 

查看DB2特定参数值

db2 get db cfg for 数据库名称 | grep RUNSTATS

db2 update db cfg for 数据库名称 using AUTO_RUNSTATS OFF

 

 

查看DB2特定表空间信息

首先,select * from syscat.tables where 查询条件,从这里面找到该表所在的表空间

 

然后,db2 list tablespaces show detail | grep -p USERSPACE1

 

重启DB2数据库

1.查看是否有活动的链接

db2 list applications for db 数据库名字

 

2.关闭连接

db2 force application all

 

 

3.再执行一次步骤1中的命令,查看链接是否全部关闭。

 

 

4.执行停止实例命令

db2stop

 

 

5.执行实例启动命令

db2start

 

快速删除大量数据

新建null.del文件,让后放到特定目录下,然后用load - from去加载

 

db2 “LOAD FROM /xxx/null.del of del REPLACE INTO 表名”

db2batch

说明

*** Invalid or unsupported long command line option

*** For option "-help"

 

* Type 'db2batch -h' for help.

[db2inst1@DB1:/home/db2inst1]#db2batch -h

 

Usage:

 

db2batch

    [-d dbname] [-a userid[/password]]

    [-f sql_file] [-m parameters_file] [-r result_file[,summary_file]]

    [-v on||off] [-s on||off] [-q on||off||del] [-g on||off]

    [-l stmt_delimiter] [-t col_delimiter] [-w col_width]

    [-c on||off] [-iso rr||rs||cs||ur] [-car [cc||wfo] [-cli [cache_size]]

    [-o [option value] [...]] [-time on||off] [-i short||long||complete]

    [-msw [switch on||off||hold] [...]] [-mss [snapshot] [...]]

    [-z output_file[,summary_file]]

    [-h] [-u] [-?]

 

    ('db2batch -h' for extended help)

 

Where:  (All options and values are case insensitive)

 

  -d    Name of database to connect to.

        Default is to use the name set in $DB2DBDFT.

  -a    Authentication host user id with optional password.

        Default is to not specify a user id or password.

  -f    Input file containing SQL statements.

        Default is to use stdin.

  -m    Input file containing parameter values to bind to SQL statement

        parameter markers before executing a statement.

        Default is to not bind parameters.

  -r    Output file to contain the query results. If 'summary_file' is

        specified, it will contain the summary table.

        Default is to stdout. (screen)

  -v    Verbose mode.  Reports extra information during processing.

        Default is off.

  -s    Summary table.  Provides a summary of elapsed times with

        arithmetic and geometric means, complete with the number of

        query rows fetched and output.

        Default is on.

  -q    Query output only.  The output options are:

            off - Output information and headings with query results.

            on  - Output only query results in non-delimited format.

            del - Output only query results in delimited format.

        Default is off.

  -g    Group block output.  When 'on', takes one snapshot for the

        entire block and reports only block timing in the summary table.

        When 'off', takes a snapshot and reports summary table timing

        for each statement executed in the block.

        Default is on.

  -l    SQL Statement Delimiter.  Changes SQL statement separator.

        Default is ';'.

  -t    Single character output SQL column separator.

        Specify -t TAB for tab or -t SPACE for space.

        Default is SPACE for '-q on' and ',' for '-q del'.

  -w    Maximum Result Set Column Width.  Truncates all data to this

        width for displaying, unless data cannot be truncated.

        The width may be increased in order to eliminate the warning

        CLI0002W and thus get more accurate Fetch time.

        Default is 32768, ranging from 0 to 2G.

  -c    Automatically commit after each SQL statement.

        Default is on.

  -iso  Isolation Level.

            rr - Repeatable Read (ODBC Serializable)

            rs - Read Stability (ODBC Repeatable Read)

            cs - Cursor Stability (ODBC Read Committed)

            ur - Uncommitted Read (ODBC Read Uncommitted)

        Default is rr.

  -car  Concurrent Access Resolution

            cc  - Currently Commited

            wfo - Wait for Outcome

  -cli  CLI Execution.  This option exists for backwards compatibility

        with versions where the default execution mode was not CLI.

        The optional cache size argument is also ignored.

  -o    Control option and value pairs. The possible options are:

            r <rows output>  (Maximum query result rows shown)

                Default is -1. (All)

            f <rows fetched>  (Maximum query result rows fetched)

                Default is -1. (All)

            p <performance detail>  (A detail level between 0 and 5)

                0 - No timing or monitoring snapshots.

                1 - Timing information.

                2 - 1 and agent_id snapshot.

                3 - 2 and db2, dbase snapshots.

                4 - 3 and dbase_applinfo snapshot.

                5 - 4 and dbase_tablespaces, dbase_tables,

                    dbase_bufferpools snapshots.

                Default is 1.

            o <query optimization class> (A class of 0-3, 5, 7, or 9)

                Default is -1. (Server default)

            e <explain mode>

                no      - Execute query but do not explain.

                explain - Explain query but do not execute.

                yes     - Explain and execute the query.

                Default is no.

            s <error stop>

                no      - Continue when encountering non-critical errors

                yes     - Stop when encountering errors

                Default is no.                

  -time SQL statement timing.

        Default is on.

  -i    Elapsed time interval measurement.

            short    - elapsed time to run the statement.

            long     - elapsed time to run the statement including

                       overhead between statements.

            complete - elapsed time to run the statement where the prepare,

                       execute, and fetch times are reported separately.

        Default is short.

  -msw  Monitor Switches.  Each switch specified should be followed by

        either 'on', 'off', or 'hold' to turn on, turn off, or

        keep the switch's previous state respectively.  The possible

        switches are:

            uow, statement, table, bufferpool, lock, sort, timestamp

        The special switch 'all' sets all of the above switches.

        By default all switches are set to 'hold'.

  -mss  Monitor Snapshots.  List all monitoring snapshots that should be

        taken after each statement or block is executed.  More than one

        snapshot can be taken at a time, with information from all

        snapshots combined into one large snapshot before printing.

        The possible snapshots are:

            applinfo_all, dbase_applinfo, dcs_applinfo_all, db2, dbase,

            dbase_all, dcs_dbase, dcs_dbase_all, dbase_remote,

            dbase_remote_all, agent_id, dbase_appls, appl_all,

            dcs_appl_all, dcs_appl_handle, dcs_dbase_appls,

            dbase_appls_remote, appl_remote_all, dbase_tables,

            appl_locks_agent_id, dbase_locks, dbase_tablespaces,

            bufferpools_all, dbase_bufferpools, dynamic_sql

        The special snapshot 'all' takes all of the above snapshots.

        Any snapshots involving an appl ID are not supported in favour of

        their agent ID (appl handle) equivalents.

        Default is to not take any monitoring snapshots.

  -z    Redirect all output to a output file. It is similar to the -r option,

        but includes any messages or error codes with the output.

        If 'summary_file' is specified, it will contain the summary table.

        Default is to stdout.

  -h    Display this help screen.

  -u    Alias for -h.

  -?    Alias for -h.

 

 

SQL Input File Format:

 

  SELECT * FROM TABLE;     (all SQL statements must end with a delimiter)

  HELP;                    (display this help message and db2batch notes)

  QUIT;                    (stop executing any more SQL statements)

  -- comment               (comments are ignored)

  --#COMMENT comment       (comment appears in the output)

  --#BGBLK [repeat_count]  (start of a block of queries)

  --#EOBLK                 (end of a block of queries)

  --#PARAM <value> [...]   (values for a parameter in next SQL statement)

  --#SET <option> <value>  (see following table)

 

      -----------------------------------------------------------------

      option        value     default   description

      -----------------------------------------------------------------

      ROWS_FETCH    -1 to n   -1        -1 fetches all the rows

      ROWS_OUT      -1 to n   -1        -1 shows all fetched rows

      PERF_DETAIL   0 to 5    1         Performance detail level

      TIMING        on/off    on        Print timing information

      SNAPSHOT      string    none      Monitoring snapshots to take

      DELIMITER     string    ;         SQL statement delimiter

      PAUSE         n/a       n/a       Stop and wait for user input

      TIMESTAMP     n/a       n/a       Output a timestamp

      SLEEP         1 to n    n/a       Sleep for x seconds

      ERROR_STOP    no/yes    no        Stop when encountering errors

 

Note:

 

  Blocks of queries can be looped over multiple times by specifying a

  repeat count when defining the block.  The statement(s) in the block

  will only be prepared the first time.

 

  If a parameters file is used, then each line specifies the parameter

  values for a given statement and a given iteration of a block.

  If instead #PARAM directives are used, multiple values and even

  parameter ranges are specified in advance for each parameter of each

  statement, and on each iteration of the block a random value is chosen

  from the specified sets for each parameter.  #PARAM directives and a

  parameters file cannot be mixed.

 

 

Parameter Value Format:

 

  -36.6       'DB2'         X'0AB2'    G'...'   NULL

  12          'batch'       x'32ef'    N'...'   null

  +1.345E-6   'db2 batch'   X'afD4'    g'...'   Null

 

  Each parameter is defined like a SQL constant, and is separated from

  other parameters by whitespace.  Non-delimited text represents a

  number, plain delimited (') text represents a single byte character

  string, x/X prefixed delimited (') text represents a binary string

  encoded as pairs of hex digits, g/G/n/N prefixed delimited (') text

  represents a graphic string composed of double byte characters, and

  NULL (case insensitive) represents a null value.

 

Parameter Input File Format:

 

  Line X lists the set of parameters to supply to the Xth SQL statement

  that is executed in the input file.  If blocks of statements are not

  repeated, then this corresponds to the Xth SQL statement that is listed

  in the input file. A blank line represents no parameters for the

  corresponding SQL statement. The number of parameters and their types

  must agree with the number of parameters and the types expected by the

  SQL statement.

 

Parameter Directive Format:

 

  --#PARAM [single | start:end | start:step:end] [...]

 

  Each parameter directive specifies a set of parameter values from which

  one random value is selected for each execution of the query.  Sets are

  composed of both single parameter values and parameter value ranges.

  Parameter value ranges are specified by placing a colon (':')

  between two valid parameter values, with whitespace being an optional

  separator.  A third parameter value can be placed between the start and

  end values to be used as a step size which overrides the default.  Each

  parameter range is the equivalent of specifying the single values of

  'start, start+step, start+2*step, ... start+n*step' where n is chosen

  such that 'start+n*step <= end' but 'start+(n+1)*step > end'.

  While parameter directives can be used to specify sets of values for

  any type of parameter (even NULL), ranges are only supported on

  numerical parameter values (integers and decimal numbers).

 

 

General Notes:

 

 1. All SQL statements MUST be terminated by a delimiter (default ';')

    set by the --#SET DELIMITER command.  This delimiter can be 1 or 2

    characters.

 2. SQL statement length is limited only by available memory and the

    interface used.  Statements can break over multiple lines, but

    multiple statements are not allowed on a single line.

 3. Input file line length is limited only be available memory.

 4. db2batch issues its own connect and connect reset.

 5. PAUSE & SLEEP are timed when in long timing mode.

 6. Explain tables must be created before explain options can be used.

 7. All command line options and SQL file statements are case insensitive

    with respects to db2batch.

 

示例

db2batch -d odb -f /home/db2inst1/test.sql  -r /home/db2inst1/testResult -o r 0

 

db2batch -d odb -f /home/db2inst1/test.sql  -r /home/db2inst1/testResult -o r 0 p 4 e yes

 

注意

当在db2batch中开启explain时,需要提前创建db2inst1.explain表,而这个表结构DB2已经自带了:

首先找到这个表结构文件:find / -name EXPLAIN.DDL

其次,找到之后执行该文件:db2  -tvf /opt/IBM/db2/V9.7/misc/EXPLAIN.DDL

参考资料

https://www.ibm.com/docs/zh/db2/9.7?topic=commands-db2batch-benchmark-tool

db2expln

说明

 

[db2inst1@DB1:/home/db2inst1]#db2expln -help

 

DB2 Universal Database Version 9.7, 5622-044 (c) Copyright IBM Corp. 1991, 2009

Licensed Material - Program Property of IBM

IBM DB2 Universal Database SQL and XQUERY Explain Tool

 

 

 

SQL and XQUERY Explain Tool describes the access plan selection for static SQL statements

in the packages stored in the DB2 Universal Database system catalogs.

Given a database name, package name, package creator, and section number,

SQL and XQUERY Explain Tool will interpret and describe the information in these catalogs.

 

The syntax is:

 

                 .-----------.

                 V           |

   >>--db2expln----<option>--+--><

 

where <option> and <parameter> are taken from the list below. Each <option>

may appear only once, and they may be specified in any order.

 

 

Connection Options:

   -database <db>     = Connect to the database named <db>.

   -d <db>

 

   -user <name> <pw>  = Connect as user <name> with password <pw>.

   -u <name> <pw>

 

   A database name must be specified.

 

 

Output Options:

   -terminal          = Send output to the terminal.

   -t

 

   -output <file>     = Write output to the file named <file>.

   -o <file>

 

   Either terminal or file output must be specified.

 

 

Help Options:

   -help              = Display this help text.

   -h

   -?

 

 

Package Options:

   -schema <pattern>       = The package creator must match <pattern>.

   -c <pattern>

 

   -package <pattern>      = The package name must match <pattern>.

   -p <pattern>

 

   -version <pattern>      = The package version must match <pattern>. If not

                             specified, then the package with the version ''

                             (the empty string) will be explained.

 

   -section <number>       = The section number is <number>. Use 0 (zero) for

   -s <number>               all sections in the package.

 

   -escape <charater>      = Use <character> as the escape character when

   -e <character>            matching patterns.

 

   -noupper                = Do not upper case creator, package and version

   -l                        before matching.

 

   The creator and package information must be specified unless dynamic SQL is

   being explained. If the section information is not specified, then all

   sections will be displayed.

 

   The <pattern> for creator, package, and version is in LIKE predicate form,

   which allows the percent sign (%%) and underscore (_) as pattern matching

   characters. This allows multiple packages to be explained with one

   invocation of db2expln. The escape character can be used to force the %%

   and _ characters to be treated literally. (See the SQL Reference for more

   information on the LIKE predicate.) If multiple packages may be matched,

   the section number is automatically set to 0 (all sections).

 

 

Dynamic Statement Options:

   -statement <statement>  = The dynamic statement <statement> will be

   -q <sql>                  explained.

 

   -stmtfile <file>        = The dynamic statements contained in the file

   -f <file>                 <file> will be explained. <File> must exist at

                             the client.

 

   -cache <anchID>,<stmtUID>,<envID>,<varID>

                           = Retrieve the statement identified by the given IDs

                             from the dynamic SQL cache. (The IDs can be

                             obtained by running db2pd with the -dynamic

                             option.

 

   -noenv                  = By default, each statement that affects the compile

                             environment will be invoked after it has been

                             explained. This option prevents the execution of

                             these statements.

 

 

Explain Options:

   -setup <file>           = The SQL statements in <file> will be invoked

                             before any sections or statements are explained.

                             The SQL statements in <file> will not be

                             explained. Errors in the setup script are reported

                             but ignored.

 

   -terminator <character> = Each SQL statement for -setup, -statement, and

   -z <character>            -stmtfile ends at <character>. If this option is

                             not specified, then each statement is assumed to

                             be one line long

 

   -graph                  = Reconstruct the original optimizer plan graph (as

   -g                        presented by Visual Explain). Note that the

                             reconstructed graph may not exactly match the

                             original plan.

 

   -opids                  = Show the operator ID numbers.

   -i

 

   -nostats                = Do not show compiler statistics in the graph.

 

 

Event Monitor Options:

   -actevm <name>          = The name of the activities event monitor whose

                             activitystmt logical grouping contains the section

                             environments to be explained.

                             -actevm must be specified if -appid, -uowid,

                             -actid or -actid2 are to be specified.

   -appid  <ID name>       = The application identifier uniquely identifying

                             the application that issued the activities whose

                             section environments are to be explained.

   -uowid  <number>        = The unit of work ID whose section environments are

                             to be explained. The unit of work ID is unique

                             only within a given application.

   -actid  <number>        = The activity ID whose section environments are to

                             be explained. The activity ID is only unique

                             within a given unit of work.

   -actid2 <number>        = The activity secondary ID whose section

                             environments are to be explained. This defaults

                             to zero if not specified.

 

 

The specific options available may vary by database server.

Use "db2expln -help -database <db>" to get the options available for

a specific server.

 

 

(3/-)

[db2inst1@PICPDB1:/home/db2inst1]#

 

示例

db2expln -d odb -q "select * from orginfo" -o /home/db2inst1/db2expln

 

db2expln -d picpodb -q "select * from orginfo" -g -t

 

db2expln -d odb -q "select * from orginfo"  -g   -o /home/db2inst1/db2expln

 

 

导出表数据

db2 "export to /home/db2inst1/表名20210413.del of del select 列名 from 表名"

 

导出表结构

db2look -d odb -e -t 表名 -o /home/db2inst1/表名.sql

GET SNAPSHOT

说明

[db2inst1@PICPDB1:/home/db2inst1]#db2 ? GET SNAPSHOT

GET SNAPSHOT FOR

{

DATABASE MANAGER

| ALL [DCS] DATABASES

| ALL [DCS] APPLICATIONS

| ALL BUFFERPOOLS

| [DCS] APPLICATION

{APPLID appl-id

| AGENTID appl-handle}

| FCM FOR ALL DBPARTITIONNUMS

| LOCKS FOR APPLICATION {APPLID appl-id

| AGENTID appl-handle

}

| {

ALL

| [DCS] DATABASE

| [DCS] APPLICATIONS

| TABLES

| TABLESPACES

| LOCKS

| BUFFERPOOLS

| DYNAMIC SQL [write to file]

}

ON database-alias

}

[AT DBPARTITIONNUM db-partition-number | GLOBAL]

 

 

 

NOTE: From the operating system prompt, prefix commands with 'db2'.

      Special characters MAY require an escape sequence (\), for example:

      db2 \? change database

      db2 ? change database xxx comment with \"text\"

 

REORGCHK

说明

[db2inst1@PICPDB1:/home/db2inst1]#db2 ? REORGCHK

REORGCHK

[{UPDATE | CURRENT} STATISTICS]

[ON {TABLE {USER | SYSTEM | ALL | schema-name.table-name} | SCHEMA schema-name}]

 

NOTE: From the operating system prompt, prefix commands with 'db2'.

      Special characters MAY require an escape sequence (\), for example:

      db2 \? change database

      db2 ? change database xxx comment with \"text\"

[db2inst1@PICPDB1:/home/db2inst1]#

 

举例

db2 reorgchk CURRENT STATISTICS on table XXX.XXX

db2 reorgchk update STATISTICS on table XXX.XXX

rebind

说明

[db2inst1@PICPDB1:/home/db2inst1]#db2 ? rebind

REBIND [PACKAGE] package-name [VERSION version-id] [APREUSE {YES | NO}]

[RESOLVE {ANY | CONSERVATIVE}] [REOPT {NONE | ONCE | ALWAYS}]

[FUNCPATH schema-name [ {,schema-name} ... ]]

 

NOTE: From the operating system prompt, prefix commands with 'db2'.

      Special characters MAY require an escape sequence (\), for example:

      db2 \? change database

      db2 ? change database xxx comment with \"text\"

举例

select * from syscat.packages where valid = 'X';

db2 rebind package P6550240

reorg

说明

[db2inst1@PICPDB1:/home/db2inst1]#db2 ? reorg

REORG {

TABLE table-name Table-Clause |

{ INDEXES ALL FOR TABLE table-name |

  INDEX index-name [FOR TABLE table-name]

} Index-Clause |

TABLE mdc-table-name RECLAIM EXTENTS ONLY Reclaim-Extents-Clause}

[Table-Partition-Clause] [On-DbPartitionNum-Clause]

 

Table-Clause:

  [INDEX index-name] [[ALLOW {READ | NO} ACCESS]

  [USE tablespace-name] [INDEXSCAN] [LONGLOBDATA [USE long-tablespace-name]]

  [KEEPDICTIONARY | RESETDICTIONARY]] |

  [INPLACE [ [ALLOW {WRITE | READ} ACCESS] [NOTRUNCATE TABLE]

  [START | RESUME] | {STOP | PAUSE} ]]

 

Index-Clause:

  [ALLOW {READ | NO | WRITE} ACCESS]

  [{CLEANUP ONLY [ALL | PAGES] | CONVERT}]

 

Reclaim-Extents-Clause:

  [ALLOW {WRITE | READ | NO} ACCESS]

 

Table-Partition-Clause:

  ON DATA PARTITION partition-name

 

On-DbPartitionNum-Clause:

  ON {{DBPARTITIONNUM | DBPARTITIONNUMS} (db-partition-number

  [TO  db-partition-number] , ... ) | ALL DBPARTITIONNUMS [EXCEPT

  {DBPARTITIONNUM | DBPARTITIONNUMS} (db-partition-number

  [TO db-partition-number] , ...)]}

 

NOTE: From the operating system prompt, prefix commands with 'db2'.

      Special characters MAY require an escape sequence (\), for example:

      db2 \? change database

      db2 ? change database xxx comment with \"text\"      

举例

db2 reorg indexes all for table xxxx.xxxx

 

 

AIX-查看磁盘空间

df -g

AIX-查看目录下各个文件夹大小

du -g

AIX-查看特定文件大小

ls -l 文件名

文件大小单位是B,字节

华为OD机试新系统真题 【查找最佳充电策略】 华为OD机试 新系统真题【查找最佳充电策略】,提供C语言、Java、C++、Python、Go、JavaScript源码实现,并提供完整思路讲解,以及在线OJ模拟做题。华为OD机试真题【查找最佳充电策略】多语言题解。 阅读详情

相关推荐

YOLO11实战 第056期-基于yolo11的无人机航拍铁路障碍物检测实战-数据集&源码&系统

召回率曲线帮助评估模型在目标检测任务中,检测到真正目标的能力。通过这条曲线,可以评估模型在目标检测任务中的整体性能,并找到合适的置信度阈值,以在精确率和召回率之间做出最佳平衡。PR曲线越接近右上角,模型性能越好,曲线下方的面积越大,说明模型在不同置信度下的。这条曲线显示了随着置信度的增加,每个类别的召回率先变化较小,然后在某个点之后迅速下降。通过这条曲线,可以选择合适的置信度阈值,以优化模型的检测结果,平衡精确率和召回率。曲线都显示了随着召回率的增加,精确度略有下降的趋势,但整体上精确度保持在很高的水平。

深度学习算法工程师,专注于前沿算法研究与实战应用。在这里,我将分享深度学习领域的实战经验、优质数据集资源以及最新论文解读与精度分析,旨在与广大技术爱好者共同探索人工智能的奥秘,助力技术成长与创新。 164

db2 命令语法

例如:变量使用前必须先定义,方法为DECLARE 变量名 变量类型 (default 默认值)例:if 表达式if 条件1 then逻辑体;elseif 条件2 then逻辑体;else逻辑体;end if;例:ELSEEND IF;case表达式case 变量名 when变量值1 then. . .when变量值2 then- - -else. . .end case;或case when变量名=变量值1 then. . .

william823的专栏 833

bq34z100-G1电池计量芯片调试全攻略:从硬件设计到算法学习

电池电量计量是嵌入式系统与电源管理中的关键技术,它通过实时监测电池的电压、电流和温度,结合库仑计与阻抗跟踪等算法,实现对剩余电量的精确估算。这项技术的核心价值在于提升用户体验与设备可靠性,确保系统能在电量不足时及时预警或采取保护措施,广泛应用于消费电子、电动工具和储能系统等领域。在工程实践中,TI的bq34z100-G1芯片因其高集成度和强大的阻抗跟踪算法而备受青睐,但其调试过程涉及复杂的硬件设计验证、参数校准与学习周期配置。本文将聚焦于使用串口调试助手进行数据交互与验证,并详细拆解如何通过系统的学习流程让

weixin_34342905的博客 469

DB2数据库常用命令

【代码】DB2数据库常用命令。

lyhadong的博客 2618

STM32电机控制入门:Motor Control Workbench下载安装与Keil联调全攻略

在嵌入式电机驱动开发中,FOC矢量控制技术因其高效、平稳的驱动特性,已成为工业自动化、机器人及新能源场景的主流方案。而基于STM32实现FOC,通常需要借助图形化配置工具来降低算法实现门槛。Motor Control Workbench作为ST官方电机控制生态的核心入口,通过直观界面完成芯片选型、电机参数配置与代码生成,配合X-CUBE-MCSDK底层电机库,可让开发者绕过繁琐的坐标变换与SVPWM推导,直接聚焦电流环和速度环调参。从环境依赖、离线包下载、Java配置到与Keil MDK及STM32Cube

weixin_31815843的博客 313

[cadence]Allegro STEP-3D模型导入、匹配、导出的方法及注意事项

如果 Avaliable里面没有和symbols对应的文件,说明没有对应的3D模型,这时候需要在你的step路径下创建y与 .dra 封装文件相同名称的。选择好 Output file 和 name 之后呢,点击 Export。首先打开Setup - Step Package Mapping。注意:路径中不能有中文名称,有的话你会发现不能导出,也不会报错。在路径下将下载或者自己做的 3D模型文件改名之后,重新打开。可在View -> 3D View。

LuDvei的博客 2万+

db2常用命令大全(高级篇)

sqlcode (例:db2?dayofweek_iso(date(2008-01-16)) --它会返回是3,代表星期三。3、dayofweek(日期) --计算出日期中是周几(1是周日,2是周一…例如:dayofweek(date(2008-01-16)) --它会返回是4,代表星期三。2、coalesce(字段名,转换后的值) --对是null的字段进行值转换。4、dayofyear(日期) --一年中的第几天,范围在1-366范围之内。

u014516208的博客 2079

百度网盘开放平台OAuth 2.0授权全流程解析

本文详细解析了百度网盘开放平台OAuth 2.0授权全流程,包括创建应用、获取凭证、授权码模式详解以及access_token的使用与刷新。通过实际案例和代码示例,帮助开发者快速掌握接口调用技巧,避免常见错误,确保安全高效地接入百度网盘API。

wind6的博客 1280

db2解决insertBatch超长问题

2018年11月5日 于南昌高新区 临近项目上线 最近在做一个银行的项目,银行存量交易很大,比如省银行下面有1亿多用户,行方将数据存放到ftp,我们下载下来,读文件入库。 用Scanner读取文件,将每一行的数据,加入到list中,然后调用Mybaits的insertBatch方法,插入到数据库,举个栗子 public void addScCostRevAlctFromFile(String fi...

极客蓝天 3280

[VCS]VCS checkpoint简介以及其在SoC验证加速中的作用

VCS checkpoint是Synopsys VCS提供的快照/恢复机制,可显著加速SoC验证。其核心是在仿真关键节点(如完成初始化后)保存系统状态,后续测试可直接从该点恢复,避免重复执行冗长的初始化阶段(如boot、DDR训练等)。该技术特别适用于多测试用例共享同一初始状态的场景,通过分离初始化与功能验证流程,可提升回归效率3-5倍。需注意处理DPI-C状态同步、版本管理及存储优化等问题,结合UVM和自动化脚本可实现更高效的验证流程。典型应用可节省数百万cycle的重复仿真时间。

元直的博客 793

提高RFID检测距离以及检测速度的方法总结

摘要:提高RFID检测距离需优化阅读器功率、标签灵敏度、天线设计及频段选择,同时减少环境干扰;提升检测速度则需改进防碰撞算法、增强并行处理能力、精简数据传输。实际应用需平衡两者关系,如物流仓储采用UHF频段、高增益天线和动态Q算法实现远距离高速读取,ETC系统则通过微波频段和高速调制实现超远距离快速识别。不同场景需针对性优化硬件配置和系统参数。

start_up_go的博客 296

DB2执行脚本

通过db2命令直接执行脚本语句: db2 -tvf XXXX(文件名及路径) eg: db2 -tvf E:/test.sql 命令解释:   -s    在命令出错时停止执行   -t    设置语句终止字符   -v    回送当前命令   -f    读取输入文件 -t 为默认终止字符(各语句以 ';'终止),通过 -d也可以设置其它终止字符,如以@终止则相应命令为: db2

skyboy11yk的专栏 4287

uniapp微信小程序 - 详解map地图markers图标不显示问题,自定义图标真机调试不显示变成默认marker标记点图标(解决微信小程序map组件markers自定义图标失效,兼容安卓苹果手机)

uniapp微信小程序 map地图markers图标不显示,markers图标真机调试不显示,uniapp map地图显示图标markers问题,自定义图标不显示,添加marker后不显示,uniapp 微信小程序 map marker图标不显示如何解决,uniapp小程序地图的marker图标不显示问题,微信小程序map组件markers自定义图标真机显示问题,uni-app, 微信小程序, map组件, markers图标不显示, 真机调试, 微信小程序map组件,地图加载后marker标记点ios设备

🏆 前端领域优质创作者 2925

DB2 常用命令集合

在执行如下命令时,需要首先在客户端运行中输入db2cmd进行初始化或者su到db2的实例下操作。 一、常识性命令 1、db2 connect to 数据库名>    --连接到本地数据库名   db2 connect to 数据库名> user 用户名> using 密码> --连接到远端数据库 2、 db2 force application all      --强迫所有应用断开数据库

Tiny speck 955

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

DB2常用命令集合_部分摘录

一、基础篇 1、db2 connect to &lt;数据库名&gt;    --连接到本地数据库名        db2 connect to &lt;数据库名&gt; user &lt;用户名&gt; using &lt;密码&gt; --连接到远端数据库 2、 db2 force application all      --强迫所有应用断开数据库连接    3、db...

wangshuai052102的博客 184

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

DB2 INTERSECT、EXCEPT、UNION集合操作测试

DB2 INTERSECT、EXCEPT、UNION集合操作测试     说明:DB2支持三种集合操作INTERSECT(交集)、EXCEPT(差集)、UNION(合集),在ORACLE等数据库里面也有类似的操作,但是细微的地方可能有些差别,现在专门测试一下,以求准确!玩数据千万要细心啊,否则会带来难以意料的结果,呵呵!     测试环境:   DR

caoyishuai的专栏 5769

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

DB2各种命令集合

1.查看是否有失效的视图 db2 "select substr(routineschema,1,30) as routineschema,substr(routinename,1,30) as routinename,routinetype,valid from syscat.routines where valid !='Y' and VALID !='' with ur" ...

hbhe0316的专栏 3193

DB2初级使用-常用命令

db2start启动具体的数据库实例。   db2admin   start启动管理服务器(DAS)。点开始菜单,选择运行 输入db2cc ,或者db2cmd就可以启动控制台了,。 输入db2cw就是命令行 在命令行输入db2start启动数据库,db2stop 停止数据库 输入 db2systray 可以把你推出的图标重新启动出来。create tablespace ::The CR

Anthony88的专栏 5133

DB2 不常用SQL语句集合

DB2 不常用SQL语句集合 1. reanme table dwmd1.Hope_Fact to Hope_Fact_20100101 2. db2 catalog tcpip node DB2PODS remote hostname server 50020 db2 catalog db ODS as ODSP at node DB2PO...

125

DB2-Db2Partition

debezium-connector-db2,数据迁移,数据变更

SlothLu的博客 1139

oracle union except,DB2 INTERSECT、EXCEPT、UNION集合操作测试

DB2 INTERSECT、EXCEPT、UNION集合操作测试说明:DB2支持三种集合操作INTERSECT(交集)、EXCEPT(差集)、UNION(合集),在ORACLE等数据库里面也有类似的操作,但是细微的地方可能有些差别,现在专门测试一下,以求准确!玩数据千万要细心啊,否则会带来难以意料的结果,呵呵!测试环境:DROP TABLE AA_WEEK;CREATE TABLE AA_WEE...

weixin_42513036的博客 217

db2 load 快速_DB2 LOAD 工具使用技巧集合

级别: 初级2009 年 2 月 23 日在 DB2 数据库的日常使用中,很重要的一项工作就是移动数据,那么在此时就经常会用到 LOAD 工具。DB2 的 LOAD 工具的功能非常强大,而且在很多方面与其他工具比较起来有着突出的优点,这使得 LOAD 工具在 DB2 数据移动方面有着不可替代的作用,尤其是在需要处理大规模数据的情况下表现尤其抢眼。下面结合本人的实践经验介绍一下在使用 LOAD 工具...

weixin_42349978的博客 1496

DB2 LOAD 工具使用技巧集合

DB2 LOAD 工具使用技巧集合 在 DB2 数据库的日常使用中,很重要的一项工作就是移动数据,那么在此时就经常会用到 LOAD 工具。DB2 的 LOAD 工具的功能非常强大,而且在很多方面与其他工具比较起来有着突出的优点,这使得 LOAD 工具在 DB2 数据移动方面有着不可替代的作用,尤其是在需要处理大规模数据的情况下表现尤其抢眼。下面结合本人的实践经验介绍一下在使用 LOAD 工具的过程

t0nsha's Blog 1万+

DB2-Db2DatabaseSchema

debezium-connector-db2,数据迁移,数据变更

SlothLu的博客 766

DB2 用法整理

1、运行DB2命令行工具clpplus 开始->运行,clpplus,确定。 2、DB2验证安装 db2level: 此命令显示有关的DB2 安装的产品,修订包的水平,和其他详细信息。 db2licm –l: 此命令会列出您所安装的DB2 信息。 db2val: 这是一个DB2 9.7 中的新命令。它会验证您所安装的拷贝的核心功能。它会验证您所创建的实例是一致的,并验证数据库

King's program process 6240

db2设置默认schema_DB2模式schema

DB2 Schema是在数据库中按逻辑分类的命名对象的集合。在数据库中, 无法创建多个具有相同名称的数据库对象。为此, 架构提供了一个组环境。你可以在一个数据库中创建多个模式, 也可以在具有不同名称的数据库组中创建多个具有相同名称的数据库对象。模式可以包含表, 函数, 索引, 表空间, 过程, 触发器等。例如, 你为“员工”数据库创建两个不同的架构, 分别命名为“常规”和“兼职”。你还可以创建两个...

weixin_39805906的博客 3768
上一篇: 2021-04-03-戒台寺-潭拓寺
下一篇: 循序渐进DB2(第2版)-第11章 DBA日常运行维护
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值