备份报表的 SQL 数据库

发布于 2024-07-21 00:09:12 字数 430 浏览 11 评论 0原文

我正在寻找一些帮助/建议,以将两个大型数据库备份到一台专用于报告的服务器。 情况是;

我公司的内部网站有两个数据库。 一份用于英国,一份用于欧洲。 两者都是 DR 的镜像。

我在欧洲有一台专用于 Microsoft Reporting Services 的服务器,我们根据这两个数据库中收集的数据运行报告。

出于性能/安全原因,我们不想将报告服务指向实时数据库,因此我们目前每天备份这两个数据库并将它们恢复到我们的报告服务服务器。

然而,这意味着我们通过备份整个数据库给我们的网络带来了压力,而且数据直到昨天午夜才更新。

我们的目标是使数据至少更新 15 分钟,有人建议查看 Log Shipping,所以我想知道是否有人有设置此设置的经验以及优点和缺点以及是否有更好的方法选择?

任何帮助将不胜感激, 谢谢

I'm looking for some help/suggestions for backing up two large databases to one server dedicated to reports. The situation is;

My company has two databases for its internal website. One for the UK and one for Europe. Both are mirrored for DR.

I have a server based in Europe which is dedicated to Microsoft Reporting Services, where we run reports based on the data collected in those two databases.

We do not want to point reporting services to the live databases for performance/security reasons so we currently backup both databases on a daily basis and restore them to our Reporting Services server.

However this means we are putting a strain on our networks by backing up the entire databases, and also the data is only up-to-date by midnight yesterday.

Our aim is to have the data up to date by at least 15 minutes, it has been suggested to look at Log Shipping so I wondered if anyone had any experience in setting this up and what are the pros and cons and whether there is a better alternative?

Any help would be greatley appreciated,
Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

洛阳烟雨空心柳 2024-07-28 00:09:12

我们开发了类似的环境。 我们使用镜像将数据传输到报告服务器,并创建了一个自动化例程,每 15 分钟创建一次数据库快照。 这些快照在我们的环境中只需 1 到 2 秒即可创建,并为我们提供数据库的只读副本。 如果您希望我更深入地了解细节,请告诉我。

注意我们在两台服务器上运行 Enterprise。

We developed a similar environment. We used Mirroring to get the data off to our reporting server and created an automated routine to create Snapshots of the database every 15 min. These snapshots only take 1 to 2 seconds to create in our environment and give us a read only copy of the database. Let me know if you would like me to go into deeper detail.

Note we are running Enterprise on both servers.

痴骨ら 2024-07-28 00:09:12

日志传送是一个很好的解决方案。 我们在SQLServerPedia 的日志传送部分上有关于它的文章,并且我有一个视频教程在那里与您讨论不同的选择。 关于日志传送需要记住的一件事是,当发生恢复时,您的用户将被踢出报告数据库。

复制不存在这个问题,但复制远非“一劳永逸”——管理起来非常耗时,而且并不像您希望的那样可靠。 此外,您可能必须进行架构修改才能使用复制。 日志传送更加自动化 稳定,但代价是在恢复时将用户踢出。

您可以通过制定两个日志传送计划来最大限度地减少这种情况 - 一个用于白天工作时间,另一个用于其余时间。 在工作时间内,您每小时(或更少)仅恢复一次数据,其余时间每 15 分钟恢复一次。

Log shipping is a great solution for this. We've got articles about it over at SQLServerPedia's Log Shipping section, and I've got a video tutorial on there talking you through your different options. One thing to keep in mind about log shipping is that when the restores happen, your users will be kicked out of the reporting database.

Replication doesn't have that problem, but replication is nowhere near "set-it-and-forget-it" - it's time-intensive to manage, and isn't quite as reliable as you'd like it to be. In addition, you may have to make schema modifications in order to use replication. Log shipping is more automatic & stable, but at the cost of kicking users out at restore time.

You can minimize that by having two log shipping schedules - one for daytime during business hours, and one for the rest. During business hours, you only restore the data once per hour (or less), and the rest of the time you do it every 15 minutes.

尘曦 2024-07-28 00:09:12

您应该将复制视为备份的替代方案。

You should look at replication as an alternative to backups.

哽咽笑 2024-07-28 00:09:12

我建议您考虑使用事务复制。

听起来您似乎正在寻求实现一个与我们当前正在实现的场景类似的场景。

我们使用事务复制(尽管是实时的,但您很可能希望以不太频繁的计划同步您的环境)将我们的实时生产数据库的副本卸载到另一台服务器以用于报告目的。

卸载报告数据是一种常见的复制方案,Microsoft 复制文档中对此进行了描述。

http://msdn.microsoft.com/en-us/library/ms151784。 aspx

一个元素,以及需要解决的安全考虑因素,但是,在我看来,使用复制有许多关键优势,包括:

  • Brent 是正确的,因为复制确实需要配置 与日志相比的延迟
    船运。
  • 仅发布的能力
    所需文章(表)
    用于报告。
  • 减少存储要求。
  • 发布的数据越少意味着越少
    网络流量。
  • 访问您的报告
    始终保持数据/数据库。

例如,在我们的环境中,我们决定仅从生产数据库中复制我们实际需要进行报告的特定表(文章)。

我希望我所描述的内容清晰且有意义,但如果您有任何疑问,请随时与我联系。

I would recommend that you look into using Transactional Replication.

It sounds as though you are looking to implement a scenario that is similar to what we are currently implementing ourselves.

We use Transaction Replication (albeit real time, you would most likely wish to synchronize your environment on a less frequent schedule) to offload a copy of our live production database to another server for reporting purposes.

Offloading reporting data is a common replication scenario and is described here in the Microsoft Replication documentation.

http://msdn.microsoft.com/en-us/library/ms151784.aspx

Brent is right in that there is indeed an element of configuration required with Replication, along with security considerations that would need to be addressed however, there are a number of key advantages to using Replication in my opinion, including:

  • Reduced latency in comparison to log
    shipping.
  • The ability to Publish only the
    Articles (tables) that are required
    for reporting.
  • Reduced storage requirements.
  • Less data being published means less
    network traffic.
  • Access to your reporting
    data/database at all times.

For example, in our environment, we decided to replicate only the specific tables (articles) from our production database that we actually require for reporting.

I hope what I have described is clear and makes sense but please do feel free to contact me if you have any queries.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文