0

こんにちは、私はまだデータベース展開の初心者です。

通常、本番データベースへの変更は、リリースのためにどのようにデプロイされますか?

私のクライアントは、まったく新しいセットアップを望んでいます。DEV、INT、PROD の 3 つの環境があります。彼は、QA が認定したときに、INT を PRODUCTION として作成したいと考えています。これはアプリケーションサーバーでは問題ありませんが、データベースの状態は非常に重要であるため、本番データを統合に同期しない限り INT データベースを本番にすることができないため、これはデータベースの問題です。しかし、私たちのデータベースは 300GB を超えるため、データの同期に多くの時間がかかるため、お勧めできないほどの大きなダウンタイムが発生します。

このシナリオで私にアドバイスしてもらえますか。

4

2 に答える 2

0

展開前にこのような同期を行うための私が知っている最も適切な方法は、元のデータのコピーを使用したオフライン統合です。最初は重いプロセスのように思えるかもしれませんが、元のデータを利用できるようにし (同期中に問題が常に発生する可能性があります)、完全な展開の前に必要なすべてのテストをデータで実行できるという利点があります。

于 2013-06-21T14:57:49.173 に答える
0

Here are some tips for deploying to a production database:

  1. Always have current backups of your production database. Just in case something goes wrong.
  2. Make sure you use some kind of source control for your scripts. Just like code. Check in scripts, stored procedures, etc.
  3. Always have rollback scripts for any data updates. For example, have a script that updates 100 records? Write a script that copies the data somewhere else temporarily and that can restore any changes you make. It's easy to test this in DEV and INT. Gives you a bit of peace of mind when making production changes to data.
  4. Always have a recent backup for any schema changes. If you're adding a field to a table, see if you can copy the table to a temp table and then make your changes. Might not always be possible if the table is really large, but again, it lets you quickly rollback in case of an error.
  5. Practice, practice, practice. Practice restoring backups of old production data. Practice running your scripts in DEV and INT. Be ready to re-deploy all stored procedures at any moment.

Another subject that can be tough that you touched on is having production data in INT. I would regularly restore production database backups to INT and DEV. It's well worth it for QA since it provides them with both the quality of production data and the quantity.

I would advise against turning the INT database into production however. Developers and QA will always put in garbage data for testing and you don't want to make that live.

于 2013-06-21T15:41:15.793 に答える