简体   繁体   English

需要查看/转换.bak文件内容

[英]Need to View/Convert .bak file contents

I've got a .bak file from an HR software we used to use and have been asked to review the contents. 我从以前使用的HR软件中获得了一个.bak文件,并被要求检查其内容。 I've never done this before, so I've pieced things together from research. 我以前从未做过此事,因此我将研究工作拼凑而成。 So far, I've installed SQL Server 2008 R2 w/ Management Studio and managed to Restore the database from the .bak file. 到目前为止,我已经安装了带有Management Studio的SQL Server 2008 R2,并设法从.bak文件还原数据库。

I've got it in there, but don't know what I'm looking at, how to get the data in a viewable format, export it as .sql, .csv or anything. 我已经在那儿了,但不知道我在看什么,如何以可见格式获取数据,将其导出为.sql,.csv或其他任何内容。 Not really sure what the next step is to view this in an understandable format. 不太确定下一步应该以一种可理解的格式查看它。 Need a push in the right direction. 需要朝正确的方向推动。

With your knowledge with databases, I suggest you follow the following steps to extract a table to Excel 了解数据库后,建议您按照以下步骤将表提取到Excel

  1. From object explorer, open databases by clicking the plus sign on Databases folder 在对象资源管理器中,通过单击“数据库”文件夹上的加号打开数据库
    1. You will see many databases. 您将看到许多数据库。 Click the plus sign for any of them. 单击任何一个的加号。
    2. Open a folder called Tables, you will see the data tables in that database. 打开一个名为Tables的文件夹,您将在该数据库中看到数据表。
    3. Click on CTLR + N with the database name selected. 单击CTLR + N ,选择数据库名称。
    4. A query editor will open. 查询编辑器将打开。 Type SELECT * FROM TableName . 键入SELECT * FROM TableName You need to replace TableName with the Name of the table you want to explore. 您需要将TableName替换为要浏览的表的名称。
    5. Click F5 . 点击F5 This will display data for you in a grid at the bottom. 这将在底部的网格中为您显示数据。
    6. Right click on the top left of the data that you see and click on Copy with Header. 右键单击所看到的数据的左上角,然后单击“带标题复制”。
    7. Go to an excel sheet and paste the data. 转到Excel工作表并粘贴数据。

This is the way to do it table by table. 这是逐表进行的方法。 But you are highly encouraged to consult with a database developer or colleague with database knowledge if you want to learn how to manipulate data inside management studio. 但是,如果您想学习如何在Management Studio中操作数据,强烈建议您咨询数据库开发人员或具有数据库知识的同事。 This Link might be helpful for you http://www.w3schools.com/sql/sql_intro.asp 该链接可能对您有所帮助http://www.w3schools.com/sql/sql_intro.asp

Hope this will help. 希望这会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM