.bak文件在实际目录位置找不到? [英] .bak files cannot found in actual directory location?

查看:863
本文介绍了.bak文件在实际目录位置找不到?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

数据库备份后,在实际服务器的保存位置找不到创建的.bak文件,例如我将其保存在此路径中:

After database backup, the created .bak files are not found in the save location in the actual server, for example I save it in this path:

C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Backup

但是当我导航到上面写的那个文件夹时,该文件夹是空的。这是具有数据库的服务器。

但是当我尝试使用SSMS恢复.bak文件时,我可以看到数据库文件。



我尝试了什么:



But when I navigate to that folder written above, the folder is empty. This is the same server that has the database.
But when I try to restore the .bak file using SSMS I can see the database files.

What I have tried:

When I execute the below query, It shows the backup files and location.
<pre>SELECT *
FROM msdb.dbo.backupmediafamily





请帮助我有点丢失.. :(



Please help im kinda lost.. :(

推荐答案

这是因为SQL Server是基于服务器的产品:它存储相对于其服务器安装文件夹的备份文件,而不是本地PC上的。备份文件告诉SQL Server要进行备份或还原,它会在相应的文件夹中查找文件。您可以通过右键单击对象资源管理器窗格中的服务器名称并选择属性来从SSMS更改SQL Server中的文件夹。对话框,选择左侧的数据库设置,默认位置位于右侧窗格的底部。



但是......你只能备份到SQL Server PC可以访问的文件夹 - 因此,如果您需要在计算机上使用它们,则必须共享文件夹,并从服务器端连接到该文件夹​​。
That's because SQL Server is a Server based product: it stores backup files relative to its server installation folder, not on your local PC. SSMS tells SQL Server to do a backup or restore, and it looks in it's appropriate folder to find the files. You can change the folder in SQL Server from SSMS by right-clicking the server name in the Object Explorer pane and selecting "Properties". In the resulting dialog, select the "Database settings" on the left and the default locations are towards the bottom of the right hand pane.

But ... you can only backup to folders that the SQL Server PC has access to - so if you want them on your machine you will have to share a folder, and connect to it from the server end.


这篇关于.bak文件在实际目录位置找不到?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆