Is it ok for me to add a column while the database is in
use? My users received a message when I added the first
column to an existing table. Is there a way to stop them
from receiving messages if I add a column?
Hi,
Database in use is fine. But do not add a column if the table is in use.
This will lock all the users accessing the table, so do it offline
Thanks
Hari
MCDBA
"lisa" <anonymous@.discussions.microsoft.com> wrote in message
news:6a1701c42ebe$93986ac0$a301280a@.phx.gbl...
> Is it ok for me to add a column while the database is in
> use? My users received a message when I added the first
> column to an existing table. Is there a way to stop them
> from receiving messages if I add a column?
|||I would recommend that we don't add any columns to a table while it is in
use. From the perspective of best practices, I would recommend that you
keep designing/alteration of tables and database separate from your
production environment.
I am not aware of your environment, however, if it is a large database on
production environment, it is rare that someone will add a column in a
table while the database is still accessible. This is typically a
maintenance/change request kind of a scenario and should be first done on a
test environment. Once you have tested the new table structure and are sure
that its ready for production environment, then you can put that table
there. But make sure that all this is done when there are least chances of
any users getting hit.
Right now, your users just got some error message. However, if you simply
add a new column directly in the production database table, your
application might start behaving abnormally, affecting your users. So my
suggestions would be that you add it separately on a different machine
before putting it on live server.
Hope that helps.
Sanchan[MSFT]
sanchans@.online.microsoft.com
This posting is provided "AS IS" with no warranties, and confers no rights.
No comments:
Post a Comment