MSSQL Server运维常用SQL命令

1、数据库连接数

select name, state, state_desc from sys.databases;

查询结果:

2、数据库状态

select name, state, state_desc from sys.databases;

查询结果:

3、数据文件状态

select a.name, b.physical_name, b.state, b.state_desc from sys.databases as a, sys.master_files as b where a.database_id = b.database_id;

 

4、平均每秒事务数TPS

5、 缓存命中率

SELECT (a.cntr_value * 1.0 / b.cntr_value) * 100.0 as BufferCacheHitRatio FROM sys.dm_os_performance_counters a JOIN (SELECT cntr_value, OBJECT_NAME FROM sys.dm_os_performance_counters WHERE counter_name = 'Buffer cache hit ratio base' AND OBJECT_NAME = 'SQLServer:Buffer Manager') b ON a.OBJECT_NAME = b.OBJECT_NAME WHERE a.counter_name = 'Buffer cache hit ratio' AND a.OBJECT_NAME = 'SQLServer:Buffer Manager'

6、平均每秒SQL编译数

select cntr_value from sys.dm_os_performance_counters where counter_name = 'SQL Compilations/sec';

7、平均每秒SQL重编译数

select cntr_value from sys.dm_os_performance_counters where counter_name = 'Lock Requests/sec'and instance_name = '_Total';

8、每秒全表扫描数

 select cntr_value from sys.dm_os_performance_counters where counter_name = 'Full Scans/sec';

9、平均每秒batch数

select cntr_value from sys.dm_os_performance_counters where counter_name = 'Batch Requests/sec';

10、每秒用户错误数

select cntr_value from sys.dm_os_performance_counters where counter_name = 'Errors/sec' and instance_name = '_Total';

11、每秒锁等待次数

select cntr_value from sys.dm_os_performance_counters where counter_name = 'Lock Waits/sec'and instance_name = '_Total';

12、’每秒锁请求次数

select cntr_value from sys.dm_os_performance_counters where counter_name = 'Lock Requests/sec'and instance_name = '_Total';

13、每秒锁超时次数

select cntr_value from sys.dm_os_performance_counters where counter_name = 'Lock Timeouts/sec'and instance_name = '_Total';

14、每秒锁死次数

select cntr_value from sys.dm_os_performance_counters where counter_name = 'Lock Requests/sec'and instance_name = '_Total';

15、查看死锁

SELECT request_session_id spid,OBJECT_NAME(resource_associated_entity_id)tableName FROM sys.dm_tran_locks WHERE resource_type='OBJECT ';

16、杀死死锁

Kill pid

17、显示死锁相关信息

exec sp_who2 pid

18、死锁跟踪

select * from sys.dm_xe_sessions where name = 'system_health'

SELECT

xed.value('@timestamp','datetime')as Creation_Date,  

xed.query('.')AS Extend_Event  

FROM

(  

SELECT CAST([target_data] AS XML)AS Target_Data  

FROM sys.dm_xe_session_targets AS xt  

INNER JOIN sys.dm_xe_sessions AS xs  

ON xs.address= xt.event_session_address  

WHERE xs.name=N'system_health'  

AND xt.target_name=N'ring_buffer'

) AS XML_Data  

CROSS APPLY Target_Data.nodes('RingBufferTarget/event[@name="xml_deadlock_report"]')AS XEventData(xed)  

ORDER BY Creation_Date DESC

19、每秒检查点写入Page数

select cntr_value from sys.dm_os_performance_counters where counter_name = 'Checkpoint pages/sec';

20、Lazy Writes/sec

select * from sys.dm_os_performance_counters where counter_name = 'Lazy writes/sec';

21、Always on 状态

select a.name, b.database_state, b.database_state_desc from sys.databases as a, sys.dm_hadr_database_replica_states as b where a.database_id = b.database_id and b.is_local=1;

22、慢查询

步骤一、---先清除sql server的缓存

 dbcc freeProcCache

SELECT creation_time N'语句编译时间'

,last_execution_time N'上次执行时间'

,total_physical_reads N'物理读取总次数'

,total_logical_reads/execution_count N'每次逻辑读次数'

,total_logical_reads N'逻辑读取总次数'

,total_logical_writes N'逻辑写入总次数'

,execution_count N'执行次数'

,total_worker_time/1000 N'所用的CPU总时间ms'

,total_elapsed_time/1000 N'总花费时间ms'

,(total_elapsed_time / execution_count)/1000 N'平均时间ms'

,SUBSTRING(st.text, (qs.statement_start_offset/2) + 1,

((CASE statement_end_offset

WHEN -1 THEN DATALENGTH(st.text)

ELSE qs.statement_end_offset END

- qs.statement_start_offset)/2) + 1) N'执行语句'

FROM sys.dm_exec_query_stats AS qs

CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) st

where SUBSTRING(st.text, (qs.statement_start_offset/2) + 1,

((CASE statement_end_offset

WHEN -1 THEN DATALENGTH(st.text)

ELSE qs.statement_end_offset END

- qs.statement_start_offset)/2) + 1) not like '%fetch%'

ORDER BY total_elapsed_time / execution_count DESC;

步骤二、正在执行的慢查询语句

SELECT  TOP 1 ST.transaction_id AS TransactionID ,

        st.session_id ,

        DB_NAME(DT.database_id) AS DatabaseName ,

        ses.host_name ,

        ses.login_name ,

        ses.status,

        AT.transaction_begin_time AS TransactionStartTime ,

        s.text ,

        c.connect_time ,

        DATEDIFF(second, AT.transaction_begin_time, GETDATE()) "exec_time(s)" ,

        DATEDIFF(minute, AT.transaction_begin_time, GETDATE()) AS Tran_run_time ,

        CASE AT.transaction_type

          WHEN 1 THEN 'Read/Write Transaction'

          WHEN 2 THEN 'Read-Only Transaction'

          WHEN 3 THEN 'System Transaction'

          WHEN 4 THEN 'Distributed Transaction'

        END AS TransactionType ,

        CASE AT.transaction_state

          WHEN 0 THEN 'Transaction Not Initialized'

          WHEN 1 THEN 'Transaction Initialized & Not Started'

          WHEN 2 THEN 'Active Transaction'

          WHEN 3 THEN 'Transaction Ended'

          WHEN 4 THEN 'Distributed Transaction Initiated Commit Process'

          WHEN 5 THEN 'Transaction in Prepared State & Waiting Resolution'

          WHEN 6 THEN 'Transaction Committed'

          WHEN 7 THEN 'Transaction Rolling Back'

          WHEN 8 THEN 'Transaction Rolled Back'

        END AS TransactionState

FROM    sys.dm_tran_session_transactions AS ST

        INNER JOIN sys.dm_tran_active_transactions AS AT ON ST.transaction_id = AT.transaction_id

        INNER JOIN sys.dm_tran_database_transactions AS DT ON ST.transaction_id = DT.transaction_id

        LEFT JOIN sys.dm_exec_connections AS C ON st.session_id = c.session_id

        LEFT JOIN sys.dm_exec_sessions AS ses ON c.session_id = ses.session_id

        CROSS APPLY sys.dm_exec_sql_text(c.most_recent_sql_Handle) s

WHERE   DATEDIFF(second, AT.transaction_begin_time, GETDATE()) > 2

步骤三、排查历史慢查询语句

SELECT TOP 20

  [Total IO] = (qs.total_logical_reads + qs.total_logical_writes)

  , [Average IO] = (qs.total_logical_reads + qs.total_logical_writes) /

                                            qs.execution_count

  , qs.execution_count

  , SUBSTRING (qt.text,(qs.statement_start_offset/2) + 1,    

  ((CASE WHEN qs.statement_end_offset = -1

    THEN LEN(CONVERT(NVARCHAR(MAX), qt.text)) * 2

    ELSE qs.statement_end_offset

    END - qs.statement_start_offset)/2) + 1) AS [Individual Query]

  , qt.text AS [Parent Query]

  , DB_NAME(qt.dbid) AS DatabaseName

  , qp.query_plan

FROM sys.dm_exec_query_stats qs

CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) as qt

CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) qp

ORDER BY [Average IO]  DESC

或者:

use master

-- SELECT * FROM dbo.sysprocesses WHERE spid IN (SELECT blocked FROM dbo.sysprocesses where blocked <> 0);

SELECT

    es.session_id,

    database_name=DB_NAME(er.database_id),

    er.cpu_time,

    er.reads,

    er.writes,

    er.logical_reads,

    login_name,

    er.status,

    blocking_session_id,

    wait_type,

    wait_resource,

    wait_time,

    individual_query=SUBSTRING(qt.text,(er.statement_start_offset/2)+1,((CASE  WHEN  er.statement_end_offset=-1 THEN  LEN(CONVERT(NVARCHAR(MAX),qt.text))* 2 ELSE   er.statement_end_offset  END-er.statement_start_offset)/2)+1),

    parent_query=qt.text,

    program_name,

    host_name,

    nt_domain,

    start_time,

    DATEDIFF(MS,er.start_time,GETDATE())as duration,

    (SELECT  query_plan  FROM  sys.dm_exec_query_plan (er.plan_handle))AS  query_plan

FROM

    sys.dm_exec_requests er

    INNER  JOIN  sys.dm_exec_sessions  es  ON er.session_id=es.session_id

    CROSS  APPLY  sys.dm_exec_sql_text (er.sql_handle)AS  qt

WHERE

    es.session_id> 50         

    AND  es.session_Id  NOT  IN(@@SPID)

ORDER BY

1, 2

说明:

logical_reads:逻辑读,衡量语句的执行开销。如果大于10w,说明此语句开销很大。可以检查下索引是否合理

status:进程的状态。running 表示正在运行,sleeping 表示处于睡眠中,未运行任何语句,suspend 表示等待,runnable 等待cpu 调度

blocking_session_id: 如果不为0,例如 60 。表示52号进程正在被60阻塞。50 进程必须等待60执行完成,才能执行下面的语句

host_name :发出请求的服务器名

program_name:发出请求的应用程序名

duration: 请求的执行时间

23、最耗CPU的回话SQL查询语法

SELECT TOP 10

[session_id],

[request_id],

 [start_time] AS '开始时间',

[status] AS '状态',

[command] AS '命令',

dest.[text] AS 'sql语句',

DB_NAME([database_id]) AS '数据库名',

[blocking_session_id] AS '正在阻塞其他会话的会话ID',

[wait_type] AS '等待资源类型',

[wait_time] AS '等待时间',

[wait_resource] AS '等待的资源',

[reads] AS '物理读次数',

[writes] AS '写次数',

[logical_reads] AS '逻辑读次数',

[row_count] AS '返回结果行数'

FROM sys.[dm_exec_requests] AS der

CROSS APPLY

sys.[dm_exec_sql_text](der.[sql_handle]) AS dest

WHERE [session_id]>50 AND DB_NAME(der.[database_id])='DB_name'  -- DB_name 根据自己写

ORDER BY [cpu_time] DESC

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

SELECT TOP 10

   total_worker_time/execution_count AS avg_cpu_cost, plan_handle,

  

   execution_count,

  

   (SELECT SUBSTRING(text, statement_start_offset/2 + 1,

  

      (CASE WHEN statement_end_offset = -1

  

         THEN LEN(CONVERT(nvarchar(max), text)) * 2

  

         ELSE statement_end_offset

      END - statement_start_offset)/2)

   FROM sys.dm_exec_sql_text(sql_handle)) AS query_text

FROM sys.dm_exec_query_stats

  

ORDER BY [avg_cpu_cost] DESC

24、查看具体的CPU耗时SQL

SELECT TOP 10

dest.[text] AS 'sql语句'

 FROM sys.[dm_exec_requests] AS der

CROSS APPLY

sys.[dm_exec_sql_text](der.[sql_handle]) AS dest

WHERE [session_id]>50  

ORDER BY [cpu_time] DESC

25、查看CPU数和user scheduler数和最大工作线程数,检查worker是否用完也可以排查CPU占用情况

 --查看CPU数和user scheduler数目

SELECT cpu_count,scheduler_count FROM sys.dm_os_sys_info

--查看最大工作线程数

SELECT max_workers_count FROM sys.dm_os_sys_info

26、查看CPU占用高的语句

SELECT TOP 10

    total_worker_time/execution_count AS avg_cpu_cost, plan_handle,

    execution_count,

    (SELECT SUBSTRING(text, statement_start_offset/2 + 1,

       (CASE WHEN statement_end_offset = -1

          THEN LEN(CONVERT(nvarchar(max), text)) * 2

         ELSE statement_end_offset

       END - statement_start_offset)/2)

     FROM sys.dm_exec_sql_text(sql_handle)) AS query_text

 FROM sys.dm_exec_query_stats

 ORDER BY [avg_cpu_cost] DESC;

27、查询正在执行的语句

SELECT     [Spid] = session_Id, ecid, [Database] = DB_NAME(sp.dbid),

 [User] = nt_username, [Status] = er.status,

 [Wait] = wait_type,

 [Individual Query] = SUBSTRING(qt.text, er.statement_start_offset / 2, (CASE WHEN er.statement_end_offset = - 1 THEN LEN(CONVERT(NVARCHAR(MAX), qt.text))

                      * 2 ELSE er.statement_end_offset END - er.statement_start_offset) / 2),

                       [Parent Query] = qt.text,

                       Program = program_name, Hostname,

                       nt_domain, start_time

FROM    

     sys.dm_exec_requests er INNER JOIN  sys.sysprocesses sp ON er.session_id = sp.spid

     CROSS APPLY sys.dm_exec_sql_text(er.sql_handle) AS qt

WHERE     session_Id > 50 /* Ignore system spids.*/ AND session_Id NOT IN (@@SPID)

或者用下面的SQL语句排查:

SELECT  [Spid] = session_id ,

            ecid ,

            [Database] = DB_NAME(sp.dbid) ,

            [User] = nt_username ,

            [Status] = er.status ,

            [Wait] = wait_type ,

            [Individual Query] = SUBSTRING(qt.text,

                                           er.statement_start_offset / 2,

                                           ( CASE WHEN er.statement_end_offset = -1

                                                  THEN LEN(CONVERT(NVARCHAR(MAX), qt.text))

                                                       * 2

                                                  ELSE er.statement_end_offset

                                             END - er.statement_start_offset )

                                           / 2) ,

            [Parent Query] = qt.text ,

            Program = program_name ,

            hostname ,

            nt_domain ,

            start_time

    FROM    sys.dm_exec_requests er

            INNER JOIN sys.sysprocesses sp ON er.session_id = sp.spid

            CROSS APPLY sys.dm_exec_sql_text(er.sql_handle) AS qt

    WHERE   session_id > 50 -- Ignore system spids.

            AND session_id NOT IN ( @@SPID ) -- Ignore this current statement.

ORDER BY    1 ,

            2

28、查询数据库连接情况

select client_net_address '客户端IP',local_net_address '服务器的IP',* from sys.dm_exec_connections

SELECT * FROM sys.[sysprocesses] WHERE [spid]>50 --AND DB_NAME([dbid])='gposdb'

29、查看连接对象

select client_net_address '客户端IP',local_net_address '服务器的IP',* from sys.dm_exec_connections

SELECT * FROM sys.[sysprocesses] WHERE [spid]>50 --AND DB_NAME([dbid])='gposdb'

30、查看索引是否丢失

SELECT

     DatabaseName = DB_NAME(database_id)

     ,[Number Indexes Missing] = count(*)

 FROM sys.dm_db_missing_index_details

 GROUP BY DB_NAME(database_id)

 ORDER BY 2 DESC;

 SELECT  TOP 10

         [Total Cost]  = ROUND(avg_total_user_cost * avg_user_impact * (user_seeks + user_scans),0)

         , avg_user_impact

         , TableName = statement

         , [EqualityUsage] = equality_columns

         , [InequalityUsage] = inequality_columns

         , [Include Cloumns] = included_columns

 FROM        sys.dm_db_missing_index_groups g

 INNER JOIN    sys.dm_db_missing_index_group_stats s

        ON s.group_handle = g.index_group_handle

 INNER JOIN    sys.dm_db_missing_index_details d

        ON d.index_handle = g.index_handle

 ORDER BY [Total Cost] DESC;

31、查找持续时间最长的查询

SELECT

   DB_NAME(dbid) 'Database Name',

   physical_name 'File Location',

   NumberReads 'Number of Reads',

   BytesRead 'Bytes Read',

   NumberWrites 'Number of Writes',

   BytesWritten 'Bytes Written',   

   IoStallReadMS 'IO Stall Read',

   IoStallWriteMS 'IO Stall Write',

   IoStallMS as 'Total IO Stall (ms)'

FROM

   fn_virtualfilestats(NULL,NULL) fs INNER JOIN

    sys.master_files mf ON fs.dbid = mf.database_id

    AND fs.fileid = mf.file_id

ORDER BY

   DB_NAME(dbid);

32、排查连接对象

SELECT [session_id],

[request_id],

[start_time] AS '开始时间',

[status] AS '状态',

[command] AS '命令',

dest.[text] AS 'sql语句',

DB_NAME([database_id]) AS '数据库名',

[blocking_session_id] AS '正在阻塞其他的ID',

[wait_type] AS '等待资源类型',

[wait_time] AS '等待时间',

[wait_resource] AS '等待的资源',

[reads] AS '物理读次数',

[writes] AS '写次数',

[logical_reads] AS '逻辑读次数',

[row_count] AS '返回结果行数'

FROM sys.[dm_exec_requests] AS der

CROSS APPLY

sys.[dm_exec_sql_text](der.[sql_handle]) AS dest

WHERE [session_id]>50

ORDER BY [cpu_time] DESC;

33、查看占用较大的SQL语句

SELECT TOP 10

dest.[text] AS 'sql语句'

FROM sys.[dm_exec_requests] AS der

CROSS APPLY

sys.[dm_exec_sql_text](der.[sql_handle]) AS dest

WHERE [session_id]>50

ORDER BY [cpu_time] DESC;

如果SQLServer存在等待的SQL查询,执行下面的查询语句就会显示出会话中有多少个worker在等待

SELECT TOP 50

 [session_id],

 [request_id],

 [cpu_time],

 [start_time] AS '开始时间',

 [status] AS '状态',

 [command] AS '命令',

 dest.[text] AS 'sql语句',

 DB_NAME([database_id]) AS '数据库名',

 [blocking_session_id] AS '正在阻塞其他会话的会话ID',

 der.[wait_type] AS '等待资源类型',

 [wait_time] AS '等待时间',

 [wait_resource] AS '等待的资源',

 [dows].[waiting_tasks_count] AS '当前正在进行等待的任务数',

 [reads] AS '物理读次数',

 [writes] AS '写次数',

 [logical_reads] AS '逻辑读次数',

 [row_count] AS '返回结果行数'

 FROM sys.[dm_exec_requests] AS der

 INNER JOIN [sys].[dm_os_wait_stats] AS dows

 ON der.[wait_type]=[dows].[wait_type]

 CROSS APPLY

 sys.[dm_exec_sql_text](der.[sql_handle]) AS dest

 WHERE [session_id]>50

 ORDER BY [cpu_time] DESC

34、CPU占用高的SQL

SELECT total_worker_time/execution_count AS avg_cpu_cost, plan_handle,

   execution_count,

   (SELECT SUBSTRING(text, statement_start_offset/2 + 1,

      (CASE WHEN statement_end_offset = -1

         THEN LEN(CONVERT(nvarchar(max), text)) * 2

         ELSE statement_end_offset

      END - statement_start_offset)/2)

   FROM sys.dm_exec_sql_text(sql_handle)) AS query_text

FROM sys.dm_exec_query_stats

ORDER BY [avg_cpu_cost] DESC;

 

35、CPU调度程序在磁盘上等待的查询

SELECT  COUNT(*) Schedulers,

        AVG(work_queue_count) AS [Avg Work Queue Count],

        AVG(pending_disk_io_count) AS [Avg Pending DiskIO Count],

        SUM(work_queue_count) AS [SUM Work Queue Count],

        SUM(pending_disk_io_count) AS [SUM Pending DiskIO Count]

FROM sys.dm_os_schedulers WITH (NOLOCK)

WHERE scheduler_id < 255;

36、CPU调用过去一小时的详细信息

DECLARE @ms_ticks_now BIGINT

SELECT @ms_ticks_now = ms_ticks

FROM sys.dm_os_sys_info;

SELECT TOP 60 record_id

    ,dateadd(ms, - 1 * (@ms_ticks_now - [timestamp]), GetDate()) AS EventTime

    ,[SQLProcess (%)]

    ,SystemIdle

    ,100 - SystemIdle - [SQLProcess (%)] AS [OtherProcess (%)]

FROM (

    SELECT record.value('(./Record/@id)[1]', 'int') AS record_id

        ,record.value('(./Record/SchedulerMonitorEvent/SystemHealth/SystemIdle)[1]', 'int') AS SystemIdle

        ,record.value('(./Record/SchedulerMonitorEvent/SystemHealth/ProcessUtilization)[1]', 'int') AS [SQLProcess (%)]

        ,TIMESTAMP

    FROM (

        SELECT TIMESTAMP

            ,convert(XML, record) AS record

        FROM sys.dm_os_ring_buffers

        WHERE ring_buffer_type = N'RING_BUFFER_SCHEDULER_MONITOR'

            AND record LIKE '%<SystemHealth>%'

        ) AS x

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/bicheng/46920.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

03MFC画笔/画刷/画椭圆/圆/(延时)文字

文章目录 画实心矩形自定义画布设计及使用连续画线及自定义定义变量扇形画椭圆/圆输出颜色文本定时器与定时事件画实心矩形 自定义画布设计及使用 连续画线及自定义定义变量 扇形 画椭圆/圆 输出颜色文本

尚品汇-(十六)

目录 商品详情功能开发 &#xff08;1&#xff09;搭建service-item &#xff08;2&#xff09;获取sku基本信息与图片信息 &#xff08;3&#xff09;获取分类信息&#xff08;查看三级分类&#xff09; 商品详情功能开发 &#xff08;1&#xff09;搭建service-item 点…

状态管理的艺术:探索Flutter的Provider库

状态管理的艺术&#xff1a;探索Flutter的Provider库 前言 上一篇文章中&#xff0c;我们详细介绍了 Flutter 应用中的状态管理&#xff0c;以及 StatefulWidget 和 setState 的使用。 本篇我们继续介绍另一个实现状态管理的方式&#xff1a;Provider。 Provider优缺点 基…

笔记 2 : 课本第 3 章开始,记录 arm 的汇编指令的格式

&#xff08;13&#xff09; 介绍 arm 中的第一个汇编指令的用法 mov &#xff1a; &#xff08;14&#xff09;立即数的概念&#xff1a; &#xff08;15&#xff09; 汇编中的移位写法&#xff1a; 举例 &#xff1a; &#xff08;16&#xff09; 学习一个新的指令 cmp &a…

芯课堂 | Synwit_UI_Creator(ugui)平台之PC端界面设计篇

​今天小编给大家介绍的是华芯微特面向小尺寸TFT-LCD屏驱市场量身打造的Synwit_UI_Creator&#xff08;ugui&#xff09;自研开发套件。 UI_Creator&#xff08;ugui&#xff09;开发套件分为上位机和下位机&#xff0c;以下如无特指&#xff0c;上位机即为PC端设计器/仿真器&…

虚拟机及其Debian(kali)安装

本机电脑为Windows10系统专业版&#xff0c;在此基础上安装VMware和系统&#xff08;Kali&#xff09; 步骤如下 一、安装 VMware Workstation Pro v16.2.4 安装步骤可参照网上博客&#xff0c;该步骤较简单&#xff0c;此处不做讲解。文件中共计两个&#xff0c;其中一个是激活…

【ProtoBuf】在 Windows / Linux 安装 ProtoBuf(超详细教程)

一、ProtoBuf 在 Window 下的安装 1、下载 ProtoBuf 编译器 下载地址&#xff1a;github.com 可以不用下载最新版本&#xff0c;具体的下载根据自己电脑情况选择。 下载之后将压缩包解压到本地目录下。解压后的文件内包含 bin、include 文件&#xff0c;以及一个 readme.txt…

基于SSM框架的宠物领养系统【附源码和运行步骤】

基于SSM框架的宠物领养系统 一、项目介绍用户模块宠物模块领养模块管理员模块 二、项目技术栈三、项目运行四、项目演示用户领养界面管理员界面 总结 大家好&#xff0c;这里是程序猿代码之路&#xff01;在当今社会&#xff0c;宠物已经成为许多家庭的重要成员&#xff0c;带给…

4个免费自动生成文章的软件,轻松创作高质量文章

对于创作都而言&#xff0c;能够轻松创作出高质量的文章是每个创作者都想实现的想法&#xff0c;但如何依靠创作者自己去人工手动完成写作&#xff0c;那么将会需要付出很多时间与精力&#xff0c;并且还要有好的创作灵感&#xff0c;因此&#xff0c;通过人工手动创作高质量的…

记录些MySQL题集(1)

Innodb 是如何实现事务的&#xff1f; InnoDB是MySQL数据库的一个存储引擎&#xff0c;它支持事务处理。事务处理是数据库管理系统执行过程中的一个逻辑单位&#xff0c;由一个或多个SQL语句组成&#xff0c;这些语句要么全部执行&#xff0c;要么全部不执行&#xff0c;是一个…

PyTorch复现PointNet++——模型训练+模型测试

本博文主要实现对PointNet源码进行调试&#xff0c;模型训练模型测试。 一、下载源码和数据集 论文&#xff1a;PointNet: Deep Hierarchical Feature Learning on Point Sets in a Metric Space GitHub源码&#xff1a;Pointnet2_pytorch 数据集包括三种&#xff1a;分类、零…

django报错(三):No crontab program或got an unexpected keyword argument ‘user’

Crontab是linux系统上的定时管理模块&#xff0c;简单配置&#xff0c;灵活使用。但是要在windows使用必须借助Cygwin等虚拟工具&#xff0c;否则会报错“No crontab program”。如下图&#xff1a; python-crontab是其提供了python模块对crontab的访问&#xff0c;即可以通过p…

EasyAnimate-v3版本支持I2V及超长视频生成

阿里云人工智能平台&#xff08;PAI&#xff09;自研开源的视频生成项目EasyAnimate正式发布v3版本&#xff1a; 支持 图片&#xff08;可配合文字&#xff09; 生成视频 支持 上传两张图片作为起止画面 生成视频 最大支持720p&#xff08;960*960分辨率&#xff09; 144帧视…

【Git分支管理】分支策略 | Bug分支

目录 1.分支策略 2.特殊场景-Bug分支 2.1 master出现bug ​2.2 dev2正在开发☞stash区域 2.3 dev2正在开发master出现bug 2.3.1 fix_bug修复bug和master合并 2.3.2 dev2分支开发完和master合并 合并冲突&#xff1a;merge☞手动解决☞提交没有合并冲突&#xff1a;mer…

ns3-gym入门(三):在opengym基础上实现一个小小的demo

因为官方给的"opengym""opengym-2"这两个例子都很简单&#xff0c;所以自己改了一个demo&#xff0c;把reward-action-state相互影响的关系表现出来 一、准备工作 在ns3.35/scratch目录下创建一个文件夹&#xff1a; &#xff08;后续的运行指令后面都需要…

【深度学习】基于深度学习的模式识别基础

一 模式识别基础 “模式”指的是数据中具有某些相似特征或属性的事物或事件的集合。具体来说&#xff0c;模式可以是以下几种形式&#xff1a; 视觉模式 在图像或视频中&#xff0c;模式可以是某种形状、颜色组合或纹理。例如&#xff0c;人脸、文字字符、手写数字等都可以视…

一图了解网络通信原理

&#x1f4d1;打牌 &#xff1a; da pai ge的个人主页 &#x1f324;️个人专栏 &#xff1a; da pai ge的博客专栏 ☁️宝剑锋从磨砺出&#xff0c;梅花香自苦寒来 ☁️运维工程师的职责&#xff1a;监…

正则表达式怎么控制匹配的字符串更近的一个

http((?!http).)*m3u8 正则表达式怎么控制匹配的字符串更近的一个 正则如何匹配最近的字符 正则如何匹配最近的两个字符 怎么控制只要离字符串b匹配更近一点的字符串a 解释 a.b&#xff0c;它将会匹配最长的以a开始&#xff0c;以b结束的字符串 a.?b匹配最短的&#xff…

废品回收小程序:高效便捷回收,推动市场发展

随着互联网的发展和人们日益提升的环保意识&#xff0c;对废品回收市场的关注度不断提高&#xff0c;废品回收成为了当下发展前景巨大的行业之一。 传统的废品回收体系不完善&#xff0c;存在较大的不便利性&#xff0c;回收流程繁琐。为了方便大众回收&#xff0c;连接回收企…

【数据结构】树和二叉树——Lesson1

Hi~&#xff01;这里是奋斗的小羊&#xff0c;很荣幸您能阅读我的文章&#xff0c;诚请评论指点&#xff0c;欢迎欢迎 ~~ &#x1f4a5;&#x1f4a5;个人主页&#xff1a;奋斗的小羊 &#x1f4a5;&#x1f4a5;所属专栏&#xff1a;C语言 &#x1f680;本系列文章为个人学习…