如何使实时更改SQL Server Express [英] How to make live changes to SQL server express

查看:142
本文介绍了如何使实时更改SQL Server Express的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用VS studio开发一个asp.net web应用程序。我使用SQL Server Express。
在开发期间,我一直在我的服务器上测试我的Web应用程序。

I've been developing an asp.net web app using VS studio. I'm using SQL Server Express. During development I have been testing my web app on my server.

每次我需要更新数据库时,我只需删除我的旧数据库(位于我的服务器上)并上传我的新数据库。因为我只是测试,我的应用没有用户,这是没有问题。

Every time that I need to update my database I would simply delete my old database (located on my server) and upload my new DB. Since I'm only testing, and my app has no users, it hasn't been a problem.

我的网站上线后,我不知道如何更改我的数据库。显然,我不能简单地删除它,因为它将包含用户数据。那么人们通常如何更新活动数据库。也就是说,让我说我的网站是活的,现在我需要添加更多的表和存储过程到我的数据库。

Once my site goes live I don't know how to make changes to my DB. Obviously I wont be able to simply delete it as it will contain user data. So how do people typically update a live DB. That is, lets say my site is live and now I need to add more tables and stored procedures to my DB. How would i do this on a live site?

推荐答案

要对生产数据库进行更改,您需要:

To make changes to a production database, you'd:


  1. 尝试在受影响最少的用户受到影响时计划中断,发布信息以便用户在发现之前知道

  2. 使用数据定义语言(DDL)脚本来更改数据库表和潜在的数据操作语言(DML)脚本,以便将现有数据压缩到需要的变更。

  1. Try to schedule an outage when the least number of users will be affected, posting information so users are aware prior to
  2. Use data definition language (DDL) scripts to make the changes to the database tables, and potentially data manipulation language (DML) scripts to massage existing data into what the changes need.

必须在开发和测试/ QA环境中测试步骤2所必需的脚本,以确保在生产系统中尽可能少地遇到问题。允许您将数据库恢复到应用程序的早期版本的备份对于开发和测试/ QA环境都是必需的。

The scripts necessary for step 2 should have been tested in Development and Test/QA environments to ensure as few issues as possible are experienced in the Production system. Backups that allow you to restore the database to previous versions of the application are required for both the Development and Test/QA environments.

这篇关于如何使实时更改SQL Server Express的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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