[英]When using SQL API's for .NET (C#), what should I out as the file's extension?
I'm using the binaries from Microsoft.SqlServer.Management.Common, Microsoft.SqlServer.Management.Smo我正在使用 Microsoft.SqlServer.Management.Common、Microsoft.SqlServer.Management.Smo 的二进制文件
The code is:代码是:
bkup.Devices.AddDevice(dbName, DeviceType.File);
bkup.CompressionOption = BackupCompressionOptions.On;
The extensions for the compressed.bak files are not there... is it.rar, .zip, etc, etc?没有压缩过的.bak 文件的扩展名...是it.rar、.zip 等吗?
My program successfully backups up the dbs, but people are annoyed that there are no file extensions.我的程序成功备份了 dbs,但人们对没有文件扩展名感到恼火。 The documentation for this API, says nothing about an extension when using BackupCompressions.On
此 API 的文档没有说明使用BackupCompressions.On
时的扩展
Does anyone know?有人知道吗? (sources appreciated) (来源赞赏)
I use '.bak' exstension for compressed backups.我使用“.bak”扩展名进行压缩备份。 Maybe I'm wrong, but I cannot see why the extesion should be changed if backup is compressed.也许我错了,但我看不出为什么压缩备份时应该更改扩展。
SQL Server compresses data as it performs the backup. SQL 服务器在执行备份时压缩数据。 It does not first create a backup file and the compresses it using zip or rar, so you cannot use a tool such as zip or rar to un-compress the backup file.它不会先创建备份文件,而是使用 zip 或 rar 对其进行压缩,因此您不能使用 zip 或 rar 等工具来解压缩备份文件。 Compressed backup files only make sense to SQL Server itself.压缩的备份文件只对 SQL 服务器本身有意义。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.