且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在还原新数据库时覆盖现有数据库

更新时间:2023-02-02 20:27:26

亲爱的朋友,



在sql server Management Studio中。选择一个数据库右键单击它。您将获得一个选项任务,您将获得还原选项。单击该还原选项,您将获得数据库。单击该数据库,它将打开一个窗口,您将获得一个选项名称设备。它是Radio Button Option.and旁边只有一个按钮。通过点击那个窗口将打开。在那个窗口中有添加选项Button.By点击那个你将得到一个窗口。通过使用该窗口你可以获取来自驱动器的.Bak文件。通过选择后面的文件,单击确定按钮。在最后一个主窗口中有三个选项。一般,文件,选项。您可以选择文件。在恢复为选项卡中有C:\\ \\ Program Program Microsoft SQL Server \ MSSQL11.MSSQLSERVER \ MSSQL \DATA \ Bank.mdf将Bank.mdf更改为您当前的数据库filename.Same事物也应该在fileType日志中更改。最后有选项按钮。通过选择那个。您将获得三个这样的单选按钮选项

1:覆盖现有数据库。



通过检查一个并按下确定按钮和你的数据库将被恢复。



问候,



AnilKumar.D
Dear Friend,

In sql server Management Studio.Select one Database Right Click on that.There you will get one Option Task,in that you will get restore option.Click that Restore Option you will get Database.Click that Database there it will open One Window and You will get one Option name Device.It is Radio Button Option.and beside that only there is one button.By clicking that one another Window will Open.In that windows there is Add option Button.By clicking that one you will get one windows.By using that windows you can fetch the .Bak file from the drives.By selecting the back file click ok button.In the last Main Window there is three options.General,Files,Option.In that you take files option.In that Restore as tab is there C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\Bank.mdf change Bank.mdf to your current database filename.Same thing should change in fileType log also.and last there is options button.By selecting that one.You will get three radio button option like this
1:Overwrite the Existing Database.

By Checking that one and Press ok Button and your Database will be restored.

Regards,

AnilKumar.D