询问者
SqlServer 2012创建VDI导致NBU备份慢

问题
-
Hi
目前有几个问题,需要技术支持。
- 目前通过NBU备份SQLServer 2012特别慢,正常需要2-3小时,现在要6小时。NBU工程师已排除NBU本身问题。不管什么库都会创建VDI,以下是部分NBU日志信息。
2020-7-30 18:02:15 - Info dbclient (pid=3852) INF - backup database "master" to VIRTUAL_DEVICE='VNBU0-3852-6512-1596103332' with stats = 10, blocksize = 65536, maxtransfersize = 4194304, buffercount = 2
2020-7-30 18:02:16 - Info dbclient (pid=3852) INF - Number of stripes: 1, Number of buffers per stripe 2.
2020-7-30 18:02:19 - Info dbclient (pid=3852) INF - Created VDI object for SQL Server instance <SPS-SQLCLUSTER>. Connection timeout is <300> seconds.
2020-7-30 21:09:01 - Info dbclient (pid=3852) INF - Thread has been closed for stripe #0
2020-7-30 21:09:11 - Info dbclient (pid=3852) INF - OPERATION #2 of batch E:\nbubch\fullbackup.bch SUCCEEDED with STATUS 0 (0 is normal). Elapsed time = 11221(1) seconds2020-8-1 18:02:13 - Info dbclient (pid=5996) INF - Using backup image szhqspsd01.MSSQL7.SPS-SQLCLUSTER.db.MMS.~.7.001of001.20200801180208..C
2020-8-1 18:02:14 - Info dbclient (pid=5996) INF - backup database "MMS" to VIRTUAL_DEVICE='VNBU0-5996-6236-1596276132' with stats = 10, blocksize = 65536, maxtransfersize = 4194304, buffercount = 2
2020-8-1 18:02:15 - Info dbclient (pid=5996) INF - Number of stripes: 1, Number of buffers per stripe 2.
2020-8-1 18:02:16 - Info dbclient (pid=5996) INF - Created VDI object for SQL Server instance <SPS-SQLCLUSTER>. Connection timeout is <300> seconds.
2020-8-1 21:04:12 - Info dbclient (pid=5996) INF - Thread has been closed for stripe #0
2020-8-1 21:04:23 - Info dbclient (pid=5996) INF - OPERATION #2 of batch E:\nbubch\fullbackup.bch SUCCEEDED with STATUS 0 (0 is normal). Elapsed time = 10934(0) seconds
全部回复
-
你好,
请问您说的NBU是指NetBackup吗,我不了解此产品,对此无法给出有用的建议。
对于SQL Server备份花费更多时间,请检查是否存在网络问题,然后检查SQL Server在此备份时间内是否有其他作业或进程在进行并导致了阻塞或资源争用。
""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
For more information, please refer to the sticky post.
- 已编辑 Cris ZhanMicrosoft contingent staff 2020年8月4日 8:57
-
可以咨询一下 NBU 工程师,VDI是用来干嘛的
- 已建议为答案 willson yuanMicrosoft contingent staff 2020年8月20日 6:07
-
从日志描述上看,创建VDI不在备份的过程中,是创建了之后才使用此设备备份 SQL Server,所以问题不在数据库这国
- 已建议为答案 willson yuanMicrosoft contingent staff 2020年8月20日 6:07
-
通过分析SQLserver,发现是SQL本身创建的VDI,NBU只是调用SQL创建的VDI。
这个VDI运行了3个小时,想知道这3个小时VDI 在做什么
07/17/2020 18:01:49,Backup,未知,Database backed up. Database: App_Management_da917319-5799-442b-8475-b06c21dfc8b0<c/> creation date(time): 2015/01/27(08:15:31)<c/> pages dumped: 545<c/> first LSN: 266:128:46<c/> last LSN: 266:149:1<c/> number of dump devices: 1<c/> device information: (FILE=1<c/> TYPE=VIRTUAL_DEVICE: {'VNBU0-6588-6396-1594980017'}). This is an informational message only. No user action is required.
-
你好,
检查之前备份正常的NBU日志信息,是否也创建了VDI,还可以看出什么不同吗。
SQL Server提供了一个称为虚拟备份设备接口(VDI)的API,该API使独立软件供应商可以将SQL Server集成到其产品中,以提供对备份和还原操作的支持。所以VDI是第三方备份应用程序用来与SQL Server通信的接口。 NBU日志也显示为SQL Server实例创建VDI对象。
""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
For more information, please refer to the sticky post.
- 已编辑 Cris ZhanMicrosoft contingent staff 2020年8月7日 6:40
-
你好,
在SQL Server端的Errorlog或者Windows logs是否记录由任何有关于SQLVDI的错误信息,是否可以在路径C:\Program Files\Microsoft SQL Server\MSSQL11.此实例名\MSSQL\Log下找到VDI.LOG以作分析。
""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
For more information, please refer to the sticky post.
- 已编辑 Cris ZhanMicrosoft contingent staff 2020年8月10日 7:58
-
你好,
抱歉,对于Server 2005或更高版本安装的VDI库,错误则会记录在Windows事件查看器中,源组件标识为SQLVDI。不会生成vdi.log文件。
""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
For more information, please refer to the sticky post. -
你好,
如果SQL Server服务器端(Errorlog或者Windows logs)没有出现VDI相关的错误信息,那么第三方备份应用程序在调用VDI API与SQL Server通信的过程并没有出现错误,问题很可能不在SQL Server端。
请检查是否存在网络问题,然后检查SQL Server在此备份时间内是否有其他作业或进程在进行并导致了阻塞或资源争用。
最近是否有进行过备份,依旧需要很长时间吗?
""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
For more information, please refer to the sticky post.
- 已编辑 Cris ZhanMicrosoft contingent staff 2020年8月11日 2:09
-
你好,
如果SQL Server服务器端(Errorlog或者事件查看器)没有出现VDI相关的错误信息,那么第三方备份应用程序在调用VDI API与SQL Server通信的过程并没有出现错误,问题很可能不在SQL Server端。
根据NBU日志,”Created VDI object for SQL Server instance <SPS-SQLCLUSTER>“此过程花费了11221(1) seconds。
""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
For more information, please refer to the sticky post.
- 已编辑 Cris ZhanMicrosoft contingent staff 2020年8月18日 3:46
- 已建议为答案 willson yuanMicrosoft contingent staff 2020年8月20日 6:06
-
你好,
我认为问题可能不在SQL Server端。
""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
For more information, please refer to the sticky post. -
Hi Andson,
通过您的描述,可以得出结论时间主要发生在创建VDI,对吗?
可以通过排除法,来说明创建VDI是NBU的行为。所以首先需要判断的是,如果用SSMS 去做备份的时候会创建VDI吗?用SSMS 去备份数据库需要花的时间是多少?我在我的SQL Server 2012上用SSMS 去备份数据库是不会创建VDI的。间接的排除了SQL Server 这边的问题。所以我也赞同Cris 和 zjcxc.邹建的想法,咨询一下 NBU 工程师,VDI是用来干嘛的?
根据您的日志,NBU是会去创建VDI的,而且主要时间花在创建VDI上。因为NBU是第三方工具,我们不知道其工作原理,NBU创建VDI的过程,具体在做什么操作?为什么有的时候时间较长,有的时候时间较短,以及怎么去查看VDI为什么要花3小时一直去创建等等,这些都需要NBU那边给出相关的回答。
Best Regards
Willson Yuan
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com -
我咨询了NBU的工程师,他们给的回复是SSMS自己创建的VDI并提供给NBU去调用,以下从是数据库的日志截图。想知道VIRTUAL_DEVICE: {'VNBU0-4508-5368-1595239333'}). 这个是SQL自己的吗。
Database backed up. Database: master<c/> creation date(time): 2020/04/14(18:30:14)<c/> pages dumped: 553<c/> first LSN: 7655:142:73<c/> last LSN: 7655:173:1<c/> number of dump devices: 1<c/> device information: (FILE=1<c/> TYPE=VIRTUAL_DEVICE: {'VNBU0-4508-5368-1595239333'}). This is an informational message only. No user action is required.
-
你好,
这是第三方工具(NBU)备份或还原时使用的设备,不属于SQL Server。
""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
For more information, please refer to the sticky post.
- 已编辑 Cris ZhanMicrosoft contingent staff 2020年8月24日 3:25
-
Hi Andson,
我想我的上一个答案应该已经说清楚了,SQL Server 自己做备份的时候是不会创建vitual device,device type 也不会是virtual device。 关键问题是高清NBU为什么要创建vitual device,NBU 是怎么调用或者调用谁创建的virtual device?
这里有一个类似的关于第三方软件创建virtual device的 帖子,您可以参考一下:
trying to find out what's triggering backups and where they are going to
Best Regards
Willson Yuan
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com